版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Nucleus PLUS 培训内容引见ATI公司产品实时操作系统根本概念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+实时操作系统根本概念A single task/* Main control of program */main() . do_something(); ./* A funct
5、ion to do something */void do_something() .一切运用在一个义务中实现单一执行指针单一存储空间单义务系统 义务与义务调度 多个义务竞争运用CPU多个执行指针多个存储空间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多义务系统 义务与义务调度 实时操作系统担任义务调度:基于优先级抢先调度时间片轮询调度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 - 预备执行Running - 正在执行Suspended - 等待某条件发生Finished - 义务执行完成义务形状义务与义务调度 ReadySuspendedRunningFinished优先级当前义务形状堆栈指针.义务控制块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 多个义务同时对同一存储区访问将导致数据被破坏。苛刻性资源/可重入性 Task-1Task-2Variable X,Ymemoryenabledisable队列管理苛刻性资源/可重入性分区内存管理内存分配是预定的,且分区长度固定。动态内存管理内存分配大小可变内存管理T1T3T2分区内存管理内存管理heap100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes200bytes100bytes50byteshea
11、p动态内存管理内存管理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 驱动定时器系统时钟定时器与系统时钟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. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 公司转让合同正式版模板
- 北京房屋出租合同正规版范本
- 餐厨废弃油脂收集运输服务协议
- 安徽省合肥市2024年七年级上学期期中数学试卷【附答案】
- 5.1 人类面临的主要环境问题 课件高一下学期 地理 人教版(2019)必修二
- 4.1陆地水体间的相互关系课件高中地理人教版(2019)选择性必修一
- 浙江省杭州市高三高考命题比赛地理试题4
- 高三政治二轮复习生活与哲学专题四历史唯物主义练习
- 第8课 中国古代的法治与教化 课件高二上学期历史统编版(2019)选择性必修1
- 第6课 古代人类的迁徙和区域文化的形成 课件高二下学期历史统编版(2019)选择性必修3文化交流与传播
- 2023-2024学年北京海淀区首都师大附中初二(上)期中道法试题及答案
- 2024河南郑州热力集团限公司招聘公开引进高层次人才和急需紧缺人才笔试参考题库(共500题)答案详解版
- 空气源热泵机房系统施工安全生产保证措施
- 设备采购 投标方案(技术方案)
- 新苏教版六年级上册《科学》全一册全部课件(含19课时)
- 公共关系学完整教学课件
- 八年级语文上册期中文言文默写(含答案)
- 江仓六号井社会稳定风险评估报告
- 韦氏布氏维氏巴氏硬度换算表
- 浅谈城市燃气管网安全运行存在问题及处理对策
- 四环节五步骤教学心得体会(共7篇)
评论
0/150
提交评论