EE426 OS Lab3 Spring2023
EE426 OS Lab3 Spring2023
Objectives:
The two main objectives of this lab experiment are:
1. Write a C program to simulate the following CPU scheduling algorithms to find turnaround time and waiting
time.
a) FCFS (non-preemptive)
b) SJF (non-preemptive)
d) Priority (non-preemptive)
c) Round Robin (preemptive)
2. Write a C program to simulate multilevel queue fixed priority scheduling algorithm.
Write a C program to simulate multilevel queue fixed priority scheduling algorithm considering the following
scenario. All the processes in the system are divided into two categories – system processes and user processes.
System processes are to be given higher priority than user processes. Use RR scheduling for system processes and
FCFS scheduling for user processes. Your program should perform the following tasks:
1. For each process calculate its waiting time and its Turnaround time.
2. Print the Gantt chart.
3. To test your program, use the following data:
4. If you consider that the time slice for the RR scheduling is q=2u, then your Gantt chart should be as follows: