What is process?
Execution of a program is called process.
A Process in execution will have to pass through different stages viz., New, Ready,Running, Waiting and Termination.
New: A Process which is just created will enter into this stage.
Ready: A Process waiting for the CPU is in this stage.
Running: The Process which is currently using CPU to execute its instruction is in this stage.
Terminated: The Process that finishes its execution will be terminated.
Steps followed in the Process execution:
- A Process when first created will be in New stage , then when it is waiting for CPU time in order to get executed will in ready stage. In Ready stage Process will be waiting for CPU time in Ready Queue (A queue where Process wait for the CPU).
- Once the CPU become free and process acquires it, Process will enter into Running stage where it will execute its instructions. If during this stage if any interrupt occurs then it will move back to ready stage and wait for the scheduler dispatcher. If it has I/O operation then it will move to Waiting stage where it will perform I/O operation and then move back to ready stage and waits for the scheduler dispatcher.
- After the process get executed it will terminate.