This repository contains implementations of Multilevel Feedback Queue (MLFQ) scheduling algorithm in C, C++, and Python. MLFQ is a scheduling algorithm that manages processes by assigning them to different queues based on their CPU burst time or priority. The queues have varying priorities, and processes move between queues based on their behavior and execution characteristics.
File: mlfq_c.c
Description: This C implementation of MLFQ scheduling algorithm provides a demonstration of how the algorithm can be implemented in C programming language. It includes functions for initializing queues, adding processes, executing the scheduler, and handling process movements between queues.
File: mlfq_cpp.cpp
Description: This C++ implementation of MLFQ scheduling algorithm showcases the application of object-oriented programming principles. It defines classes for queues and processes, encapsulating their properties and behaviors. The implementation offers a structured approach to modeling the MLFQ algorithm.
File: mlfq_python.py
Description: This Python implementation of MLFQ scheduling algorithm leverages Python's simplicity and readability. It provides a clear and concise representation of the algorithm's logic, making use of lists and dictionaries to manage queues and processes efficiently.
Compile the mlfq_c.c
file using a C compiler e.g. gcc
Run the compiled executable to execute the MLFQ scheduler.
Compile the mlfq_cpp.cpp
file using a C++ compiler e.g. g++
Run the compiled executable to execute the MLFQ scheduler.
Ensure you have Python installed on your system.
Simply execute the mlfq_python.py
file using a Python interpreter to run the MLFQ scheduler.
Contributions to improve the existing implementations or add new features are welcome. If you find any issues or bugs, feel free to open an issue or submit a pull request with the necessary changes.