Multithreading models in Operating System
About Multithreading in OS
On this page, we will learn the concepts of various multi-threading models in operating system. In multi-threading, multiple user threads can be created as many as required and the corresponding kernel threads run in parallel over multiprocessor machine.We will learn about the concepts and various types of multithreading.
Many To One Model
- Many User Level Threads are mapped to one Kernel level Thread.
- Does Not support parallel processing of threads in Multicore systems, Because only 1 thread can access kernel at a particular time.
- If 1 thread makes a blocking call, then entire process will stop.
- This is rarely used, mainly cause it does not support Multicore system.
One To One Model
- Each of User thread is mapped to kernel thread.
- Provides more concurrency.
- Whole process does not gets blocked when 1 thread makes a blocking call as other threads can run.
- Creates Overhead as every User thread requires to create the corresponding Kernel Thread for it.
- Supports a particular number of thread only, cause of the overhead caused due to creation of Kernel Level Thread.
- Implemented By Linux and Windows Operating System.
Many to Many Model
- Multiple User Threads are multiplexed to same or less number of Kernel threads.
- This is the best among the three models, as it improves on shortcoming of one to one model and many to one model.
- We can create as number of User Threads as we want, unlike One to One Model.
- There is no issue of process blocking and threads can run parallelly in multiprocess system unlike Many To One Model.
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others
Login/Signup to comment