A thread is a flow of execution, and a process is a collection of threads.
In the QNX Neutrino RTOS, the schedulable entity is a thread, not a process.
Process and thread fundamentals
Before we start talking about threads, processes, time slices, and all the other wonderful scheduling concepts, let's establish an analogy.
The kernel's role
The house analogy is excellent for getting across the concept of synchronization, but it falls down in one major area. In our house, we had many threads running simultaneously. However in a single-processor system, only one thing can run at once.
Threads and processes
Let's return to our discussion of threads and processes, this time from the perspective of a real live system. Then, we'll take a look at the function calls used to deal with threads and processes.
Scheduling and the real world
So far we've talked about scheduling policies and thread states, but we haven't said much yet about why and when things are rescheduled.