Lab4-CPU Scheduling algorithms - 1 (1)
Lab4-CPU Scheduling algorithms - 1 (1)
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.