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

Lab4-CPU Scheduling algorithms - 1 (1)

grwg

Uploaded by

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

Lab4-CPU Scheduling algorithms - 1 (1)

grwg

Uploaded by

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

LAB EXPERIMENT - 4

Question 1:
Consider the following scenario.

a. Write a menu driven program that implements the following CPU scheduling algorithms for the
above scenario.
1. First Come First Serve (FCFS)
2. Shortest Job First (SJF) – Non Premptive
3. Shortest Remaining Time First (SRT) – Premptive SJF
b. Make a table to calculate the turnaround time, waiting time and response time of each process.
c. Cross check the table results with a handmade table and Gantt chart.
d. Find the sequence of process that terminates after complete execution of the job.
e. Calculate the average turnaround time and average waiting time for each of the above scenario.
f. Comment on the best algorithm in this scenario.

Question 2:
a. Using the program written above, test the below scenario for all the above CPU scheduling
algorithms.
b. Do all the above questionnaire from Q1a to Q1f for this case as well.

Process ID Arrival Time Burst Time


P1 1 5
P2 1 8
P3 5 2
P4 6 1
P5 4 4
P6 4 4

You might also like