This project is a C++ task scheduler that uses the Completely Fair Scheduler (CFS) algorithm. It supports two approaches for setup and execution:
- Using Docker (Recommended)
- Manual Setup on Windows with MSYS2 & MinGW-w64
Docker provides a simple and reproducible environment for building and running the scheduler.
- Install Docker
- Install Docker Compose
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/task-scheduler-cpp.git cd task-scheduler-cpp -
Build and run the project using Docker Compose:
docker-compose up --build
-
Once execution completes, the output files will be available in the
outputfolder on your host machine:output/process_schedule.csvoutput/cfs_advanced_visualization.png
-
If you need to retrieve the plot manually, use:
docker cp <container_id>:/app/output/cfs_advanced_visualization.png .
If you prefer to build the project manually on Windows, follow these steps.
- Download MSYS2 from MSYS2 website.
- Install it and open MSYS2 MinGW 64-bit terminal (not MSYS or UCRT).
- Update package manager:
pacman -Syu
- Close the terminal and reopen it, then install required packages:
pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-make
- Press Win + R, type
sysdm.cpl, and press Enter. - Go to Advanced → Click Environment Variables.
- Under System Variables, edit the
Pathvariable and add:C:\msys64\mingw64\bin - Click OK, then restart PowerShell or Command Prompt.
To verify:
mingw32-make --versiongit clone https://github.com/YOUR_USERNAME/task-scheduler-cpp.git
cd task-scheduler-cppmkdir build && cd build
cmake .. -G "MinGW Makefiles"
mingw32-make./cfs_scheduler- Create and activate a Python virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows, use .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run the plotting script:
python plot.py
Issue: make: command not found
Solution: Install mingw-w64-x86_64-make:
pacman -S --needed mingw-w64-x86_64-makeIssue: cmake: No usable generator found
Solution: Run CMake with the correct generator:
cmake .. -G "MinGW Makefiles"Issue: mingw32-make is not recognized
Solution: Ensure MinGW is in your PATH (Step 2 above).
For any issues, feel free to open an issue on GitHub or reach out.