When the jobs moves through the system and makes progress, it changes it’s states from HOLD to FINISH. When the job is being processed by the job manager and the process manager, it is always in one of these 5 states:
When a user submits a job and it accepts the job, the job is put on HOLD and placed in a queue.
A job is in READY state when it’s ready to run and waiting for the CPU.
When a job is in RUNNING state, it is being executed.
When a job is in WAITING state, it means that the job can’t continue until a specified I/O operation is done or a resource is allocated.
When a job is in FINISHED state, it means that the job is done and the output will be returned to the user.
The transition of a job from one to another or from one state to another is done according to some specific algorithms by job scheduler or process scheduler:
- The transition from HOLD to READY is done by the job scheduler according to availability of main memory space and some specific policies.
- The transition from READY to RUNNING is done by the process scheduler (to decide which job will be done first) according to some algorithms (e.g. FCFS).
- The transition from RUNNING back to READY is done by process scheduler according to some criterion (e.g. Priority Interrupt).
- The transition from RUNNING to WAITING is done by process scheduler when some I/O request is encountered in the job itself or some resource allocation is required.
- The transition from WAITING to READY is done by the process scheduler when the requirements needed by the jobs are satisfied (I/O request satisfied).
- The transition from RUNNING to FINISHED is done by the process scheduler in 2 condition:
- (i) When the job is successfully done.
- (ii) When an error occurs and the job is terminated prematurely.
- When a job is FINISHED, another job from the queue enters the state of RUNNING from READY.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Completely fair Scheduler (CFS) and Brain Fuck Scheduler (BFS)
- Process Scheduler : PCBs and Queueing
- Difference between dispatcher and scheduler
- Difference between Long-Term and Short-Term Scheduler
- Difference between Long-Term and Medium-Term Scheduler
- Difference between Short-Term and Medium-Term Scheduler
- Generalized Real-time Task Scheduler
- Deadline scheduler in Operating System
- Difference between Shortest Job First (SJF) and Round-Robin (RR) scheduling algorithms
- Difference between Longest Job First (LJF) and Round Robin (RR) scheduling algorithms
- Difference between First Come First Served (FCFS) and Longest Job First (LJF) CPU scheduling algorithms
- Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
- Difference between Priority Scheduling and Longest Job First (LJF)
- Difference between Multi Level Queue Scheduling (MLQ) and Shortest Job First
- Difference between Multi Level Queue Scheduling (MLQ) and Longest Job First (LJF)
- Process Table and Process Control Block (PCB)
- Process states and Transitions in a UNIX Process
- Difference between Process Image and Multi Thread Process image
- Program for Shortest Job First (or SJF) CPU Scheduling | Set 1 (Non- preemptive)
- Program for Shortest Job First (SJF) scheduling | Set 2 (Preemptive)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.