Operating System

Multithreading Models

Multithreading Models

Some operating systems provide a combined user-level thread and a kernel-level thread installation. In a mutual system, multiple threads in the identical application can run in corresponding on multiple processors and a blocking system call no need to block the whole process. There are three types of multithreading models which are:

  1. Many to many relationship.
  2. Many to one relationship.
  3. One to one relationship.

Many to Many Relationship

In this many to many relationships model many user level threads multiplexes to the kernel level threads of equal or smaller in numbers. The number of kernel threads can be specific to a particular application or particular machine. The following diagram shows the model a lot to a lot. In this model, developers can create as many user threads if needed and the corresponding kernel threads can run in parallel on a Multiprocessor.


Many to One Relationship

In case of many to one relationship model many user level threads are multiplexes to the single kernel level thread. User space is used for thread management. Whenever a thread makes a blocking system call the whole process will be blocks. Only a single thread can access the kernel at a time just because of that multiple threads are unable to run parallel on multiprocessor. If the user-level thread libraries are implemented in the operating system so that system does not sustenance them; kernel threads use many-to-one relationship modes. Diagram of many to one relationship is given as.

Many to One Relationship

One to One Relationship

In this case user level threads and kernel level threads are in one to one relationship and this model provides more concurrency then many to many relationship model. One to one relationship supports the parallel multiprogramming in case of multiple threads. Drawback of this model is that generating user thread requires the corresponding Kernel thread. OS/2, windows 2000 and Windows NT use one to one relationship model. Diagram is shown as.

One to One Relationship



NCERT-NOTES Class 6 to 12.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Back to top button