In: Computer Science
Using the 7 state process model introduced in lecture, describe each state and the transitions between them. Explain how this model developed from the simple FCFS model implemented on batch systems.
A process is nothing but a program in execution. In a multiprogramming environment,CPU switches between process to process.A scheduler is actually using for this purpose.So, during the life time the process have to undergo so many states and this is described with the help of a process model.There are different models like 2 state,5 state and 7 state process models.As the name implies the number represents the number of states.In the case of 7 state model,there will be 7 states. The states and transition are described below:
1.New: The process is just created,but not entered into executable process queue,still in secondary memory and the OS have to pick up from there.
2. Ready: After created , the process enters into ready state.That means the process is loaded into main memory.It is ready to be run and waiting for its turn from the service of CPU.
3. Run: When the CPU is selected the process to run,it enters into run state.During this state CPU will execute the instructions of this process.
4. Blocked/wait state: During the execution,the process may in need of any other resources.It may be I/O or some critical region access etc.At this situation process will go into wait state and it doesnt require CPU. After getting service from the I/O again it goes back to the ready state.
5. Terminated/completed: The process is terminated.At this state process control block(where the process information stored)also gets deleted.
6. suspend ready: This state occurs when the process which is in ready state is swapped to secondary memory from main memory.It will back to the ready state when the scheduler switch back the process from secondary to main memory.
7. suspend wait/suspend block: It is similar to suspend ready but the difference is selected process which swap to secondary memory are the one who are waiting for some I/O or may have lack of memory to execute.When the I/O is complete it goes back to suspend ready state.
FCFS in batch systems are First Come First Serve. Here whoever is ready first will get serviced initially.Only after the full execution the particular process, another will get the chance.The processor efficiency cannot be fully utilized by this method.For example,if the process is waiting for some I/O ,the processor will be idle.Actually we can make use of CPU to run another process.Multiprogramming concept cannot be worked out for such systems.But according to the current process model the CPU will support the multiprogramming concept.