Non Pre-emptive Scheduling
In Non Pre-emptive Scheduling when a process completes its execution, it leaves the CPU. A process can also leave the CPU voluntarily to perform some I\O operation or to wait for an event. Voluntarily means by its own choice, without being forced. The CPU allocated to a process until it terminated or switches to the waiting state. It means that no process interrupted until its completed and no switching overhead. It is the type of CPU scheduling algorithm. CPU utilization of non pre-emptive scheduling is lower than pre-emptive scheduling. It is not flexible. There are four most important types of pre-emptive scheduling are given below.

Real Life Example
Suppose there students wants to print their documents using one printer. The printer starts the first students document. The other student must be wait until the first document is completely printed.
| Note: The printer finishes one job before starting another. |
Examples of Non Pre-Emptive Scheduling Algorithm
- First Come First Serve (FCFS)
- Shortest Job First (SJF)
- Longest Job First (LJF)
Types of Non Pre-Emptive Scheduling
There are four most important types of Non Pre-Emptive Scheduling as given below.
i) First Come First Serve (FCFS)
ii) Shortest Job First (SJF)
iii) Longest Job First (LJF)
iv) Highest Ratio Response Next (HRRN)
1. First Come First Serve (FCFS)
FCFS stand for First Come First Serve. FCFS is assign CPU to the process which arrive first. It means that first come first serve. It is easy to understand and can be easily be implemented using queue data structure. It always a non pre-emptive in nature.
| Note: The nature of the FCFS always be a Non Pre-Emptive. |
Real Life Example
In a bank, the customer who comes first is served first. The other customers wait for their turn. So, this process is also called First Come First Serve (FCFS).
2. Shortest Job First (SJF)
SJF stand for Shortest Job First. In this method, out of all available process CPU is assigned to the process having the shortest burst time requirements. It means that it does not depend on the priority or seniority. If two processes have the same burst time, FCFS is used to break the tie. This method helps to reduce the average waiting time. Shorter processes finishes quickly, while longer processes may wait more.
| Note: In Shortest Job First (SJF) short processes complete first, which longer processes may wait. |
Real Life Example
Suppose five students want to print their documents. The printer prints the document with the fewest pages first. Student with longer documents wait for their turn. It means that no priority or seniority.
3. Longest Job First (LJF)
LJF stand for Longest Job First. In longest job first CPU is assign to the process having largest burst time among all the available process. If two processes have the same burst time, FCFS is used to break the tie. LJF can be used in both preemptive and non preemptive scheduling. Pre-emptive version of Longest Job First (LJF) is known as Longest Remaining Time First (LRTF).
| Note: In LJF CPU is assign to the process having largest burst time among all the available process. |
Real Life Example
A printer selects the document with the largest number of pages first. After completing it, the printer prints smaller documents.
4. Highest Ratio Response Next (HRRN)
HRRN stand for Highest Ratio Response Next. It is similar to the shortest job next (SJN), in which the priority of each job is dependent on its estimated run time, and also the amount of time it has spent waiting. Jobs gain higher priority the longer they wait, which prevents indefinite waiting or other words say in starvation. In fact, the jobs that have a spent long time waiting complete again those estimated to have short run times.
| Note: Starvation means that a process waits for a very long time without getting the CPU. |
Real Life Example
A printer prints the document with the largest number of pages first. After completing it, the printer prints smaller documents.
Formula