Unformatted text preview:

Presentation1 VxWorks and Process Management CSE 8343 Michael J Lawson 01 14 19 VxWorks Real Time Operating System from Wind River Systems Typically runs on embedded processors Controls robots in automotive factories avionics in fighter aircraft etc 01 14 19 VxWorks Tasks VxWorks is a multitasking system Tasks execute concurrently Similar to processes Task context includes CPU environment PC etc System resources 01 14 19 Task Scheduling Typical state machine pended ready delayed suspended Kernel task schedules which task to run next based on Preemptive Priority Scheduling Priorities 0 255 0 is highest Highest priority tasks run until a higher priority task preempts processor 01 14 19 Task Scheduling II Optional round robin scheduling Only round robins tasks of the same priority Enhances the preemptive priority schema Entire system is either PP or PP RR 01 14 19 Task Transition State Table 01 14 19 ready pended waiting on semaphore or msg ready delayed calling taskDelay sleep ready suspended calling taskSuspend pended ready giving a semaphore or sending msg pended suspended calling taskSuspend delayed ready delay expires delayed suspended calling taskSuspend suspended ready calling taskResume or taskActivate suspended pended calling taskResume suspended delayed calling taskResume Varients from POSIX POSIX Portable Operating System Interface VxWorks can be POSIX compliant POSIX works on processes not tasks POSIX processes inherit some properties from parent processor VxWorks tasks inherit all properties POSIX processes can not address memory directly VxWorks tasks can 01 14 19 Task Creation Deletion Relatively easy to create any C function can be spawned as a task taskSpawn creates task and environment to call C routine Parameters when spawning name priority options stacksize entry point Options Floating point support not setting stack space private environment breakpoint disabling 01 14 19 Task Creation Deletion ctd Any task can try to delete another task given knowledge of the task name or id Tasks can protect themselves from deletion by calling taskSafe Although TCB and stack memory is reclaimed other memory resources allocated by task are not automatically reclaimed 01 14 19 Task Control Blocks 01 14 19 Program counter CPU registers possibly floating pt regs stack dynamic variables function calls IO assigments timers kernel control signal handler debugging information Not in the Task Control Block Memory Address Space In basis OS all tasks share the same memory space Easy to share data via shared memory locations Easy to accidentally overwrite part of memory 01 14 19 Interrupt Schema All Interrupt Service Routines share the same stack if the processor architecture allows There is no Task Control Block Exceptions in ISR tend to result in processor restart ISRs can not block there is no TCB so can only call limited OS routines Any C routine can be an ISR 01 14 19 Standard OS Tasks tUsrRoot First kernel task tLogTask Means to log msg tExcTask Handles task level exceptions tNetTask Network task tWdbTask Target agent task for WindRiver 01 14 19 Optional OS Tasks tShell Target shell shell that runs on processor tRlogind rlogin daemon tTelnetd telnet daemon tPortmapd RPC server daemon 01 14 19 Intertask Communication Shared Memory Memory is a singular linear address space Easy to share global data structures Semaphores Binary mutual exclusion counting semaphores Handle priority inversion problem Message queues Full duplex requires two queues Two priorities of messages urgent normal 01 14 19 Intertask Communication II Pipes Virtual IO devices Can build client servers Sockets and remote procedure calls internetwork communication Signals Similar to interrupt If task signs up for signal and it receives signal it stops executing and starts executing signal handler 01 14 19 References VxWorks Programmer s Guide 5 4 Edition 1 01 14 19


View Full Document
Download VxWorks and Process Management
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view VxWorks and Process Management and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view VxWorks and Process Management and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?