Asignment 1
Asignment 1
Operating System
Assignment –1
1. Consider a system with a set of processes P1 , P2 and P3 and CPU burst time, Priorities and
arrival time being as below :
a) Average waiting time using FCFS, SJF and Priority Scheduling Mechanism.
b) Average Turnaround time using FCFS, SJF and Priority Scheduling Mechanism.
c) Assume time quantum is 2 unit of time calculate average waiting and turn around time in
Round Robin Scheduling Algorithm.
2. Consider the following set of processes with the length of the CPU-burst time given in
milliseconds:
Process Burst Time Priority
P1 10 3
P2 5 1
P3 3 3
P4 7 4
P5 2 2
The process are assume to arrived in the order <P1,P2,P3,P4,P5> at time 0
a) Draw the Gantt Chart for FCFS,SJF a non preemptive priority ,and RR scheduling(Time
quantum=1).
b) What is the turnaround time of each process for each of the scheduling algorithm?
c) What is the waiting time for the each of the algorithm?
3. Difference between a multilevel feedback scheduling algorithm and multi-queue CPU scheduling
algorithm which uses Round Robin for foreground and preemptive priority algorithm for the
background.
4. Consider the following table:
Process Burst time Priority Arrival time
P1 10 ms 4 1 ms
P2 12 ms 3 0 ms
P3 5 ms 2 2 ms
P4 8 ms 1 4 ms
Provide the schedule using preemptive shortest job first and pre-emptive priority scheduling
and calculate the average waiting time for each of the above.
5. For the following table :
Process Burst time Priority Arrival time
P1 5 ms 2 0 ms
P2 15 ms 3 1 ms
P3 10 ms 1 2 ms
a) Average waiting time using FCFS,SJF and priority scheduling meachanisms.
b) Average turn around time for the above algorithm.
c) Time quantum=2 ms .Draw Gantt chart for RR mechanisms.
6. Consider the following table:
a. Find the Average waiting and turnaround time for Round Robin, SJF, and
FCFS Algorithm. Also Draw Gantt chart.
8. Write Short Notes on :
i. Short term Scheduler Vs Long Term Scheduler
ii. Context Switch
iii. CPU Scheduling Parameters