AfterAcademy Tech
•
01 May 2020

You are already aware of the term multitasking that allows processes to run concurrently. Similarly, multithreading allows sub-processes (threads) to run concurrently or parallelly. Also, we can say that when multiple threads run concurrently it is known as multithreading. Some widely used programming languages like Java and Python allow developers to work on threads in their program. In this blog, we will learn what are the various multithreading models and the benefits of multithreading in OS. So, let's get started.
Multithreading is a phenomenon of executing multiple threads at the same time. To understand the concept of multithreading, you must understand what is a thread and a process.
A process is a program in execution. A process can further be divided into sub-processes known as threads. Please refer to the previous blog for more details. Example: Playing a video and downloading it at the same time is an example of multithreading.
As we have two types of thread i.e. user-level thread and kernel-level thread. So, for these threads to function together there must exist a relationship between them. This relation is established by using Multithreading Models. There are three common ways of establishing this relationship.
As the name suggests there is many to one relationship between threads. Here, multiple user threads are associated or mapped with one kernel thread. The thread management is done on the user level so it is more efficient.

From the name itself, we can understand the one user thread to mapped to one kernel thread.

From the name itself, we can understand the many user threads to mapped to a smaller or equal number of kernel threads. The number of kernel threads is specific to a particular application or machine.

So, this is the best model that we can have in a multithreading system to establish the relationship between user-thread and kernel thread.
This was about multithreading and its models. Hope you learned something new today.
Do share this blog with your friends to spread the knowledge. Visit our YouTube channel for more content. You can read more blogs from here.
Keep Learning 🙂
Team AfterAcademy!
AfterAcademy Tech
In this blog, we will learn about the concept of subnetting, why it is done and how it is done. Further, we will learn about supernetting, why it is done and how it is done. We will also see how the supernet mask of any network is calculated.

AfterAcademy Tech
In this blog, we will learn about the concept of hashing in programming. We will learn about Direct Address Table, Hash Table, Hash Function, a collision in Hash table. So, let's get started.

AfterAcademy Tech
In this blog, we will learn about threads and its two types i.e. user-level thread and kernel-level thread. We will also see what are the advantages of using threads in the OS. Finally, we will learn about the difference between process and thread

AfterAcademy Tech
Stack is a very useful concept that a good programmer could use for their benefit. We will be discussing the basic design of stack and the operations that can be performed on it. We shall be also discussing the implementation of stack.
