https://github.com/yantavares/scheduler-so
Scheduler that manages processes in a Unix environment using the Round Robin policy with fixed priorities.
https://github.com/yantavares/scheduler-so
round-robin scheduler unix
Last synced: 4 months ago
JSON representation
Scheduler that manages processes in a Unix environment using the Round Robin policy with fixed priorities.
- Host: GitHub
- URL: https://github.com/yantavares/scheduler-so
- Owner: yantavares
- License: mit
- Created: 2025-01-01T20:28:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-14T03:29:37.000Z (over 1 year ago)
- Last Synced: 2025-12-02T02:32:39.529Z (7 months ago)
- Topics: round-robin, scheduler, unix
- Language: C
- Homepage:
- Size: 307 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unix Static Priority Multicore Scheduler
:brazil: **PT/BR** - [README_ptbr.md](README_ptbr.md)
[](https://github.com/yantavares/scheduler-so)
[](https://opensource.org/licenses/MIT)
```
_____ .__ ___.
__________ / _ \ | |\_ |__ _____
/ ___/ _ \ ______ / /_\ \| | | __ \\__ \
\___ ( <_> ) /_____/ / | \ |_| \_\ \/ __ \_
/____ >____/ \____|__ /____/___ (____ /
\/ \/ \/ \/
```
**Note:** If this repository helped you, please leave a :star: on the repo :)
This program implements a scheduler that manages processes in a Unix environment using the Round Robin policy with up to 4 priority queues (0, 1, 2, 3) and a specific quantum. It simulates a multicore environment, scheduling processes based on their priorities and start times.
---
## Compilation
### Option 1: Using the Makefile
```bash
make
```
This will compile the program and generate the `escalona` executable, along with compiling all test processes in the `process` directory.
### Option 2: Manual Compilation
```bash
gcc -o escalona scheduler.c -lpthread
```
## Execution
```bash
./escalona
```
Example:
```bash
./escalona 4 2 input.txt
```
Two test input files are already available in the scheduler's directory.
### **Input File Format:**
The input file must follow the format:
```
```
Example:
```
1 test20 0 2
2 test10 0 0
3 test30 20 0
4 test10 15 1
```
---
## Features
- Manages processes in 4 priority queues.
- Supports round-robin for each queue.
- Uses semaphores to manage core access.
- Monitors processes via pipes for interprocess communication.
- Generates a final report with turnaround time and execution details for each process.
---
### Final Report
The program outputs:
- Execution order of the processes.
- Turnaround time for each process.
- Average turnaround time.
---
## Notes
- The functionality for multiple cores is not yet implemented. The scheduling logic is in place, but parallel execution is still under development. (Work in progress)