that order, each process has a series of alternating CPU bursts and 1/0 bursts as
follows:
A: Sms (CPU), 7ms (1/0), 6ms (CPU)
B: 2ms (CPU), 1ms (1/0), 3ms (CPU), 1ms (1/0), 1ms (CPU)
C: Sms (CPU), 3ms (1/0), 4ms (CPU)
What would be the turnaround (completion) and wait times of all processes using
each of the following scheduling algorithms?
Round Robin (RR) with 3ms time quantum,
Shortest Job First (SJF).
For simplicity, assume context switch time and other overheads are comparatively
negligible. NOTE:
• During the CPU burst (execution) of a process, I/O bursts of other processes
would be happening at the same time.
• Wait time is the wait time each process spends in the process READY queue.
• Turnaround time-CPU bursts + I/O bursts + Wait time
Fill in the following table with your answers, and you must show the steps of your
calculation (follow the hints below).
Turnaround Time
A
c
C
Average
RR
SJF
Wait Time
RR
SJF
Hint: Use notation p (e, s. r) to track CPU execution of a process over the time:
e-total CPU burst time that has been executed for a particular process,
s-total system time passed from the beginning of executing first process,
r-the reason why the process is stopped along the execution (either
suspended or completed) due to:
• t-time quantum expired during RR (only applicable to RR),
• I-process initiated an I/O,
• c-process completed execution
. For example: A(10, 16, t) means total CPU burst time that has been
executed for process A is 10ms, total system time passed is 16ms
since the beginning of executing the first CPU burst, and process A is
suspended due to expiration of time quantum.
Fig: 1