You are on page 1of 12

DIGITAL ASSIGNMENT-3

NAME: BEJUGAM SHIVA SUPRITH


REG NO: 18BCE0427
FACULTY: VIJAYA KUMAR
SLOT: L51+L52
Question 1-
Write C program for the following CPU scheduling algorithms( with
arrival time) to calculate Average Waiting time and Average
Turnaround time with output screen shots.
a) FCFS( First come First serve)
b) SJF( Shortest Job First)
c) RR ( Round Robin)
d) Priority Scheduling.
Question 2-
Write C program and show the screen shots for the Dead lock
Avoidance using Bankers Algorithm.
a) CODE FOR FCFS:

OUTPUT:
CODE FOR SJF:
OUTPUT:
CODE FOR ROUND ROBIN:
OUTPUT:
CODE FOR PRIORITY:
OUTPUT:
CODE FOR BANKER’S ALGORITHM:
OUTPUT:

You might also like