Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Task in vxworks

When we doing taskSpawn a task is creating in vxworks. What is actually a task. Is there any relation with thread.

In my understanding vxworks is thread based Operating system.

Can some one please help me the real difference between task/thread/process in real scenario.

Somewhere I saw task is the execution of set of instruction. If it is like that then thread also have some set of instruction so can we call thread as task.

Please help

like image 883
Sijith Avatar asked Oct 12 '11 16:10

Sijith


1 Answers

Thread is a concept typically used with an OS supporting process models (Unix/Linux/Windows) where you run a process.
This process could have a single thread of execution (like a simple C program). Or you could create multiple threads to perform certain operations in parallel within the current process memory space.

With older vxWorks, there was no process model. Everything would run in the same memory space. A vxWorks tasks provides the context where the system code would execute. All code (with the exception of interrupt handlers) will execute in the context of a Task.

Tasks are independent execution units. They can share resources, have common memory, etc... but the scheduler executes the tasks based on very specific criteria. Typically, the highest priority task in the system is the task that will be executing at any given time.

Once a task is done/sleeps/blocked waiting for resources, then the next highest priority task in the system will run.

For your purpose, you can probably think of the task as a thread.

like image 94
Benoit Avatar answered Sep 28 '22 06:09

Benoit