You are on page 1of 3

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING

FALL SEMESTER 2022 -2023


BCSE303L OPERATING SYSTEMS
SLOT: B1+TB1 CLASS ID : VL2023240100692
DIGITAL ASSIGNMNET 1
1. Compute the average turnaround time and average waiting time using following
scheduling algorithm respectively.
(i) FCFS algorithm
PROCESS BURST TIME
P1 10
P2 12
P3 8
P4 4
P5 7

(ii) SJF algorithm


PROCESS BURST TIME
P1 7
P2 10
P3 4
P4 8
P5 12

(iii) Priority Scheduling algorithm


PROCESS BURST TIME PRIORITY
P1 5 2
P2 15 5
P3 10 1
P4 25 4
P5 20 3

(iv) Round Robin algorithm

Quantum Time = 3 sec

PROCESS BURST TIME


P1 8
P2 3
P3 6
P4 4
2. Consider the set of processes with arrival time (in milliseconds) and CPU burst
time (in milliseconds) shown below. Calculate the average waiting time and
average turn around time in case of
a. FCFS algorithm
b. SJF algorithm
c. Priority Scheduling algorithm where the priorities of the processes are 2, 0, 3,
1, 4 respectively. (0 is the highest priority)
d. Round Robin algorithm with quantum time of 2 milliseconds.

PROCESS ARRIVAL TIME BURST TIME


P1 0 11
P2 5 28
P3 12 2
P4 2 10
P5 9 16

************************************
1. Compute the average turnaround time and average waiting time using following
scheduling
algorithm respectively.

ALGORITHM TURNAROUND TIME AVERAGE WAITING


TIME
FCFS 27.4 19.2

SJF 18.8 12.6

PRIORITY 39 24

ROUND ROBIN 16 10.75

2. Consider the set of processes with arrival time (in milliseconds) and CPU burst time
(in milliseconds) shown below. Calculate the average waiting time and average turn-
around time in case of a. FCFS algorithm b. SJF algorithm c. Priority Scheduling
algorithm where the priorities of the processes are 2, 0, 3, 1, 4 respectively. (0 is the
highest priority) d. Round Robin algorithm with quantum time of 2 milliseconds

ALGORITHM TURNAROUND TIME AVERAGE WAITING


TIME
FCFS 37 23.6

SJF 25.2 11.8

PRIORITY 42.4 29

ROUND ROBIN 36.6 23.2

You might also like