0% found this document useful (0 votes)
30 views2 pages

Os Ass1

Uploaded by

abhi55gnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Os Ass1

Uploaded by

abhi55gnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Operating System [BCS303]

Assignment 1
1. For the process listed below, draw Gantt chart using pre-emptive and non pre-emptive
priority scheduling algorithm. A larger priority number has a highest priority. Calculate the
average waiting time and turn around time.
Process Arrival Time Burst time Priority
P1 0 6 4
P2 3 5 2
P3 3 3 6
P4 5 5 3
2. Consider the following set of process with length CPU burst given in ms.
Process Arrival Time Burst time
P1 0 6
P2 1 3
P3 2 1
P4 3 4
Compute the average waiting time and turn around time for the above process using FCFS,
SRTF (i.e., Preemptive SJF), Round Robin(Time quantum = 2ms) scheduling algorithms.
3. Calculate the average waiting time and turn around time by drawing gantt chart using
FCFS, SRTF (i.e., Preemptive SJF), SJF (i.e., non preemptive SJF), Round robin (Time
quantum = 2ms) scheduling algorithms.
Process Arrival Time Burst time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
4. Consider the following set of process with Arrival time, CPU burst time and priority shown
below [lower number represents higher priority and time quantum is 4ms]. Write a gantt
chart for various scheduling algorithms and state which algorithm will provide best (i.e.,
minimum) average waiting time and turn around time.
Process Arrival Time Burst time Priority
P1 0 10 3
P2 1 3 1
P3 2 7 4
P4 2 1 5
P5 5 5 2
5. Find the av. waiting time and av. turnaround time using:
a) FCFS b) SJF(NP) c) SJF(P) d) RR (TQ=3)
Process Arrival Time Burst time
P1 2 2
P2 6 5
P3 4 0
P4 7 0
P5 4 7
6. Find the av. waiting time and av. turnaround time using:
a) Priority(NP)
b) Priority(P)
Process Arrival Time Burst time Priority
P1 3 2 1
P2 5 0 3
P3 3 1 2
P4 4 6 1
P1 3 2 1
7. An operating system uses Shortest Remaining Time first (SRT) and Round Robin with 10
ms time quantum process scheduling algorithm. Consider the arrival times and execution
times for the following processes:
Process Arrival Time Burst time
P1 20 0
P2 25 15
P3 10 30
P4 15 45
8. What are the average waiting and turnaround times for the round-robin scheduling
algorithm (RR) with a time quantum of 3 units?
Process ID Burst Time
P1 5
P2 9
P3 3
P4 1
P5 11
P6 8
9. Draw Gantt charts to illustrate the execution of the processes using the following
scheduling algorithm:
(1) FCFS, (2) nonpreemptive SJF, (3) preemptive SJF,
(4) nonpreemptive priority, (5) preemptive priority, and
(6) RR with time quantum=2 ms
• Calculate the average turnaround time when using each of the above scheduling
algorithms
• Count the number of context switches when using each of the above scheduling algorithms

You might also like