Tutorial 2 Questions
Tutorial 2 Questions
QUESTION
1. Processes A, B and C arrive in that order. A has priority 3 and requires 8 quanta, B
has priority 1 and takes 10 quanta and C has priority 3 and requires 6 quanta.
Calculate the average Waiting Time and Turn Around Time if the scheduling
mechanism used is:
(a) FCFS
(b) SJF
(c) RR
(d) PQ
2. Processes W, X, Y and Z arrive in that order. W has priority 1 and requires 7 quanta,
X has priority 3 and takes 9 quanta, Y has priority 2 and requires 5 quanta and Z has
priority 3 and requires 6 quanta. Calculate the Average Waiting Time and Turn
Around Time if the scheduling mechanism used is:
(a) FCFS
(b) SJF
(c) RR
(d) PQ
Process X Y Z
Quanta Required 4 8 10
Priority 1 2 1
Calculate the Average Waiting Time and Average Turn-Around Time if:
(a) normal Round Robin scheduling is used.
(b) modified Round Robin scheduling which gives priority 1 processes a
double quantum and priority 2 processes a single quantum whenever they
are scheduled.
5. An operating system has two process priority levels, 1 and 2. Three new processes,
A, B and C, arrive at the same time in that order with the following characteristics:
Process A B C
Quanta Required 20 30 40
Priority 1 1 2
Calculate the Average Waiting Time and Average Turn-Around Time if:
(a) normal Round Robin scheduling is used.
(b) modified Round Robin scheduling which gives priority 1 processes a
double quantum and priority 2 processes a single quantum whenever they
are scheduled.
(c) What advantages or disadvantages has the algorithms described in (b)
compared to Priority Queue (PQ) scheduling?
6. An operating system has two process priority levels, 1 and 2. Four new processes, A,
B, C and D arrive at the same time in that order with the following characteristics:
Process A B C D
Quanta Required 6 9 12 15
Priority 1 2 1 2
Calculate the Average Waiting Time and Average Turn-Around Time if:
(a) normal Round Robin scheduling is used.
(b) modified Round Robin scheduling which gives priority 1 processes a triple
quantum and priority 2 processes a single quantum whenever they are
scheduled.
Process P Q R
Quanta Required 24 6 12
Priority 1 2 2
Calculate the Average Waiting Time and Average Turn-Around Time if:
8. Suppose that the following processes arrive for execution at the times indicated.
Each process will run for the amount of time listed. In answering the questions, use
non-preemptive scheduling and base all decision on the information you have at the
time the decision must be made:
(a) What is the average turnaround time for these processes with the FCFS
scheduling algorithm?
(b) What is the average turnaround time for these processes with the SJF
scheduling algorithm?
9. Consider the following set of processes, with the length of the CPU burst given in
millisecond:
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5 all at time 0.
(a) Draw four Gantt charts that illustrate the execution of these processes
using the following scheduling algorithms: FCFS, SJF, non-preemptive
priority (smaller priority number implies a high priority) and RR
(quantum =1).
(b) What is the turnaround time of each process for each of the scheduling
algorithms in part (a)?
(c) What is the waiting time of each process for each of these scheduling
algorithms?
(d) Which of the algorithms results in the minimum average waiting time
(over all processes)?