大型软件测试系统Nucleus PLUS 培训资料.ppt
-
资源ID:78664960
资源大小:366KB
全文页数:80页
- 资源格式: PPT
下载积分:30金币
快捷下载
![游客一键下载](/images/hot.gif)
会员登录下载
微信登录下载
三方登录下载:
微信扫一扫登录
友情提示
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
|
大型软件测试系统Nucleus PLUS 培训资料.ppt
Nucleus PLUS 培训内容介绍ATI公司产品实时操作系统基本概念Nucleus PLUS及APIImplementationATI 产品KernelsNetworkingSupporting ProductsPrototyping-Cross DevelopmentPrototyping-Cross DevelopmentDebugging ToolsDebugging ToolsC+PLUSJViNETSNMPRMONSPANWebServCLIBGRAFIXFILEATI实时内核ATI网络部件ATI支持部件调试工具原型设计工具ATI产品 NetworkingSupporting ProductsPrototyping-Cross DevelopmentPrototyping-Cross DevelopmentDebugging ToolsDebugging ToolsJViNETSNMPRMONSPANWebServCLIBGRAFIXFILEKernelsC+PLUSNucleus PLUSNucleus C+实时内核 ATI产品 网络部件 ATI产品 Supporting ProductsPrototyping-Cross DevelopmentPrototyping-Cross DevelopmentDebugging ToolsDebugging ToolsCLIBGRAFIXFILEKernelsC+PLUSNetworkingJViNETSNMPRMONSPANWebServNETSNMPRMONSPANWebServJViPrototyping-Cross DevelopmentPrototyping-Cross DevelopmentDebugging ToolsDebugging ToolsKernelsC+PLUSNetworkingJViNETSNMPRMONSPANWebServGRAFIXFILECLIBSupporting ProductsCLIBGRAFIXFILE支持部件 ATI产品 Prototyping-Cross DevelopmentPrototyping-Cross DevelopmentKernelsNetworkingSupporting ProductsDebugging ToolsDebugging ToolsC+PLUSJViNETSNMPRMONSPANWebServCLIBGRAFIXFILEDBUG+UDBDebugger Integration调试工具 ATI产品 Prototyping-Cross DevelopmentPrototyping-Cross DevelopmentKernelsNetworkingSupporting ProductsDebugging ToolsDebugging ToolsC+PLUSJViNETSNMPRMONSPANWebServCLIBGRAFIXFILE原型设计工具 ATI产品 PTHREADSVNETNucleus EDEMNTPC+实时操作系统基本概念A single task/*Main control of program*/main().do_something();./*A function 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 do_something()/*Main control of program*/main()do_something();/*A function to do something*/void do_something()Task 2Task 1多任务系统 任务与任务调度 实时操作系统负责任务调度:O基于优先级抢先调度O时间片轮询调度OFIFO调度Task 1Task 2Task 3Task 4任务调度 任务与任务调度.highest priority (0)lowest priority(255).Task List(255)Task List(0)Task-10Task-20Task-30Task-1255Task-2255Task-3255任务调度任务与任务调度 Ready-准备执行Running-正在执行Suspended-等待某条件发生Finished-任务执行完成任务状态任务与任务调度 ReadySuspendedRunningFinished优先级当前任务状态堆栈指针.任务控制块TCBPriorityStateStack*任务属性任务与任务调度 CPU状态-CPU的当前状态包含在CPU寄存器中:O通用寄存器O程序指针O状态寄存器O.文本切换任务与任务状态 CPURegister 1Register 2Register 3stackRegister 1Register 2Register 3Register 4Register 5Register 6Register 4Register 5Register 6Register 1Register 2Register 3Register 4Register 5Register 6Register 1Register 2Register 3Register 4Register 5Register 6文本切换任务与任务调度 任务间通信任务间通信在两个或多个任务间传送数O信箱MailboxesO队列QueuesO管道Pipes信息长度固定开销小一次传送一个信息Task YTask X1 Message信箱任务间通信 容纳多个信息信息长度可固定或变长用于在任务间传送大容量信息Task YTask X队列与管道任务间通信 任务间同步任务间同步协调(同步)任务间控制O信号量SemaphoresO事件EventsO信号SignalsTask 3Task 2Task 1Device 1Device 2Task 3必须等待资源释放。.信号量用于对冲突性资源进行存取控制信号量任务间同步 40 hours$10/hour20%*T3*T2111print11000事件任务间同步 00000000000000000000000000000000111属于某一特定任务异步方式工作信号任务间同步 Task 2Task PTask 1EPEPsignal_handler 多个任务同时对同一存储区访问将导致数据被破坏。苛刻性资源/可重入性 Task-1Task-2Variable X,Ymemoryenabledisable队列管理苛刻性资源/可重入性分区内存管理O内存分配是预定的,且分区长度固定。动态内存管理O内存分配大小可变内存管理T1T3T2分区内存管理内存管理heap100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes100bytes200bytes100bytes50bytesheap动态内存管理内存管理T1T2T3200bytes50bytes100bytes200bytes50bytes100bytes中断可使得CPU对外部事件异步响应;中断处理必须在短时间内快速响应;.采用保护机制以保护数据不被破坏:O禁止中断O其他措施(LISR/HISR)Device 1IXAn external device completes a task,which causes interrupt X to be issued.interrupt_service_routine()handle_the_interrupt()The Interrupt Service Routine is 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 SynchronizationTimerMemoryInterruptI/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-30Task 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 returned 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 CommunicationCreate/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 CommunicationCreate/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 Communication100bytes100bytes100bytes100bytes100bytes100bytesT1T2100bytes100bytes100bytes100bytescommunication“queue”Task Communication(Optimization)100bytes100bytes100bytes100bytes100bytes100bytesT1T3100bytes100bytescommunication“queue”Create/DeleteObtain/ReleaseResetInformationNumber of semaphoresRetrieve list of semaphoresSemaphoresTask 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 SynchronizationRegister/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.System ClockSet/Retrieve system clockCreate/DeleteAllocate/DeallocateRetrieve list of memory partitionsPartitionedMemory ManagementT3100bytes100bytesT1T2100bytes100bytes100bytes100bytes100bytesInitializeCreate/DeleteAllocate/DeallocateRetrieve list of memory poolsDynamicMemory Management200b100b50bheapDevice 1IXAn external device completes a task,which causes interrupt X to be issued.interrupt_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-enabledInterruptsMinimal ISRLow Level Interrupt Service Routines(LISR)Osaves and restores contextOrestricts interaction with tasking environmentHigh Level Interrupt Service Routines(HISR)O“super”threads with priorityOcan make kernel calls but cannot suspendLISR&HISRInterruptsHISRXLISRLISRZLISRYLISRXHISRYHISRZDeviceHISRXLISRLISRZLISRYLISRXHISRYHISRZDeviceLISR does limited amount of processing.HISR is scheduled.Interrupts are disabled for a shorter amount of time.LISR&HISRInterruptsTCBTCBTCBTasksHISRHCBHCBHISR SchedulingInterruptsHISRXLISRLISRZLISRYLISRXHISRYHISRZDeviceInterruptsCreate/Delete 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 EntryRetrieve 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 ControlTimer ControlLow Level Assembly CodeSource File StructurePointers to control blocksLinked listsProtection structuresSuspension structuresTimeoutsReturn statusInformational servicesCreating componentsDeleting componentsGeneric Component StructureSource File StructureCreation and Deletion of ObjectsOControl Block-you define location anywhere in memoryOMemory Requirements-data needed for components(e.g.,task stack,queue space,etc.)TimeoutsOAny kernel request that can result in suspension provides a timeout parameterOtimeouts-immediate return,forever,clock ticksCommon ComponentsInformational Serviceswhow manywpointers towinformationCommon Components0 x1000 x2000 x3000 x1000 x2000 x300Poolpool_namestart_addresspool_sizepartition_sizeavailableallocatedsuspend_typetasks_suspendedfirst _taskstatusCommon ComponentsApplication_Initialize()OCreate dynamic memory poolwNU_Create_Memory_Pool()OCreate TaskswNU_Allocate_Memory()wNU_Create_Task()OCreate other system objects(optional)wNU_Create_Queue()wNU_Create_Semaphore()wNOTE-Interrupts disabled during Application_Initialize()CodeSystem Startup.data(initialized data).code.bss(uninitialized data)first_available_memory_addressapplication 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_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()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_Queues()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_Front_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 CommunicationNU_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_Retrieve_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_Signals()NU_Send_Signal()Sent to a specific task.One meaning per signal.Task PTask 2Task 1EPEPSignalsTask SynchronizationProtection-“monitor”surrounding Nucleus PLUS service callsOprevents disabling of interruptsOprevents priority inversion ProtectionCritical Sections/ReentrancyUnprotectProtectTimersNU_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_Partition()NU_Create_Partition_Pool()NU_Delete_Partition_Pool()NU_Established_Partition_Pools()NU_Partition_Pool_Information()NU_Partition_Pool_Pointers()Fixed length partitions.Deterministic because of fixed size memory areas.PartitionedMemory Management100 bytesT1100 bytes100 bytes100 bytes100 bytesT2100 bytesNU_Allocate_Memory()NU_Deallocate_Memory()NU_Create_Memory_Pool()NU_Delete_Memory_Pool()NU_Established_Memory_Pools()NU_Memory_Pool_Information()NU_Memory_Pool_Pointers()Variable length partitions.First-fit searching algorithm for memory location.Non-Deterministic because of variable size memory areas.DynamicMemory ManagementNU_Register_LISR()NU_Create_HISR()NU_Delete_HISR()NU_HISR_Information()NU_Activate_HISR()NU_Current_HISR_Pointer()NU_Established_HISRs()NU_HISR_Pointers()NU_Control_Interrupts()NU_Local_Control_Interrupts()NU_Setup_Vector()HISRXLISRLISRZLISRYLISRXHISRYHISRZDeviceInterruptsNU_Established_Drivers()NU_Driver_Pointers()NU_ProtectNU_UnprotectDeviceDeviceDriverInterfaceIO_Input()IO_OutputI/O TaskI/O DriversNU_Create_Driver()NU_Delete_Driver()NU_Request_Driver()NU_Suspend_Driver()NU_Resume_Driver()NU_Disable_History_Saving()NU_Enable_History_Saving()NU_Make_History_Entry()NU_Retrieve_History_Entry()NU_Release_Information()NU_License_Information()Development Services