Thread Models in Operating System

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

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.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.