arrow
arrow
arrow
Consider the following processes, all arriving at time 0, with their respective burst times: Process Burst Time (ms) P1 6 P2 8
Question

Consider the following processes, all arriving at time 0, with their respective burst times:

Process

Burst Time (ms)

P1

6

P2

8

P3

7

P4

3

Using Non-Preemptive Shortest Job First (SJF) scheduling, calculate the average waiting time.

A.

7.0 ms

B.

5.5 ms

C.

6.25 ms

D.

5.0 ms

E.

6.0 ms

Correct option is A

In Non-Preemptive Shortest Job First (SJF) scheduling, the process with the smallest burst time executes first.

Execution Order:

  • P4 = 3 ms
  • P1 = 6 ms
  • P3 = 7 ms
  • P2 = 8 ms

Waiting Times:

  • P4 = 0 ms
  • P1 = 3 ms
  • P3 = 3 + 6 = 9 ms
  • P2 = 3 + 6 + 7 = 16 ms

Average Waiting Time:

Average Waiting Time = 0+3+9+164=284=7.0 ms\frac{0 + 3 + 9 + 16}{4} = \frac{28}{4} = 7.0 \text{ ms}​​

Therefore, the average waiting time is 7.0 ms.

Important Key Points:

  1. SJF scheduling executes the process with the shortest burst time first.
  2. In Non-Preemptive SJF, once a process starts execution, it cannot be interrupted.
  3. Waiting time is calculated as the total time a process waits before execution.
  4. SJF generally provides the minimum average waiting time among scheduling algorithms.

Knowledge Booster:

  1. (b) 5.5 ms: Incorrect because the waiting times are not calculated correctly according to SJF execution order.
  2. (c) 6.25 ms: Incorrect because this value results from an incorrect summation of waiting times.
  3. (d) 5.0 ms: Incorrect as per the actual calculation; the correct average waiting time is 7.0 ms.
  4. (e) 6.0 ms: Incorrect because the computed average waiting time does not equal 6.0 ms.

Free Tests

Free
Must Attempt

SBI Clerk Prelims Full Mock Test-01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Prelims 2026 : Quantitative Aptitude Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
test-prime-package

Access ‘IBPS SO IT Officer’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
446k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow