Skip to content
Exercise 8 · Q4
Q.

Consider the available processes given below in the ready queue for execution, with arrival time as 0 for all and given burst time. Find the average waiting time using the SJF scheduling algorithm.

ProcessBurst Time
P120
P25
P39
P44
Puducherry CbseNCERTSubjective· 3mImportance★★★★★est
67% · 71/106 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Shortest-Job-First runs the smallest burst first: P4→P2→P3→P1P_4\to P_2\to P_3\to P_1, giving waiting times 0,4,9,180,4,9,18 and an average of 7.757.75 units.

For Shortest-Job-First (SJF, non-preemptive) with all arrivals at t=0t=0, order the processes by increasing burst time; then

Waiting Time of Pi=Start Time of Pi,AWT=1n∑WTi\text{Waiting Time of }P_i = \text{Start Time of }P_i,\qquad \text{AWT}=\frac{1}{n}\sum \text{WT}_i

  1. Sort by burst time (ascending): P4(4)→P2(5)→P3(9)→P1(20)P_4(4)\to P_2(5)\to P_3(9)\to P_1(20).
  2. Gantt / start times (all arrive at t=0t=0):
ProcessBurstStartCompletion
P4404
P2549
P39918
P1201838

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.