|
|
|
|
|
by codebje
2540 days ago
|
|
The OS thread model is lightweight processes - each OS thread is essentially a separate process sharing a common section of the process control block. Context switches are still relatively heavyweight involving a kernel mode switch, CPU state save and restore. Application threads are a part of the application runtime environment. Thread scheduling is little more than a function call and doesn't involve a syscall invocation, and can be hooked into runtime environment trigger mechanisms. Kernels have to be one size fits all, application threads can be tuned more precisely, with greater visibility over the application's state. |
|