OS 2 Threads System Calls
OS 2 Threads System Calls
Attributes of thread:
1. thread ID
2. program counter
3. stack pointer
4. registers
5. code counter
6. data counter
7. file counter
● the context of threads is less than the context of the process.
● context of threads stored in thread control block.
● TCB is unique for each thread.
● |TCB|< |PCB| (Size)
1.1. Difference between Process and Thread
4 If one process gets blocked, then Whereas if one thread gets blocked
another process cannot run until the and waiting, a second thread of the
first process is unblocked. same task can execute.
T1
T1 T2 T3
User threads are implemented by users. kernel threads are implemented by OS.
OS doesn’t recognize user level threads. Kernel threads are recognized by OS.