Skip to content
Exercise 8 · Q6
Q.

Consider the available processes given below in the ready queue for execution and with given burst time.

Process NoArrival TimeBurst time
P102
P213
P353
P464

a) What is the time at which all the processes get executed?

b) Find the average waiting time and average turnaround time using the non-pre-emptive SJF scheduling algorithm.

Puducherry CbseNCERTSubjective· 3mImportance★★★★★est
84% · 89/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 →

Non-preemptive SJF runs P1→P2→P3→P4 here; the CPU finishes at t=12t=12, with average waiting time 0.750.75 and average turnaround time 3.753.75 units.

For non-preemptive SJF, at each decision point pick the shortest burst among the processes that have already arrived.

TAT=Completion−Arrival,Waiting Time=TAT−Burst\text{TAT} = \text{Completion} - \text{Arrival},\qquad \text{Waiting Time} = \text{TAT} - \text{Burst}

  1. Schedule step by step:
    • t=0t=0: only P1P_1 (arr 0) available → run P1P_1 (burst 2): 0→20\to 2.
    • t=2t=2: available P2P_2 (arr 1) → run P2P_2 (burst 3): 2→52\to 5.
    • t=5t=5: available P3P_3 (arr 5); P4P_4 (arr 6) not yet → run P3P_3 (burst 3): 5→85\to 8.
    • t=8t=8: P4P_4 available → run P4P_4 (burst 4): 8→128\to 12.
ProcessArrivalBurstStartCompletion
P10202
P21325
P35358
P464812
  1. (a) All processes complete at t=12t = 12 units.
  2. Turnaround time =Completion−Arrival=\text{Completion}-\text{Arrival}: …

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.