# Thread Scheduling
## user-level thread
* 對應到一個kernel-level thread
* kernel 不知道user-level thread的存在
* 由thread libary管理
* schedules user-level threads to run on an available LWP
## PCS
* process-contention scope
* Done by thread library
* Many-to-One or Many-to-Many mode
* Linux and Mac OS X
* 4 methods
1. Synchronization
2. Preemption
3. Yielding
4. Time-slicing
## kernel-level thread
* scheduled by the OS
## SCS
* system-contention scope
* Systems using the one-to-one model (such as Windows XP) schedule threads using only SCS.
[HOME PAGE](/bKDZoNkrT9SOBnTvY_aj2Q?view) :sleepy:
{%hackmd theme-dark %}
###### tags: `OS` `CSIE`