C program that simulates the Round Robin scheduling and calculates the waiting time, turnaround time for each process, and also represents the execution order using a Gantt chart. Program Requirements
- Input: Number of processes. Burst time for each process. Time quantum.
- Output: Waiting time for each process. Turnaround time for each process. Average waiting time. Average turnaround time. Execution order (Gantt chart). Steps to Implement the Program
- Define a Structure for Process: Process ID. Burst time. Remaining burst time. Waiting time. Turnaround time.
- Calculate Waiting Time: Use the remaining burst time to simulate process execution. Track the execution order.
- Calculate Turnaround Time: Turnaround time is the sum of burst time and waiting time.
- Print Results: Print waiting time, turnaround time for each process. Print average waiting and turnaround times. Print the Gantt chart representing the execution order.