OS Lab 4
OS Lab 4
Aim: Given the list of processes and their CPU burst times, display the Gantt chart for SJF
(Nonpreempted). Compute and print the average waiting time and average turnaround time using
SJF (Nonpreempted).
Requirements: C Programming knowledge and understanding of CPU scheduling concept.
Outcome: Understand the CPU scheduling algorithm in an operating system..
Theory:
To calculate the average waiting time in the shortest job first algorithm the sorting of the process
based on their burst time in ascending order then calculate the waiting time of each process as the
sum of the bursting times of all the process previous or before to that process.
ALGORITHM:
Exp.4 - Part B
Name of Student: Roll No.:
Programme:
Output:
Observation & Learning:
Conclusion:
Questions:
1. Distinguish between Preemptive and Nonpreemptive CPU scheduling?
2. What is turnaround time?