Here's the updated README with the cloning instructions included.
This project implements a Multi-Level Queue Scheduling Algorithm that categorizes processes into three priority queues:
- High Priority Queue (Round Robin Scheduling) - Uses a time quantum of 4 units.
- Medium Priority Queue (Priority Scheduling) - Executes based on priority order.
- Low Priority Queue (First Come First Serve - FCFS Scheduling) - Executes in the order they arrive.
- Classifies processes into different priority levels based on user input.
- Applies different scheduling algorithms to each priority queue.
- Efficient execution of processes based on priority.
- Number of processes.
- Process ID, Priority (1-10), and Burst Time for each process.
- High Priority (1-3) β Round Robin Scheduling.
- Medium Priority (4-7) β Priority Scheduling.
- Low Priority (8-10) β First Come First Serve (FCFS).
- High Priority Queue (Round Robin): Each process gets a time quantum of 4. If a process has remaining burst time, it gets another turn in the next cycle.
- Medium Priority Queue (Priority Scheduling): Processes execute in ascending order of priority.
- Low Priority Queue (FCFS): Processes execute in the order they arrive.
Enter the number of Processes: 3
Enter Process Id: 101
Enter Priority for the Process: 2
Enter Burst Time for the process: 10
Enter Process Id: 102
Enter Priority for the Process: 5
Enter Burst Time for the process: 7
Enter Process Id: 103
Enter Priority for the Process: 8
Enter Burst Time for the process: 12
High Priority Queue (Round Robin):
Process ID: 101, Burst Time (before): 10
Subtracting 4 from Process ID: 101, Burst Time (after): 6
Process ID: 101, Burst Time (before): 6
Subtracting 4 from Process ID: 101, Burst Time (after): 2
Process ID: 101, Burst Time (before): 2
Process ID: 101, Burst Time (after): 0
Medium Priority Queue (Priority Scheduling):
Process ID: 102, Burst Time: 7
Low Priority Queue (First Come First Serve):
Process ID: 103, Burst Time: 12
To get started, clone this repository using Git:
git clone https://github.com/harmeshgv/MultiLevelQueueScheduling.git
cd MultiLevelQueueScheduling
- C Compiler (GCC for Linux/macOS, MinGW for Windows)
- Compile the code:
gcc multi_level_queue.c -o scheduler
- Run the program:
./scheduler
- Follow prompts to enter process details and observe the scheduling output.
- Docker Installed (Get it from Docker Official Site)
-
Build the Docker Image
Run the following command inside the project directory:docker build -t scheduler-app .
-
Run the Container
Execute the following command to run the scheduler inside a Docker container:docker run -it scheduler-app
The
-it
flag allows interactive input, so you can enter process details when prompted.
- Each process gets a fixed time slot (quantum).
- If a process isn't finished within its quantum, it goes back in the queue.
- Ensures fair CPU time distribution.
- Executes processes based on priority (ascending order).
- Higher priority (lower number) gets executed first.
- Executes processes in the order they arrive.
- Simple but can lead to long waiting times for later processes.
- Dynamic priority adjustment based on execution.
- Multi-threading implementation for real-time scheduling.
- Visualization tool for scheduling process execution.
- Harmesh G V
- Project Repository: GitHub Link
This project is open-source under the MIT License.
This README now includes cloning instructions so users can quickly set up and run the project. π