0
$\begingroup$

2.(10 pts) a) You are given 4 processes in a batch system that all arrive at time 0 with the following CPU burst times:
P1 : 35, P2: 25, P3: 13, P4: 22. Assuming there is no context switch overhead, draw a time line chart (Gantt chart) showing when each process executes under each of the following scheduling algorithms:

SJN (Shortest Job Next).

Round Robin with a quantum of 10.

Answer - https://i.stack.imgur.com/tgMuZ.jpg

I don't fully understand how to get the turning or waiting time.

Waiting time I'm assuming is (95+90+88+63)/4

Turn around time is P1 = 95 - 0 = 95 or 95 - 25 or 95 - 10? same goes for P2, P3, P4

$\endgroup$

1 Answer 1

1
$\begingroup$

Turn Around time= Completion time - Arrival Time

and

Waiting time= Turn Around time - Burst time

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.