in Unknown Category
1,089 views
4 votes
4 votes

Degree of concurrency in threads can be arranged in the manner

  1.  One-to-one > many-to-one > many-to-many
  2.  One-to-one > many-to-many > many-to-one
  3.  Many-to-many > many-to-one > one-to-one
  4.  None of the above

answer given is A but according to me answer is B. Someone please confirm

in Unknown Category
1.1k views

2 Answers

4 votes
4 votes
Answer should be B.

Many to many is model overcomes the disadvantages of one to one and many to one.

In many to one, programmer can make as many threads as she wants. The good thing about this is there is no support required by the OS when switching from one thread to other(switching is fast). The bad thing is all the user threads mapped to one kernel thread cannot be run concurrently even in multiprocessor system. The kernel is not aware of any thread at user level.

In one to one, the good thing is threads can run in parallel in multiprocessor system. Each kernel thread can be run on one processor. The bad thing is the threading concept is totally overlooked. Now switching between threads is a time consuming operation because it involves switching between kernel level threads as well.

 

Operating system by Galvin 9th edition will be a good read.
0 votes
0 votes

It should be B .  many to many offers more concurrency than many to one  as there  are multiple kernel level threads

https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/4_Threads.html

Related questions