Welcome to graduate2professional.blogspot.com

Monday, June 1, 2009

FAQs on Vxworks tasks

Q: What is a task in VxWorks?
A: A task is an independent program with its own thread of execution and execution context. VxWorks uses a single common address space for all tasks thus avoiding virtual-to-physical memory mapping. Every task contains a structure called the task control block that is responsible for managing the task's context.
Q: How do task's manage the context of execution ?
A: Every task contains a structure called the task control block that is responsible for managing the task's context. A task's context includes
· program counter or thread of execution· CPU registers· Stack of dynamic variables and function calls· Signal handlers· IO assignments· Kernel control structures etc.,
Q: What are the Different states of tasks?
A task has 4 states. Read, Pend, Delay, Suspended
Q: Explain the task State transition ?
A: A task can be created with taskInit() and then activated with taskActivate() routine or both these actions can be performed in a single step using taskSpawn(). Once a task is created it is set to the suspend state and suspended until it is activated, after which it is added to the ready queue to be picked up by the scheduler and run. A task may be suspended by either the debugging your task, or the occurrence an exception. The difference between the pend and suspend states is that a task pends when it is waiting for a resource. A task that is put to sleep is added to delay queue.

No comments:

Post a Comment