Threads Computer Science Engineering (CSE) Notes | EduRev

Mock Test Series - Computer Science Engg. (CSE) GATE

Computer Science Engineering (CSE) : Threads Computer Science Engineering (CSE) Notes | EduRev

The document Threads Computer Science Engineering (CSE) Notes | EduRev is a part of the Computer Science Engineering (CSE) Course Mock Test Series - Computer Science Engg. (CSE) GATE.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

User Level thread Vs Kernel Level thread

USER LEVEL THREADKERNEL LEVEL THREAD
User thread are implemented by users.kernel threads are implemented by OS.
OS doesn’t recognized user level threads.Kernel threads are recognized by OS.
Implementation of User threads is easy.Implementation of Kernel thread is complicated.
Context switch time is less.Context switch time is more.
Context switch requires no hardware support.Hardware support is needed.
If one user level thread perform blocking operation then entire process will be blocked.If one kernel thread perform blocking operation then another thread can continue execution.
Example : Java thread, POSIX threads.Example : Window Solaris.


Multi threading models

Many operating systems support kernel thread and user thread in a combined way. Example of such system is Solaris. Multi threading model are of three types.

Many to many model.
Many to one model.
one to one model.

Many to Many Model

In this model, we have multiple user threads multiplex to same or lesser number of kernel level threads. Number of kernel level threads are specific to the machine, advantage of this model is if a user thread is blocked we can schedule others user thread to other kernel thread. Thus, System doesn’t block if a particular thread is blocked.

Threads,Operating System,GATE,CSE,ITE

Many to One Model

In this model, we have multiple user threads mapped to one kernel thread. In this model when a user thread makes a blocking system call entire process blocks. As we have only one kernel thread and only one user thread can access kernel at a time, so multiple threads are not able access multiprocessor at the same time.

Threads,Operating System,GATE,CSE,ITE

One to One Model

In this model, one to one relationship between kernel and user thread. In this model multiple thread can run on multiple processor. Problem with this model is that creating a user thread requires the corresponding kernel thread.

Threads,Operating System,GATE,CSE,ITE

Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

Related Searches

Exam

,

Important questions

,

Summary

,

Threads Computer Science Engineering (CSE) Notes | EduRev

,

shortcuts and tricks

,

Threads Computer Science Engineering (CSE) Notes | EduRev

,

Viva Questions

,

past year papers

,

Previous Year Questions with Solutions

,

practice quizzes

,

Objective type Questions

,

mock tests for examination

,

video lectures

,

Extra Questions

,

study material

,

ppt

,

Sample Paper

,

Threads Computer Science Engineering (CSE) Notes | EduRev

,

MCQs

,

Free

,

pdf

,

Semester Notes

;