This repository contains an implementation of various process scheduling algorithms. The goal of this project is to develop different scheduling variants and manage jobs using a queue. The scheduling algorithms include both non-preemptive and preemptive strategies.
In this project, various scheduling algorithms are implemented to manage the execution of processes. A queue data structure is used for managing jobs. The initial codebase includes a simple First-Come-First-Serve (FCFS) example.
Implement a queue data structure to manage processes. The necessary functions and structs are provided in the queue.c and queue.h files. Refer to the documentation in the header file for details.
Implement different scheduling algorithms as specified in the requirements. The following scheduling algorithms should be implemented:
- First Come First Served (FCFS)
- Priority with no preemption (PRIO-NP)
- Shortest Job Next (SJN)
- Highest Response Ratio Next (HRRN)
- Round Robin (RR)
- Multi-Level Feedback (MLF) with varying time slices
- Longest Current First Shortest Process Remaining (LCFSPR)
The scheduling algorithms aim to efficiently allocate CPU time to different processes based on their characteristics. Different algorithms provide various trade-offs between fairness and throughput.
Additional test cases can be implemented to validate the correctness of the scheduling algorithms. The provided guidelines and examples can be followed to create meaningful test cases.
To compile the project, use the provided Makefile in the root directory. Run the following command:
makeThis will compile the project using the clang compiler. Make sure to have clang and make installed. On Ubuntu, you can install them using:
sudo apt install make clangAlso make all or just make.
Compiles all the .c files to be built. However, no executable file is created yet.
Builds all tests and executes them.
Displays a list of all available tests.
Executes only the specified test. The name of the test file is also the same as the make target (without the .c extension).
Example: make test_fcfs_simple
Packs the src folder with its contents into a submission-ready zip archive, which can then be uploaded to ISIS. This operation requires the zip tool, which can be installed on Debian Linux using the command apt install zip. This archive should not and need not be further modified!
Cleans up the workspace.