外文翻譯-fin大連理工城市學(xué)院_第1頁
外文翻譯-fin大連理工城市學(xué)院_第2頁
外文翻譯-fin大連理工城市學(xué)院_第3頁
外文翻譯-fin大連理工城市學(xué)院_第4頁
外文翻譯-fin大連理工城市學(xué)院_第5頁
已閱讀5頁,還剩24頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

WHATISuC/OS-uC/OS-III(pronounced“MicroCOSThree)isascalable,ROMable,preemptivereal-timekernelthatmanagesanunlimitednumberoftasks.uC/OS-IIIisathird-generationkernelandoffersalloftheservicesexpectedfromamodernreal-timekernel,suchasresourcemanagement,synchronization,inter-taskcommunications,andmore.However,uC/OS-IIIoffersmanyuniquefeaturesnotfoundinotherreal-timekernels,suchastheabilitytocompleteperformancemeasurementsatrun-time,todirectlysignalorsendmessagestotasks,achievependingonmultiplekernelobjects,andWHYANEWuC/OSTheuC/OSseries,introducedin1992,hasundergoneanumberofchangesovertheyearsbasedonfeedbackfromthousandsofpeopleusinganddeployingitsevolvingversions.uC/OS-IIIisthesumofthisfeedbackandexperience.RarelyuseduC/OS-IIfeatureswereeliminatedandnewer,moreefficientfeaturesandservices,wereadded.Probablythemostcommonrequestwastoaddroundrobinscheduling,whichwasnotpossibleforuC/OS-II,butisnoatureofuC/OS-III.uC/OS-IIIalsoprovidesadditionalfeaturesthatbetterexploitthecapabilitiesoftoday’snewerprocessors.Specifically,uC/OS-IIIwasdesignedwith32-bitprocessorsinmind,althoughitcertainlyworkswellwith16-andevenseveral8-bitprocessors.uC/OS-IIIThemaingoalofuC/OS-IIIistoprovideabest-in-classreal-timekernelthatliterallyshavesmonthsofdevelopmenttimefromanembedded-productschedule.Usingacommercialreal-timekernelsuchasuC/OS-IIIprovidesasolidfoundationandframeworktothedesignengineerdealingwiththegrowingcomplexityofembeddeddesigns.AnothergoalforuC/OS-III,andthereforethisbook,istoexplaininnerworkingsofacommercial-gradekernel.Thisunderstandingwillassistthereaderinmakinglogicaldesigndecisionsandinformedtradeoffsbetweenhardwareandsoftwarethatmakesense.Chapter1Real-timesystemsaresystemswherebythecorrectnessofthecomputedvaluesandtheirtimelinessareattheforefront.Therearetwotypesofreal-timesystems,hardandsoftrealtime.Whatdifferentiateshardandsoftreal-timesystemsistheirtolerancetomissingdeadlinesandtheconsequencesassociatedwiththosemisses.Correctlycomputedvaluesafteradeadlinehaspassedareoftenuseless.Forhardreal-timesystems,missingdeadlinesisnotanoption.Infact,inmanycases,missingadeadlineoftenresultsincatastrophe,whichmayinvolvehumanlives.Forsoftreal-timesystems,however,missingdeadlinesisgenerallynotascritical.Real-timeapplicationscoverawiderange,butmanyreal-timesystemsareembedded.Anembeddedsystemisacomputerbuiltintoasystemandnotacknowledgedbytheuserasbeingacomputer.Embeddedsystemsarealsotypicallydedicatedsystems.Inotherwords,systemsthataredesignedtoperformadedicatedfunction.Thefollowinglistshowsjustafewexamplesofembeddedsystems:FlightmanagementJetengineMP3AmplifiersandtunersAntilockbrakingClimateEngineNavigationsystems(GPS)sComputerAirconditioningWhitegoodsOfficeautomationFAXmachines/copiersProcesscontrolChemicalFactoryFoodprocessingBroadcasting AndmanymoreReal-timesystemsaretypicallymorecomplicatedtodesign,debug,anddeploythannon-real-timesystems.FOREGROUND/BACKGROUNDSmallsystemsoflowcomplexityaretypicallydesignedasforeground/backgroundsystemsorsuper-loops.Anapplicationconsistsofaninfiniteloop(F1-1(1))thatcallsmodules(i.e.,tasks)toperformthedesiredoperations(background).InterruptServiceRoutines(ISRs)showninF1-1(3)handleasynchronousevents(foreground).Foregroundisalsocalledinterruptlevel;backgroundiscalledtasklevel.CriticaloperationsthatshouldbeperformedatthetasklevelmustunfortunaybehandledbytheISRstoensurethattheyaredealtwithinatimelyfashion.ThiscausesISRstotakelongerthantheyshould.Also,informationforabackgroundmodulethatanISRmakesavailableisnotprocesseduntilthebackgroundroutinegetsitsturntoexecute,whichiscalledthetask-levelresponse.Theworst-casetask-levelresponsetimedependsonhowlongabackgroundlooptakestoexecuteand,sincetheexecutiontimeoftypicalcodeisnotconstant,thetimeforsuccessivepassesthroughaportionoftheloopisnondeterministic.Furthermore,ifacodechangeismade,thetimingoftheloopisaffected.Mosthigh-volumeandlow-costmicrocontroller-basedapplications(e.g.,microwaveovens,ephones,toys,etc.)aredesignedasforeground/backgroundsystems.Fiaure1-1Foregroung/Backgroung(SuperLoops)REAL-TIMEAreal-timekernelissoftwarethatmanagesthetimeandresourcesofamicroprocessor,microcontrollerorDigitalSignalProcessor(DSP).Thedesignprocessofareal-timeapplicationinvolvessplittingtheworkintotasks,eachresponsibleforaportionofthejob.Atask(alsocalledathread)isasimpleprogramthatthinksithastheCentralProcessingUnit(CPU)compleytoitself.OnasingleCPU,onlyonetaskexecutesatanygiventime.Ataskisalsotypicallyimplementedasaninfinioop.Thekernelisresponsibleforthemanagementoftasks.Thisiscalledmultitasking.MultitaskingistheprocessofschedulingandswitchingtheCPUbetweenseveraltasks.TheCPUswitchesitsattentionbetweenseveralsequentialtasks.Multitaskingprovidestheillusionofhavingmultiple izestheuseoftheCPU.Multitaskingalsohelpsinthecreationofmodularapplications.Oneofthemostimportantaspectsofmultitaskingisthatitallowstheapplicationprogrammertomanagethecomplexityinherentinreal-timeapplications.Applicationprogramsareeasiertodesignandmaintainwhenmultitaskingisused.uC/OS-IIIisapreemptivekernel,whichmeansthatuC/OS-IIIalwaysrunsthemostimportanttaskthatisready-to-runasshowninFigure1-2. IsWaitingforWaitforiiFigure1-2uC/OS-IIIisapreemptiveF1-2(1)Alow-prioritytaskisF1-2(2)Aninterruptoccurs,andtheCPUvectorstotheISRresponsibleforservicingtheinterruptingdevice.F1-2(3)TheISRservicestheinterruptdevice,butactuallydoesverylittlework.TheISRwilltypicallysignalorsendamessagetoahigher-prioritytaskthatwillberesponsibleformostoftheprocessingoftheinterruptingdevice.Forexample,iftheinterruptcomesfromanEthernetcontroller,theISRsimplysignalsatask,whichwillprocesstheF1-2(4)WhentheISRfinishes,uC/OS-IIInoticesthatamoreimportanttaskhasbeenmadeready-to-runbytheISRandwillnotreturntotheinterruptedtask,butinsteadcontextswitchtothemoreimportanttask.F1-2(5)Thehigher-prioritytaskexecutesandperformsthenecessaryprocessinginresponsetotheinterruptdevice.F1-2(6)Whenthehigher-prioritytaskcompletesitswork,itloopsbacktothebeginningofthetaskcodeandmakesauC/OS-IIIfunctioncalltowaitforthenextinterruptfromthedevice.F1-2(7)Thelow-prioritytaskresumesexactlyatthepointwhereitwasinterrupted,notknowingwhathappened.KernelssuchasuC/OS-IIIarealsoresponsibleformanagingcommunicationbetweentasks,andmanagingsystemresources(memoryandI/Odevices).Akerneladdsoverheadtoasystembecausetheservicesprovidedbythekernelrequiretimetoexecute.Theamountofoverheaddependsonhowoftentheseservicesareinvoked.Inawell-designedapplication,akernelusesbetween2%and4%ofaCPU’stime.And,sinceuC/OS-IIIissoftwarethatisaddedtoanapplication,itrequiresextraROM(codespace)andRAM(dataspace).Low-endsingle-chipmicrocontrollersaregenerallynotabletorunareal-timekernelsuchasuC/OS-IIIsincetheyhaveaccesstoverylittleRAM.uC/OS-IIIrequiresbetween1Kbyteand4KbytesofRAM,pluseachtaskrequiresitsownstackspace.ItispossibleforuC/OS-IIItoworkonprocessorshavingaslittleas4KbytesofRAM.Finally,uC/OS-IIIallowsforbetteruseoftheCPUbyprovidingapproximay70indispensableservices.Afterdesigningasystemusingareal-timekernelsuchasuC/OS-III,youwillnotreturntodesigningaforeground/backgroundsystem.RTOS(REAL-TIMEOPERATINGARealTimeOperatingSystemgenerallycontainsareal-timekernelandotherhigher-levelservicessuchasfilemanagement,protocolstacks,aGraphicalUserInterface(GUI),andothercomponents.MostadditionalservicesrevolvearoundI/Odevices.MicriumoffersacompletesuiteofRTOScomponentsincluding:uC/FS(anEmbeddedFileSystem),uC/TCP-IP(aTCP/IPstack),uC/GUI(aGraphicalUserInterface),uC/USB(aUSBdeviceandhoststack),andmore.Mostofthesecomponentsaredesignedtoworkstandalone.ExceptforuC/TCP-IP,areal-timekernelisnotrequiredtousethecomponentsinanapplication.Infact,userscanpickandchooseonlythecomponentsrequiredfortheapplication.ContactMicrium( )foradditionaldetailsandpricing.uC/OS-uC/OS-IIIisascalable,ROMable,preemptivereal-timekernelthatmanagesanunlimitednumberoftasks.uC/OS-IIIisathird-generationkernel,offeringalloftheservicesexpectedfromamodernreal-timekernelincludingresourcemanagement,synchronization,inter-taskcommunication,andmore.However,uC/OS-IIIalsooffersmanyuniquefeaturesnotfoundinotherreal-timekernels,suchastheabilitytoperformperformancemeasurementsatruntime,directlysignalorsendmessagestotasks,andpending(i.e.,waiting)onsuultiplekernelobjectsassemaphoresandmessagequeues.HereisalistoffeaturesprovidedbyuC/OS-III:SourceCode:uC/OS-IIIisprovidedinANSI-Csourceform.ThesourcecodeforuC/OS-IIIisarguablythecleanestandmostconsistentkernelcodeavailable.CleansourceispartofthecorporatecultureatMicrium.Althoughmanycommercialkernelvendorsprovidesourcecodefortheirunlessthecodefollowsstrictcodingstandardsandis paniedbycompleteationwithexamplestoshowhowthecodeworks,theseproductsmaybecumbersomeanddifficulttoharness.Withthisbook,youwillgainadeepunderstandingoftheinnerworkingsofuC/OS-III,whichwillprotectyourinvestment.IntuitiveApplicationProgrammingInterface(API):uC/OS-IIIishighlyintuitive.Oncefamiliarwiththeconsistentcodingconventionsused,itissimpletopredictthefunctionstocallfortheservicesrequired,andevenpredictwhichargumentsareneeded.Forexample,apointertoanobjectisalwaystheargument,andapointertoanerrorcodeisalwaysthelastPreemptivemultitasking:uC/OS-IIIisapreemptivemulti-taskingkernelandtherefore,uC/OS-IIIalwaysrunsthemostimportantready-to-runtask.Roundrobinschedulingoftasksatequalpriority:uC/OS-IIIallowsmultipletaskstorunatthesameprioritylevel.Whenmultipletasksatthesamepriorityareready-to-run,andthatprioritylevelisthemostimportantlevel,uC/OS-IIIrunseachtaskforauser-specifiedtimecalledatimequanta.Eachtaskcandefineitsowntimequanta,andataskcanalsogiveuptheCPUtoanothertaskatthesamepriorityifitdoesnotrequirethefulltimeLowinterruptdisabletime:uC/OS-IIIhasanumberofinternaldatastructuresandvariablesthatitneedstoaccessatomically.Toensurethis,uC/OS-IIIisabletoprotectthesecriticalregionsbylockingtheschedulerinsteadofdisablinginterrupts.Interruptsarethereforedisabledforverylittletime.ThisensuresthatuC/OS-IIIisabletorespondtosomeofthefastestinterruptsources.Deterministic:InterruptresponsewithuC/OS-IIIisdeterministic.Also,executiontimesofmostservicesprovidedbyuC/OS-IIIaredeterministic.Scalable:Thefootprint(bothcodeanddata)canbeadjustedbasedonrequirementsoftheapplication.Addingandremovingfeatures(i.e.,services)isperformedatcompiletimethroughapproximay40#defines(seeos_cfg.h).uC/OS-IIIalsoperformsanumberofrun-timechecksonargumentspassedtouC/OS-IIIservices.Specifically,uC/OS-IIIverifiesthattheuserisnotpassingNULLpointers,notcallingtasklevelservicesfromISRs,thatargumentsarewithinallowablerange,andoptionsspecifiedarevalid,etc..Thesecheckscanbedisabled(atcompiletime)tofurtherreducethecodefootprintandimproveperformance.ThefactthatuC/OS-IIIisscalableallowsittobeusedinawiderangeofapplicationsandprojects.Portable:uC/OS-IIIcanbeportedtoalargenumberofCPUarchitectures.MostuC/OS-IIportsareeasilyconvertedtoworkonuC/OS-IIIwithminimalchangesinjustamatterofminutesandthereforebenefitfrommorethan45CrchitecturesalreadysupportedbyuC/OS-II.ROMable:uC/OS-IIIwasdesignedespeciallyforembeddedsystemsandcanbeROMedalongwiththeapplicationcode.Run-timeconfigurable:uC/OS-IIIallowstheusertoconfigurethekernelatruntime.Specifically,allkernelobjectssuchastasks,stacks,semaphores,event-flaggroups,messagequeues,numberofmessages,mutualexclusionsemaphores,memorypartitionsandtimers,areallocatedbytheuseratruntime.Thispreventsover-allocatingresourcesatcompiletime.Unlimitednumberoftasks:uC/OS-IIIsupportsanunlimitednumberoftasks.Fromapracticalstandpoint,however,thenumberoftasksisactuallylimitedbytheamountofmemory(bothcodeanddataspace)thattheprocessorhasaccessto.Eachtaskrequiresitsownstackspaceand,uC/OS-IIIprovidesfeaturestoallowstackgrowthofthetaskstobemonitoredatrun-time.uC/OS-IIIdoesnotimposeanylimitationsonthesizeofeachtask,exceptthattherebeaminimumsizebasedontheCPUused.Unlimitednumberofpriorities:uC/OS-IIIsupportsanunlimitednumberofprioritylevels.However,configuringuC/OS-IIIforbetween32anddifferentprioritylevelsismorethanadequateformostUnlimitednumberofkernelobjects:uC/OS-IIIallowsforanynumberoftasks,semaphores,mutualexclusionsemaphores,eventflags,messagequeues,timers,andmemorypartitions.TheuserallocatesallkernelobjectsatServices:uC/OS-IIIprovidesalltheservicesexpectedfromahigh-endreal-timekernel,suchastaskmanagement,timemanagement,semaphores,eventflags,mutexes,messagequeues,softwaretimers,fixed-sizememorypools,etc.MutualExclusionSemaphores(Mutexes):Mutexesareprovidedforresourcemanagement.Mutexesarespecialtypesofsemaphoresthathavebuilt-inpriorityinheritance,whicheliminateunboundedpriorityinversions.Accessestoamutexcanbenestedandtherefore,ataskcanacquirethesamemutexupto250times.Ofcourse,themutexownerneedstoreleasethemutexanequalnumberoftimes.Nestedtasksuspension:uC/OS-IIIallowsatasktosuspenditselforanothertask.Suspendingataskmeansthatthetaskwillnotbeallowedtoexecuteuntilthetaskisresumedbyanothertask.Suspensioncanbenestedupto250levelsdeep.Inotherwords,ataskcansuspendanothertaskupto250times.Ofcourse,thetaskmustberesumedanequalnumberoftimesforitto eeligibletorunontheCPU.Softwaretimers:Youcandefineanynumberof“one-shot”and/or“periodic”timers.Timersarecountdowncountersthatperformauser-definableactionuponcountingdownto0.Eachtimercanhaveitsownactionand,ifatimerisperiodic,thetimerisautomaticallyreloadedandtheactionisexecutedeverytimethecountdownreacheszero.Pendonmultipleobjects:uC/OS-IIIallowsanapplicationtowait(i.e.,pend)onmultipleeventsatthesametime.Specifically,ataskcanwaitonmultiplesemaphoresand/ormessagequeuestobeposted.ThewaitingwakesupassoonasoneoftheeventsTaskSignals:uC/OS-IIIallowsanISRortasktodirectlysignalatask.Thisavoidshavingtocreateanintermediatekernelobjectsuchasasemaphoreoreventflagjusttosignalatask,andresultsinbetterTaskMessages:uC/OS-IIIallowsanISRoratasktosendmessagesdirectlytoatask.Thisavoidshavingtocreateanduseamessagequeue,andalsoresultsinbetterperformance.Taskregisters:Eachtaskcanhaveauser-definablenumberof“taskregisters.”TaskregistersaredifferentthanCPUregisters.Taskregisterscanbeusedtohold“errno”typevariable,IDs,interruptdisabletimemeasurementonaper-taskbasis,andmore.Errorchecking:uC/OS-IIIverifiesthatNULLpointersarenotpassed,thattheuserisnotcallingtask-levelservicesfromISRs,thatargumentsarewithinallowablerange,thatoptionsspecifiedarevalid,thatapointertotheproperobjectispassedaspartoftheargumentstoservicesthatmanipulatethedesiredobject,andmore.EachuC/OS-IIIAPIfunctionreturnsanerrorcodeconcerningthe eofthefunctioncall.Built-inperformancemeasurements:uC/OS-IIIhasbuilt-infeaturestomeasuretheexecutiontimeofeachtask,stackusageofeachtask,numberoftimesataskexecutes,CPUusage,ISR-to-taskandtask-to-taskresponsetime,peaknumberofentriesincertainlists,interruptdisableandschedulerlocktimeonaper-taskbasis,andmore.Caneasilybeoptimized:uC/OS-IIIwasdesignedsothatitcouldeasilybeoptimizedbasedontheCPUarchitecture.MostdatatypesusedinuC/OS-IIIcanbechangedtomakebetteruseoftheCPU’snaturalwordsize.Also,thepriorityresolutionalgorithmcaneasilybewritteninassemblylanguagetobenefitfromspecialinstructionssuchasbitsetandclear,aswellascount-leading-zeros(CLZ),orfind--one(FF1)instructions.Deadlockprevention:AlloftheuC/OS-III“pend”servicesincludetimeouts,whichhelpavoiddeadlocks.Tickhandlingattasklevel:TheclocktickmanagerinuC/OS-IIIisplishedbyataskthatreceivesatriggerfromanISR.Handlingandtimeoutsbyataskgreatlyreducesinterruptlatency.Also,uC/OS-IIIusesahasheddeltalistmechanism,whichfurtherreducestheamountofoverheadinprocessingdelaysandtimeoutsoftasks.Userdefinablehooks:uC/OS-IIIallowstheportandapplicationprogrammertodefine“hook”functions,whicharecalledbyuC/OS-III.AhookissimplyadefinedfunctionthatallowstheusertoextendthefunctionalityofuC/OS-III.Onesuchhookiscalledduringacontextswitch,anotherwhenataskiscreated,yetanotherwhenataskisdeleted,etc.Timestamps:Fortimemeasurements,uC/OS-IIIrequiresthata16-bitor32-bitfreerunningcounterbemadeavailable.Thiscountercanbereadatruntimetomaketimemeasurementsofcertainevents.Forexample,whenanISRpostsamessagetoatask,thetimestampcounterisautomaticallyreadandsavedaspartofthemessageposted.Whentherecipientreceivesthemessage,thetimestampisprovidedtotherecipient,andbyreadingthecurrenttimestamp,thetimeittookforthemessagetobereceivedcanbeBuilt-insupportforKernelAwarenessdebuggers:ThisfeatureallowskernelawarenessdebuggerstoexamineanddisplayuC/OS-IIIvariablesanddatastructuresinauser-friendlyway.ThekernelawarenesssupportinuC/OS-IIIcanbeusedbyuC/Probetodisplaythisinformationatrun-time.Objectnames:EachuC/OS-IIIkernelobjectcanhaveanameassociatedwithit.Thismakesiteasytorecognizewhattheobjectisassignedto.YoucanthusassignanASCIInametoatask,asemaphore,amutex,aneventflaggroup,amessagequeue,amemorypartition,andatimer.Theobjectnamecanhaveanylength,butmustbeNULterminated.uC/OS,uC/OS-IIANDuC/OS-IIIFEATURESYearSourcecodePreemptiveumnumberofNumberoftasksateach11RoundRobinMutualExclusionEventMessagMessageFixedSizedSignalataskwithoutrequiringOptiontoPostSendmessagestoataskrequiringamessageSoftwareTaskDeadlockCode3Kto6Kto6KtoDataRun-timeCompile-timeASCIInamesforeachPendonmultipleTaskBuilt-inUserdefinablehookTimestampsonBuilt-inKernelOptimizableSchedulerassemblyCatchataskthatTickhandlingattaskSourcecodeNumberof10DO178BLevelAEUROCAEED-InMedicalFDApre-marketnotification(510(k))pre-marketapprovalInSIL3/SIL4IECforandnuclearInInTable1-1uC/OS,uC/OS-IIanduC/OS-IIIFeaturesComparisonuC/OS-III是什么uC/OS-III(使用微型的C語言編寫的操作系統(tǒng)的第3個(gè)版本)是一個(gè)可擴(kuò)展的,可的,基于優(yōu)先級的實(shí)時(shí)內(nèi)核。對有多少任務(wù)是沒有限制有些uC/OS-III提供的許多特色功能在其它的實(shí)時(shí)內(nèi)核中是找不到功能,例如完備的運(yùn)行時(shí)間測量的功能,直接地發(fā)送信號或發(fā)送消息到為什么命名一個(gè)新的版本uC/OS版本。(roundrobin),這是不可能在uC/OS-II中所支持的功能,但是現(xiàn)在已經(jīng)是uC/OS-III的其中的一個(gè)功能了。uC/OS-III還提供了更好的新功能,以利于適應(yīng)的新處理器。具體來說,uC/OS-III的設(shè)計(jì)應(yīng)用于32位處理器,雖然它確實(shí)有16位,甚8位處理器效果也很好。uC/OS-III前更新很快的產(chǎn)品。如uC/OS-III提供了一個(gè)堅(jiān)實(shí)的基礎(chǔ)和框架的商業(yè)實(shí)時(shí)內(nèi)核,幫助設(shè)計(jì)工程師應(yīng)對不斷復(fù)雜的產(chǎn)品的設(shè)計(jì)。這本書的另一個(gè)目標(biāo),是為了講解uC/OS-III,一個(gè)商業(yè)級內(nèi)核的內(nèi) 原理。這種認(rèn)識將幫助讀者作出邏輯設(shè)計(jì)決策,硬件 之航空航 通 自動飛行管理系 路由 傳真機(jī)/復(fù)印噴射發(fā)控 交換 加工控 MP3 反鎖死制動系 空氣調(diào)節(jié) 廣播設(shè)氣候控 恒溫 電引擎控 大型家用電 等前系復(fù)雜度低的小系統(tǒng)通常被設(shè)計(jì)為前臺/的系統(tǒng)或無限循環(huán)的(1(ISR(3)理異步事件(前臺。前臺也被稱為中斷級;稱為任務(wù)級。作必須是由ISRISR應(yīng)該需要這叫任務(wù)級響應(yīng)。任務(wù)級響應(yīng)的時(shí)間長短依賴于循環(huán)一次所需的時(shí)爐,,玩具等)被設(shè)計(jì)為前臺/的系統(tǒng)。(前臺(前臺時(shí)圖1-1前、(超級循環(huán))系實(shí)時(shí)內(nèi)處理單元(CPU)的完全自身的簡單程序。在單CPU上,只有一個(gè)任務(wù)切換多個(gè)任務(wù)之間的PUPUPU應(yīng)用。一個(gè)多任務(wù)的最重要的方面是,它允許應(yīng)用程序員來管理實(shí)時(shí)應(yīng)用的復(fù)雜性。應(yīng)用程序更容易設(shè)計(jì)和多任務(wù)時(shí)的使用。uCOS-III是一個(gè)搶占的內(nèi)核,這意味著uCOS-III始終運(yùn)行最重要1-2所示。高優(yōu)先高優(yōu)先級事件等時(shí)時(shí)圖1- uC/OS-III是一個(gè)搶占式內(nèi)F1-2(1)F1-2(2)發(fā)生中斷時(shí),CPU進(jìn)入ISRF1-2(3)ISP服務(wù)響應(yīng)中斷的設(shè)備,但實(shí)際上做的工作很少。ISR將如果中斷來自一個(gè)以太網(wǎng)控制器,ISR就簡單標(biāo)記任務(wù)信號F1-2(4)當(dāng)ISR執(zhí)行完成后,uCOS-III創(chuàng)建一個(gè)更高優(yōu)先級的任務(wù),已經(jīng)準(zhǔn)備好可以運(yùn)行在ISR并不會返回到被中斷的任務(wù)當(dāng)F1-2(5)F1-2(7)F1-2(6)一個(gè)uC/OS-III函數(shù)調(diào)用,以便等待來自該設(shè)備的下一個(gè)中和I/O

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論