previous | start | next

Multiple Kernel Threads

What does this mean?

In this model we still have a user level thread library but the operating system now views a user process as potentially multithreaded. So the operating system may now schedules multiple threads that area all part of one process. However, the correspondence is not necessarily one-to-one. For example, more library user level threads may be created than the kernel schedules. E.g., a user program uses the user level library to create 6 threads. The user level library makes system calls and asks the kernel for 3 threads (scheduled by the kernel).

The user library then does its own scheduling of the 6 user level threads using the 3 threads known to the kernel. If one of the 6 threads makes a system call (not a thread library call) and blocks, then kernel changes the state of the thread to blocked. But that leaves 2 threads the kernel may still schedule. So the other 5 threads in the user process may still have a chance to execute.

Solaris used a version of this model (now changed).



previous | start | next