A thread is a light weight process which is similar to a process where every process can have one or more threads. Each thread contains a Stack and a Thread Control Block. There are four basic thread models :
1. User Level Single Thread Model :
- Each process contains a single thread.
- Single process is itself a single thread.
- process table contains an entry for every process by maintaining its PCB.
2. User Level Multi Thread Model :
- Each process contains multiple threads.
- All threads of the process are scheduled by a thread library at user level.
- Thread switching can be done faster than process switching.
- Thread switching is independent of operating system which can be done withing a process.
- Blocking one thread makes blocking of entire process.
- Thread table maintains Thread Control Block of each thread of a process.
- Thread scheduling happens within a process and not known to Kernel.
3. Kernel Level Single Thread Model :
- Each process contains a single thread.
- Thread used here is kernel level thread.
- Process table works as thread table.
4. Kernel Level Multi Thread Model :
- Thread scheduling is done at kernel level.
- Fine grain scheduling is done on a thread basis.
- If a thread blocks, another thread can be scheduled without blocking the whole process.
- Thread scheduling at Kernel process is slower compared to user level thread scheduling.
- Thread switching involves switch.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- Thread in Operating System
- Thread Control Block in Operating System
- Difference between User Level thread and Kernel Level thread
- Relationship between User level thread and Kernel level thread
- Thread States in Operating Systems
- System Protection in Operating System
- User View Vs Hardware View Vs System View of Operating System
- System Programs in Operating System
- File System Implementation in Operating System
- Xv6 Operating System -adding a new system call
- Traps and System Calls in Operating System (OS)
- Multi Threading Models in Process Management
- OSI, TCP/IP and Hybrid models
- Data Models in DBMS
- Process Schedulers in Operating System
- Introduction of Deadlock in Operating System
- Paging in Operating System
- Banker's Algorithm in Operating System
- Segmentation in Operating System
- File Systems in Operating System
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

