List the advantages and disadvantages of User level threads and kernel level threads



 A thread is basic unit of CPU utilization .it is also called light weight process.it is sequence of instructions within process. A thread behaves like process within process but it does not have own PCB. multiple thread are created within process. The multiple thread allows multiple executions

Now days threads use in 

  • threads with python  threads def 
  • threads definition
  • threads java
  • threads clothing


User level threads :  user level thread are implemented in user libraries instead  of system call. The thread switching need to call operating system

advantages: 


  1. the user level thread are fast and efficient.
  2. they can be implemented on any operating system  that does not support threads
  3. they are simple to manage .The switching between threads  can be done without kernel 

Disadvantages:

  1. there is lack of  of coordination between threads  and operating system kernel .The process get  single time slice even  if has large number of threads in it
  2. a multithread application with pure user level threads cannot take advantage  of multi processing. The kernel  assigns only one  process to processor  at a time 

kernel level threads: kernel level threads are supported with  kernel of operating system .All modern operating systems support kernel level threads 

advantages: 
  1. kernel has full knowledge of all threads. Therefore scheduler may decide to give more time to process with large number of threads  than the process have small number of threads.

  2. kernel level threads are good for applications that are blocked  frequently

Disadvantages:

  1. The kernel level threads are slow and inefficient.
  2. kernel must manage and schedule threads as well as process

  3. csi503 operating system Q3 read here






Post a Comment

0 Comments