Consider the following table of arrival time and burst time for three processes P0, P1, P2:

Process arrival time Burst time
P0 0 ms 7
P1 1 ms 3
P2 2 ms 7


The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes? 

This question was previously asked in
UGC NET Computer Science (Paper 2) 17 June 2023 Official Paper
View all UGC NET Papers >
  1. 3 ms 
  2. 3.67 ms
  3. 4.47 ms 
  4. 4 ms

Answer (Detailed Solution Below)

Option 2 : 3.67 ms
Free
UGC NET Paper 1: Held on 21st August 2024 Shift 1
8.7 K Users
50 Questions 100 Marks 60 Mins

Detailed Solution

Download Solution PDF

The correct answer is 3.67 ms

Key PointsIn Shortest Job First (SJF) scheduling, the process with the smallest burst time is processed next. In Preemptive SJF, if a new process arrives with CPU burst length less than remaining time of current executing process, CPU is preempted, and that new process starts execution.

Gantt chart

F1 SSC Priya 6-2-24 D16

Process arrival time Burst time Waiting time
P0 0 ms 7 3
P1 1 ms 3 0
P2 2 ms 7 8

So, the average waiting time is:

(3ms + 0ms + 8ms) / 3 = 3.67ms (rounded to nearest hundredth)

So, the average waiting time for the processes under a preemptive SJF scheduling algorithm is approximately 3.67ms.

Latest UGC NET Updates

Last updated on Jun 6, 2025

-> The UGC NET Exam Schedule 2025 for June has been released on its official website.

-> The UGC NET Application Correction Window 2025 is available from 14th May to 15th May 2025.

-> The UGC NET 2025 online application form submission closed on 12th May 2025.

-> The June 2025 Exam will be conducted from 21st June to 30th June 2025

-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.

-> The exam is conducted bi-annually - in June and December cycles.

-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions. 

-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.

More Process Scheduling Questions

More CPU Scheduling Questions

Get Free Access Now
Hot Links: teen patti master 51 bonus teen patti casino teen patti master golden india teen patti winner teen patti gold new version 2024