Description
In this assignment, you will calculate the turnaround time and the waiting time for
various CPU scheduling algorithms.
The efficiency of Operating System depends on
two main factors:
• Algorithms used for scheduling; and
• The environment in which theses algorithms are implemented.
Questions:
1. CPU scheduling:
Use the formulas
Turnaround time per process = completion time – arrival time
Wait time per process = turnaround time – burst time
Note: A larger number indicates a higher priority
Process Arrival Time Burst Time Priority
P1 0 16 8
P2 0 10 10
P3 3 5 6
P4 5 8 10
P5 8 12 5
For each of Round Robin, First Come First Serve, Priority Preemptive and
Priority Non-Preemptive draw the Gantt chart to illustrate how these
processes would be scheduled, and calculate turnaround time per process
and the wait time per process. For Round Robin, quantum = 5.
2. CPU scheduling
Process Arrival Time Burst Time Priority
P1 0 8 8
P2 0 4 10
P3 4 1 6
For each of Round Robin, First Come First Serve, Priority Preemptive and
Priority Non-Preemptive draw the Gantt chart to illustrate how these
processes would be scheduled, and calculate turnaround time per process
and the wait time per process. For Round Robin, quantum = 5.
3. CPU scheduling
Process Arrival Time Burst Time Priority
P1 0 8 8
P2 0 4 10
P3 4 1 6
P4 6 6 8
For Shortest Remaining Time draw the Gantt chart to illustrate how these processes
would be scheduled, and calculate turnaround time per process and the wait time
per process.
4. Starvation
Indicate the algorithms, from those listed below, that could result in
starvation and explain why. Note: You should assume that each process will
use the CPU for a finite burst before performing I/O.
i. First-come, First-Served
ii. Round Robin (aka preemptive FCFS)
iii. Shortest Job First
iv. Shortest Remaining Time First (aka preemptive SJF)
v. Priority
Report Submission Details
You need to submit a report that consists of answers to the listed questions.
Assignment Marking Criteria Weighting
Q 1 /5
Q 2 /5
Q 3 /5
Q 4 /5
Total /20