版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、Nucleus PLUS 培訓內容引見ATI公司產品實時操作系統(tǒng)根本概念Nucleus PLUS及APIImplementationATI 產品Nucleus EDEKernelsNetworkingSupporting ProductsPrototyping - Cross DevelopmentDebugging ToolsC+PLUSJViNETSNMPRMONSPANWebServCLIBGRAFIXFILEATI實時內核ATI網絡部件ATI支持部件調試工具原型設計工具ATI產品 Nucleus EDENetworkingSupporting ProductsPrototyping -
2、 Cross DevelopmentDebugging ToolsJViNETSNMPRMONSPANWebServCLIBGRAFIXFILEKernelsC+PLUSNucleus PLUSNucleus C+實時內核 ATI產品 網絡部件 ATI產品 Nucleus EDESupporting ProductsPrototyping - Cross DevelopmentDebugging ToolsCLIBGRAFIXFILEKernelsC+PLUSNetworkingJViNETSNMPRMONSPANWebServNETSNMPRMONSPANWebServJViNucleus
3、EDEPrototyping - Cross DevelopmentDebugging ToolsKernelsC+PLUSNetworkingJViNETSNMPRMONSPANWebServGRAFIXFILECLIBSupporting ProductsCLIBGRAFIXFILE支持部件 ATI產品 Nucleus EDEPrototyping - Cross DevelopmentKernelsNetworkingSupporting ProductsDebugging ToolsC+PLUSJViNETSNMPRMONSPANWebServCLIBGRAFIXFILEDBUG+UD
4、BDebugger Integration調試工具 ATI產品 Nucleus EDEPrototyping - Cross DevelopmentKernelsNetworkingSupporting ProductsDebugging ToolsC+PLUSJViNETSNMPRMONSPANWebServCLIBGRAFIXFILE原型設計工具 ATI產品 PTHREADSVNETNucleus EDEMNTPC+實時操作系統(tǒng)根本概念A single task/* Main control of program */main() . do_something(); ./* A funct
5、ion to do something */void do_something() .一切運用在一個義務中實現單一執(zhí)行指針單一存儲空間單義務系統(tǒng) 義務與義務調度 多個義務競爭運用CPU多個執(zhí)行指針多個存儲空間Task 3/* Main control of program */main() do_something();/* A function to do something */void do_something()/* Main control of program */main() do_something();/* A function to do something */void
6、do_something()/* Main control of program */main() do_something();/* A function to do something */void do_something()Task 2Task 1多義務系統(tǒng) 義務與義務調度 實時操作系統(tǒng)擔任義務調度:基于優(yōu)先級搶先調度時間片輪詢調度FIFO調度Task 1Task 2Task 3Task 4義務調度 義務與義務調度 .highest priority (0)lowest priority(255).Task List (255)Task List (0)Task-10Task-20Ta
7、sk-30Task-1255Task-2255Task-3255義務調度義務與義務調度 Ready - 預備執(zhí)行Running - 正在執(zhí)行Suspended - 等待某條件發(fā)生Finished - 義務執(zhí)行完成義務形狀義務與義務調度 ReadySuspendedRunningFinished優(yōu)先級當前義務形狀堆棧指針.義務控制塊TCBPriorityStateStack *義務屬性義務與義務調度 CPU形狀 - CPU的當前形狀包含在CPU存放器中:通用存放器程序指針形狀存放器.文本切換義務與義務形狀 CPURegister 1Register 2Register 3stackRegiste
8、r 1Register 2Register 3Register 4Register 5Register 6Register 4Register 5Register 6Register 1Register 2Register 3Register 4Register 5Register 6Register 1Register 2Register 3Register 4Register 5Register 6文本切換義務與義務調度 義務間通訊義務間通訊在兩個或多個義務間傳送數信箱Mailboxes隊列Queues管道Pipes信息長度固定開銷小一次傳送一個信息Task YTask X1 Messag
9、e信箱義務間通訊 包容多個信息信息長度可固定或變長用于在義務間傳送大容量信息Task YTask X隊列與管道義務間通訊 義務間同步義務間同步協調同步義務間控制信號量Semaphores事件Events信號SignalsTask 3Task 2Task 1Device 1Device 2Task 3必需等待資源釋放。.信號量用于對沖突性資源進展存取控制信號量義務間同步 40 hours$10/hour20%*T3*T2111print11000事件義務間同步 00000000000000000000000000000000111屬于某一特定義務異步方式任務信號義務間同步 Task 2Task
10、PTask 1EPEPsignal_handler 多個義務同時對同一存儲區(qū)訪問將導致數據被破壞??量绦再Y源/可重入性 Task-1Task-2Variable X,Ymemoryenabledisable隊列管理苛刻性資源/可重入性分區(qū)內存管理內存分配是預定的,且分區(qū)長度固定。動態(tài)內存管理內存分配大小可變內存管理T1T3T2分區(qū)內存管理內存管理heap100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes200bytes100bytes50byteshea
11、p動態(tài)內存管理內存管理T1T2T3200bytes50bytes100bytes200bytes50bytes100bytes中斷可使得CPU對外部事件異步呼應;中斷處置必需在短時間內快速呼應;.采用維護機制以維護數據不被破壞:制止中斷其他措施(LISR/HISR)Device 1IXAn external device completes a task, which causes interrupt X to be errupt_service_routine() handle_the_interrupt()The Interrupt Service Routine is
12、 then initiated.ISRX中斷處置DeviceDeviceDriverInterfaceIO_Input()IO_OutputI/O Task提供通用編程接口I/O 驅動定時器系統(tǒng)時鐘定時器與系統(tǒng)時鐘expiration_routine() do_something_now()Expiration routine is executed when timer expires.Nucleus PLUS OverviewNucleus PLUS ServicesTask ControlTask CommunicationTask SynchronizationTimerMemoryI
13、nterruptI/O DriverDevelopmentCreate/Delete TaskSuspend/Resume TaskTerminate taskChange task time sliceChange preemptionRelinquishReset TaskChange task priorityTask sleepCheck StackRetrieve list of current tasksInformation.Task List (255)Task List (0)Task-1255Task-2255Task-3255Task-10Task-20Task-30Ta
14、sk ControlReady - waiting to execute (a running task is also ready)Sleep - waiting for time to expirePure Suspend - unconditionally suspendedComponent Suspend - waiting for a componentTerminated - task has been terminated either by itself or another taskFinished - task executed to completion (has re
15、turned from main task function)Task StatesTask Control Create/DeleteSend/ReceiveBroadcast ToReset InformationNumber of mailboxesRetrieve list of active mailboxesMailboxesTask Communication1 MessageTask YTask XOptimized for small messages.Each message consists of four 32-bit pieces.QueuesTask Communi
16、cationCreate/DeleteSend/ReceiveBroadcast ToResetSend To FrontInformationNumber of queuesRetrieve list of active queuesTask YTask XM1M2Fixed or variable sized messages.Message sent in 32-bit increments.Messages of higher importance can be placed in front using Send_To_Front.PipesTask CommunicationCre
17、ate/DeleteSend/ReceiveBroadcast ToSend to FrontResetInformationNumber of pipesRetrieve list of active pipesM1M2M3M4Task YTask XFixed or variable sized messages.Message sent in 8-bit increments.Messages of higher importance can be placed in front using Send_To_Front.Task Communication100bytes100bytes
18、100bytes100bytes100bytes100bytesT1T2100bytes100bytes100bytes100bytescommunication “queueTask Communication (Optimization)100bytes100bytes100bytes100bytes100bytes100bytesT1T3100bytes100bytescommunication “queueCreate/DeleteObtain/ReleaseResetInformationNumber of semaphoresRetrieve list of semaphoresS
19、emaphoresTask SynchronizationTask 3Task 2Task 1Device 1Device 2Event GroupsTask SynchronizationCreate/DeleteSet/RetrieveInformationNumber of event groupsRetrieve list of event groups*T3*T2111print11000Many tasks can be utilizing an event group.Multiple meanings per event group.SignalsTask Synchroniz
20、ationRegister/ModifySend/ReceiveTask 2Task PTask 1EPEPsignal_handler Sent to a specific task.One meaning per signal.Enable/Disable timerCreate/Delete timerReset timerRetrieve list of timersTimer informationTimersexpiration_routine() do_something_now()Expiration routine is executed when timer expires
21、.System ClockSet/Retrieve system clockCreate/DeleteAllocate/DeallocateRetrieve list of memory partitionsPartitionedMemory ManagementT3100bytes100bytesT1T2100bytes100bytes100bytes100bytes100bytesInitializeCreate/DeleteAllocate/DeallocateRetrieve list of memory poolsDynamicMemory Management200b100b50b
22、heapDevice 1IXAn external device completes a task, which causes interrupt X to be errupt_service_routine() handle_the_interrupt()The Interrupt Service Routine is then initiated.ISRX(1) Interrupt is issued(2) Interrupts are disabled(3) Interrupt Service Routine executed(4) Interrupts are re
23、-enabledInterruptsMinimal ISRLow Level Interrupt Service Routines (LISR)saves and restores contextrestricts interaction with tasking environmentHigh Level Interrupt Service Routines (HISR)“super threads with prioritycan make kernel calls but cannot suspendLISR & HISRInterruptsHISRXLISRLISRZLISRYLISR
24、XHISRYHISRZDeviceHISRXLISRLISRZLISRYLISRXHISRYHISRZDeviceLISR does limited amount of processing.HISR is scheduled.Interrupts are disabled for a shorter amount of time.LISR & HISRInterruptsTCBTCBTCBTasksHISRHCBHCBHISR SchedulingInterruptsHISRXLISRLISRZLISRYLISRXHISRYHISRZDeviceInterruptsCreate/Delete
25、 HISRActivate HISRRetrieve list of HISRsHISR InformationGet current HISR pointer Register LISRSetup a vectorControl InterruptsCreate/DeleteRequestSuspend/ResumeObtain list of driversDeviceDeviceDriverInterfaceIO_Input()IO_OutputI/O TaskI/O DriversEnable/Disable History SavingMake History EntryRetrie
26、ve History EntryObtain license informationObtain release informationDevelopment ServicesNucleus PLUS APITarget dependent Assembly filesTarget dependent Header file (nucleus.h)Target independent C files Demonstration filesBuild filesLinker command filesFilesSource File StructureInitializationThread C
27、ontrolTimer ControlLow Level Assembly CodeSource File StructurePointers to control blocksLinked listsProtection structuresSuspension structuresTimeoutsReturn statusInformational servicesCreating componentsDeleting componentsGeneric Component StructureSource File StructureCreation and Deletion of Obj
28、ectsControl Block - you define location anywhere in memoryMemory Requirements - data needed for components (e.g., task stack, queue space, etc.)TimeoutsAny kernel request that can result in suspension provides a timeout parametertimeouts - immediate return, forever, clock ticksCommon ComponentsInfor
29、mational Serviceshow manypointers toinformationCommon Components0 x1000 x2000 x3000 x1000 x2000 x300Poolpool_namestart_addresspool_sizepartition_sizeavailableallocatedsuspend_typetasks_suspendedfirst _taskstatusCommon ComponentsApplication_Initialize( )Create dynamic memory poolNU_Create_Memory_Pool
30、( )Create TasksNU_Allocate_Memory( )NU_Create_Task( )Create other system objects (optional)NU_Create_Queue( )NU_Create_Semaphore( )NOTE - Interrupts disabled during Application_Initialize( ) CodeSystem Startup.data (initialized data).code.bss (uninitialized data)first_available_memory_addressapplica
31、tion memoryApplication MemorySystem StartupTask ControlNU_Create_Task()NU_Resume_Task()NU_Terminate_Task()NU_Change_Time_Slice()NU_Change_Preemption()NU_Relinquish()NU_Current_Task_Pointer()NU_Task_Pointers()NU_Task_Information()NU_Delete_Task()NU_Suspend_Task()NU_Reset_Task()NU_Change_Priority()NU_
32、Sleep()NU_Check_Stack()NU_Established_Tasks().Task List (255)Task List (0)Task-1255Task-2255Task-3255Task-10Task-20Task-30NU_Broadcast_To_Mailbox()NU_Delete_Mailbox()NU_Mailbox_Information()NU_Receive_From_Mailbox()NU_Send_To_Mailbox()NU_Create_Mailbox()NU_Established_Mailboxes()NU_Mailbox_Pointers(
33、)NU_Reset_Mailbox()Optimized for small messages.Each message consists of four 32-bit pieces.Task YTask X1 MessageMailboxesTask CommunicationNU_Create_Queue()NU_Delete_Queue()NU_Receive_From_Queue()NU_Send_To_Front_Of_Queue()NU_Broadcast_To_Queue()NU_Reset_Queue()NU_Send_To_Queue()NU_Established_Queu
34、es()NU_Queue_Information()NU_Queue_Pointers()Fixed or variable sized messages.Message sent in 32-bit increments.Messages of higher importance can be placed in front using Send_To_Front.Task YTask XM1M2QueuesTask CommunicationNU_Broadcast_To_Pipe()NU_Delete_Pipe()NU_Receive_From_Pipe()NU_Send_To_Fron
35、t_Of_Pipe()NU_Create_Pipe()NU_Reset_Pipe()NU_Send_To_Pipe()NU_Established_Pipes()NU_Pipe_Information()NU_Pipe_Pointers()Fixed or variable sized messages.Message sent in 8-bit increments.Messages of higher importance can be placed in front using Send_To_Front.Task YTask XM1M2M3M4PipesTask Communicati
36、onNU_Create_Semaphore()NU_Release_Semaphore()NU_Delete_SemaphoreNU_Obtain_Semaphore()NU_Reset_Semaphore()NU_Established_Semaphores()NU_Semaphore_Information()NU_Semaphore_Pointers()Task 3Task 2Task 1Device 1Device 2SemaphoresTask SynchronizationNU_Create_Event_Group()NU_Delete_Event_Group()NU_Retrie
37、ve_Events()NU_Set_Events()NU_Established_Event_Groups()NU_Event_Group_Information()NU_Event_Group_Pointers()Many tasks can be utilizing an event group.Multiple meanings per event group.*T3*T211111000printEvent GroupsTask SynchronizationNU_Register_Signal_Handler()NU_Control_Signals()NU_Receive_Signa
38、ls()NU_Send_Signal()Sent to a specific task.One meaning per signal.Task PTask 2Task 1EPEPSignalsTask SynchronizationProtection - “monitor surrounding Nucleus PLUS service callsprevents disabling of interruptsprevents priority inversion ProtectionCritical Sections / ReentrancyUnprotectProtectTimersNU
39、_Control_Timer()NU_Delete_Timer()NU_Reset_Timer()NU_Create_Timer()NU_Established_Timers()NU_Timer_Information()NU_Timer_Pointers()expiration_routine() do_something_now()Expiration routine is executed when timer expires.System ClockNU_Set_Clock()NU_Retrieve_Clock()NU_Allocate_Partition()NU_Deallocate_Partitio
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公共資源交易中心個人工作總結
- 關于清產核資工作方案
- 體育場活動看臺及踏步設計方案
- 正規(guī)京津冀員工合同書
- 招聘意向書和勞務合同
- 院墻修建合同
- Nateglinide-Standard-A4166-Standard-生命科學試劑-MCE
- 辦公室室內裝修工程施工組織方案
- 商貿行業(yè)公司生產安全事故應急預案
- 路燈安裝專項施工方案
- 2023-2024學年北京海淀區(qū)首都師大附中初二(上)期中道法試題及答案
- 2024河南鄭州熱力集團限公司招聘公開引進高層次人才和急需緊缺人才筆試參考題庫(共500題)答案詳解版
- 英語默寫版-高考英語詞匯3500詞
- 空氣源熱泵機房系統(tǒng)施工安全生產保證措施
- 二級公立醫(yī)院績效考核三級手術目錄(2020版)
- 設備采購 投標方案(技術方案)
- 新蘇教版六年級上冊《科學》全一冊全部課件(含19課時)
- 公共關系學完整教學課件
- 韋氏布氏維氏巴氏硬度換算表
- 淺談城市燃氣管網安全運行存在問題及處理對策
- 四環(huán)節(jié)五步驟教學心得體會(共7篇)
評論
0/150
提交評論