0% found this document useful (0 votes)
59 views

Assignment I OS II Algorithms

The document describes 6 problems related to process management algorithms. Each problem provides CPU burst times and priorities for a set of processes. It asks to draw Gantt charts illustrating the scheduling of the processes using various algorithms like FCFS, priority scheduling, round robin, shortest job first. It also asks to calculate the turnaround time and waiting time of each process for each scheduling algorithm. The document compares the performance of different scheduling algorithms and justifies concepts like round robin degenerating to FCFS for large time quantums.

Uploaded by

Bca bca
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Assignment I OS II Algorithms

The document describes 6 problems related to process management algorithms. Each problem provides CPU burst times and priorities for a set of processes. It asks to draw Gantt charts illustrating the scheduling of the processes using various algorithms like FCFS, priority scheduling, round robin, shortest job first. It also asks to calculate the turnaround time and waiting time of each process for each scheduling algorithm. The document compares the performance of different scheduling algorithms and justifies concepts like round robin degenerating to FCFS for large time quantums.

Uploaded by

Bca bca
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment

Operating System-II
Process Management Algorithms
1. Consider the following set of processes, with the length of CPU burst time given in
milliseconds.

Process Burst time Priority


P1 4 4
P2 7 2
P3 9 5
P4 2 3
P5 4 1
P6 1 4

The process are assumed to have arrived in the order P1, P2,P3, P4, P5, P6 all at
time 0
(a) Draw Gantt charts illustrating the execution of these processes using
(i) FCFS, (ii) RR (quantum = 3), (iii) preemptive priority (iv) a non preemptive priority
(v) SJF (vi) SRTN scheduling .
(b) What is turn around and waiting time of each process for each scheduling
algorithm in part a?
(c ) Justify if time quantum is too large in RR scheduling then it degenerates to FCFS
policy.

2. Consider the following table:


Process Arrival time CPU Burst
P1 0.0 8
P2 0.4 4
P3 1.0 1
What is the average turnaround and waiting time with FCFS, SJN, SRTN,
RR(quantum=2)?
3. Consider the following set of processes, with the length of CPU burst time given
in milliseconds:

Process Burst time Priority


P1 3 1
P2 7 4
P3 5 2
P4 1 1
P5 4 3
The process are assumed to have arrived in the order P1,P2,P3, P4, P5 all at time 0
(a) Draw four Gantt charts illustrating the execution of these processes using
(i) FCFS
(ii) RR (quantum = 3)
(iii) SJF
(iv) a non preemptive priority scheduling
(b) What is turn around and waiting time of each process for each
scheduling algorithm in part a?
(c ) Which of the schedules in part (a) results in minimum average waiting
time (overall processes)?

4. CPU-burst time given in milliseconds:

Processes Burst time Priority


P1 10 3
P2 29 1
P3 3 3
P4 7 4
P5 12 2
The process are assumed to have arrived in the order P1,P2,P3, P4, P5 all at time 0
a. Draw four Gantt charts illustrating the execution of these process using
(i) FCFS
(ii) RR (quantum = 10),
(iii) a non preemptive priority scheduling,
(iv) SJF scheduling.
b. What is turn around and waiting time of each process for each sheduling
algorithm in part a?
c. Which of the above scheduling algorithms results in minimum average waiting
time (overall processes)?

5. Consider the following set of processes, with the length of CPU-burst time given
in milliseconds and priority of the processes (consider 1 as highest priority):
Process Arrival time Burst time Priority
P1 0 10 3
P2 1 17 1
P3 3 3 3
P4 4 7 4
P5 5 12 2

Solve the following questions


a) Draw the four Gantt chart illustrating the execution of these process using
SJF, Preemptive priority and Round Robin (Quantum = 5)
b) What is average waiting time for each process and average turn around time
in each scheduling algorithm.
6. Consider the following set of processes, with the length of CPU-burst time given
in milliseconds and priority of the processes (consider 1 as highest priority):

Process Arrival time Burst time Priority


P1 1 7 3
P2 2 3 1
P3 3 1 4
P4 4 4 3
P5 5 5 2
Solve the following questions
a)Draw Gantt charts illustrating the execution of these processes using FCFS,SJF,
SRTN,Preemptive priority, Non-Preemptive Priority and Round Robin (Quantum = 3)
c) What is average waiting time for each process and average turn around time
in each scheduling algorithm.

You might also like