Six-State Process Model in Operating System
Last Updated :
12 Sep, 2022
In this article, we are going to discuss the Six-State Process Model in Operating Systems and we will also understand what was the need for introducing these process models, what are the states present in these process models, and all the possible transitions that can occur in these models.
Need for Six-State Process Model:
The Five-State process model was a standard model consisting of the five main states of the process life-cycle i.e.,
- Running
- Ready
- Blocked/Waiting
- New
- Exit/Termination.
But there was a problem that may occur in these models, Let's discuss the problem with an example.
Suppose, there is a scenario where lots of processes are coming for execution and requesting for CPU and all the processes are I/O intensive processes as we all know that the I/O task of the process is handled by the I/O processor and the process resides in the blocked/waiting state while executing on the I/O processor and CPU is way faster than the I/O processor. So all these processes are waiting in a queue inside the blocked/waiting state for the I/O processor.
As we also know that this blocked/waiting state shares a common space with the Ready queue in the RAM. i.e. Both of these queues reside inside the RAM. Now, suppose the scenario where the RAM is filled by the Blocked/Waiting queue as all the process that is coming is I/O intensive process. In this scenario, our system will not be able to load any New process into the Ready queue as the RAM is already filled by these Blocked/Waiting state queues and due to these a New process cannot be able to load into the Ready queue and meanwhile, our CPU will also remain idle at that time and it will directly impact the performance of the system and as our main goal is to use the CPU efficiently, this problem should be solved.
To overcome these problems, the concept of "Virtual Memory" is used and the Six-State process model is introduced with slight changes in the Five-State process model.
States present in these models:
- New State
- Ready State
- Running State
- Blocked/Waiting State
- Exit/Termination State
And the new state that is added to these models is:
Execution of Process in Six-State Process Model:
In these models, all the processes of execution will be exactly the same as in the Five-State Process Model, and the additional state of these models is only used when the blocked/waiting queue is full. Suppose, as we have discussed in the example earlier that lots of I/O intensive process comes for execution at the same time and our blocked/waiting queue gets filled at that time we will move all the other process into the secondary memory and will load it whenever required or when the space gets empty by using the concept of virtual memory.
Six-state process modelPossible State Transitions:
1. Null → New: A new process is created for execution.
2. New → Ready: The newly created process which is ready to execute on the CPU and is waiting for it to get free is moved here in the ready state. There can be multiple processes in these states at a time.
3. Ready → Running: The Selected process is moved into the Running state where it will get the CPU for executing its tasks. There can be at most one process in the Running state at a time.
4. Running → Exit: The process whose execution gets over will be terminated and moved into the Exit state.
5. Running → Ready: When the process has reached its maximum time limit of execution or when a high priority process came for execution, the process currently present in the running state will be moved into the ready state.
6. Running → Blocked: When the process is waiting for some event to occur the process will be moved to the Blocked state from the Running state.
7. Blocked → Ready: A process will be moved back into the ready state when the event that it has been waiting for occurs.
8. Ready → Exit: This will only happen when the parent process of the current process gets terminated or it requests explicitly to terminate the child process.
9. Blocked → Suspend: When the Blocked queue gets filled with the processes then some of the processes from the blocked queue will be moved into the Suspend state. Suspend state exists in the secondary memory by using the concept of virtual memory.
10. Suspend → Blocked: When the Space gets available into the Blocked state then the process that has been put into the Suspend state will be moved back into the Blocked State.
11. Suspend → Ready: When the event has occurred for the process that has been waiting into the suspend state in the secondary memory then it will be directly moved into the Ready state.
Six-State Process Model in Operating System
Similar Reads
5 State Process Model in Operating System In an operating system (OS), managing how programs run and interact with system resources is crucial for efficient performance. The 5-state process model is a fundamental framework used by OSs to categorize and control the behavior of processes, which are individual instances of programs running on
6 min read
Two State Process Model in Operating System The process in an operating system passes from different states starting from its formation to its completion. A process consists of program data and its associated data and a process control block (PCB). A process may change its state because of the following events like I/O requests, interrupt rou
5 min read
Three State Process Model in Operating System Pre-requisites: States of a Process in Operating Systems, Two-State Process Model in Operating SystemIn this article, we'll be discussing a three-state process model in an operating system and also discussing the need for this process model, how the process executes, what will be the possible transi
4 min read
States of a Process in Operating Systems In an operating system, a process is a program that is being executed. During its execution, a process goes through different states. Understanding these states helps us see how the operating system manages processes, ensuring that the computer runs efficiently. Please refer Process in Operating Sys
11 min read
Process in Operating System A process is a program in execution. For example, when we write a program in C or C++ and compile it, the compiler creates binary code. The original code and binary code are both programs. When we actually run the binary code, it becomes a process. A process is an 'active' entity instead of a progra
3 min read
Multi Processing Operating System The operating system functions like a manager of all the available resources. Therefore operating system is defined as an interface between the system and the user. There are various types of operating systems such as Batch Operating Systems, Multi-programming Operating Systems, distributed operatin
4 min read