You are on page 1of 1

Report for CS2106 - Lab 6

Objective: To study the difference in behavior of Round Robin (RR) scheduler and Multi-Level Feedback
Queue (MLFQ) scheduler pertaining to different types of jobs fed.

Method of experiment
According to IO and CPU burst time length pattern, the test cases were divided into 8 different types:
1. Balanced jobs (IO similar to CPU)
2. Random jobs
3. CPU-bound jobs with less frequent IO
4. CPU-bound jobs with frequent IO
5. CPU-bound jobs with no IO
6. IO-bound jobs with only once but long IO
7. IO-bound jobs with relatively shorter but frequent IO
8. IO-bound jobs with long and frequent IO
These 8 test cases are all with 10 jobs each, and the timing when they are fed with new job is controlled,
such that the first job will start and first unit time, and other jobs will follow on 2 seconds after each job.

The results
Below are the result graphs to visualize the effect of IO/CPU time of jobs to different schedulers. The
graphing scheme used here is to plot the percentage overhead of RR scheduler to MLFQ scheduler. This
scheme is chosen because RR scheduler is in overall show lower performance compared to MLFQ.

Waiting Time:
40
30 We can see that for CPU-bound jobs (3~5), the overhead is
Percentage

actually not much. However, if the job has frequent IO, the
Overhead

20
10
waiting time gets longer (case 4 and 8 are the peaks). One
interesting thing to note is, when the case has only one very long
0
IO, RR is actually slightly more efficient than MLFQ in terms of
-10 1 2 3 4 5 6 7 8
waiting time.
Test Case used
Response Time:
500
400
The line is disconnected at case 5 because at case 5, we have 0
Percentage
Overhead

300
response time for MLFQ scheduler (due to no IO), and therefore
200
a infinite overhead. For other cases, the response times for RR
scheduler was very high compared to MLFQ scheduler.
100
Furthermore, for CPU bound jobs and random/balanced cases
0
1 2 3 4 5 6 7 8
(1~4), the overhead was significantly higher.
Test Case used

Turnaround Time:
20
The graph obtained was pretty much the same as the turnaround
15
time graph. This is because more waiting actually directly leads
Percentage
Overhead

10 to longer waiting time. The graph behavior for this graph has the
5 same reason with first graph (waiting time graph).
0
-5 1 2 3 4 5 6 7 8

Test Case used

Conclusion: For RR scheduler, the performance in terms of waiting/turnaround time gets worse if there are
frequent IO, and the performance in terms of response time gets worse if there is less frequent IO. This two
factors inhibit each other, and that is why MLFQ was in overall, better in all types of test cases (except for
one case). MLFQ juggles between the two factor and gives the better performance balancing, and that is why
it is better.

You might also like