This project is developed as part of our Operating Systems course to simulate and test different process scheduling algorithms.
Multiple Scheduling Policies: FIFO, Round Robin, and Shortest Job First (SJF).
Signal Handling: Custom signal registration and handling.
Timestamp Recording: Precise process timing and logging.
Debugging Utilities: Macros for logging and debugging.
- GCC (GNU Compiler Collection)
- Make : Building the Project
- clone the repository:
git clone https://github.com/yourusername/pqsh.git
cd pqsh
- compile the project:
make
To run the scheduler:
./bin/pqsh
To run the test suite:
make test
This command will compile and execute the tests located in the tests/ directory.
include/pq/: Header files defining the interface and structures for different components.
src/: Source files implementing the core functionality of PQSH.
tests/: Unit tests and scripts to validate the scheduler's functionality.
bin/: Compiled binaries of the scheduler and test programs.
The scheduler component manages process queues and implements different scheduling policies:
The scheduler's structure includes queues for running, waiting, and finished processes. It tracks total turnaround and response times to evaluate scheduling performance.
Signal handling in PQSH allows for the registration of custom signal handlers. This feature is critical for managing asynchronous events, such as process timeouts and interrupts. The signal handlers ensure that processes are properly started, paused, and resumed based on system signals.
Timestamp utilities provide precise measurements of process start, stop, and duration times. This feature is essential for performance analysis and debugging, allowing for accurate tracking of process execution timelines.
The tests/ directory contains unit tests and scripts to validate the functionality of the scheduler.
The tests ensure that each component works correctly and that the scheduling policies produce the expected results.