Chap_4
Chap_4
g) Define Deadlock.
4 MARKS QUESTION
d) Describe I/o burst and CPU burst cycle with neat diagram
b) Describe prevention of deadlock occurrence with respect to hold and wait necessary condition.
d) Solve given problem by using SJF and FCFS scheduling algorithm using Gantt chart. Calculate the
average waiting time for each algorithm.
P1 9
P2 7
P3 3
P4 7
d) Solve given problem by using FCFS scheduling algorithm. Draw correct Gantt chart and calculate
average waiting time and average turnaround time –
P1 1 29
P2 2 3
P3 3 7
P4 4 12
6 MARKS QUESTION
a) Calculate average waiting time for following data using First Come First Served (FCFS) and
Shortest Job First (SJF) algorithms.
Process Burst time Arrival time
P0 08 0
P1 04 1
P2 05 2
P3 03 3
b) Consider the four processes P1, P2, P3 and P4 with length of CPO Burst time. Find out Avg
waiting time and Avg turn around time for the following Algorithms. i) FCFS ii) RR (Slice-4ms) iii)
SJF
Process Arrival time Burst time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
a) Solve given problem by using (i) Pre-emptive SJF (ii) Round Robin (Time Slice = 3 ms) Calculate
average waiting time using Gantt Chart. Process A.T. B.T. (in ms) P11 0 8 P12 1 4 P13 2 9 P14 3 5
b) Consider the following memory map and assume a new process P4 comes with memory
requirements of 6 KB. Locate (Draw) this process in memory using. i) First fit O.S. ii) Best Fit P1
iii) Worst fit 12 KB P2 19 KB P3 7KB Memory (winter 2022)
a) How pre-emptive scheduling is better than non pre-emptive scheduling by solving following
problem using SJF (Solve it by using pre-emptive SJF and non-pre-emptive SJF also).
Process Arrival time Burst time
P1 0 8
P2 1 4
P3 2 9
P4 3 5