Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.31 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.31 KB

Scheduling Program

This C program calculates the waiting times (Tw) and turnaround times (Tr) for three scheduling algorithms: FCFS (First-Come, First-Served), SJF (Shortest Job First), and RR (Round Robin).

Features

  • FCFS: Calculates waiting and turnaround times using the FCFS scheduling algorithm.
  • SJF: Calculates waiting and turnaround times using the SJF scheduling algorithm.
  • RR: Not currently implemented in the provided code, but intended for the Round Robin scheduling algorithm.

Compilation

To compile the program, use the make command:

make

This will generate an executable called my_program.

Execution

To run the program, use the make run command:

make run

The program will prompt you to input the number of processes and their arrival times (Ti) and burst times (Di). Additionally, for the RR algorithm, it will ask for the quantum time.

Code Structure

main.c: Contains the main code for calculating waiting and turnaround times, and handling input and output. Cleanup To clean up the files generated by compilation, use:

make clean

This will remove the main executable.

Notes Make sure you have gcc installed on your system to compile the program. The code is designed to run on Unix-like systems.

Author

Davide Usberti ([email protected])