https://github.com/abdallahhemdan/sqrt_os
Sqrt OS is a simulation of an OS scheduler and memory manager using different scheduling algorithms including Highest Priority First (non-preemptive), Shortest Remaining Time Next, and Round Robin.
https://github.com/abdallahhemdan/sqrt_os
hemdan highest-priority-first memory-manager mini-os operating-system os round-robin scheduler shortest-time-remanining-first sqrt-os
Last synced: 25 days ago
JSON representation
Sqrt OS is a simulation of an OS scheduler and memory manager using different scheduling algorithms including Highest Priority First (non-preemptive), Shortest Remaining Time Next, and Round Robin.
- Host: GitHub
- URL: https://github.com/abdallahhemdan/sqrt_os
- Owner: AbdallahHemdan
- License: mit
- Created: 2021-01-17T13:10:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-17T14:01:59.000Z (over 4 years ago)
- Last Synced: 2025-03-31T00:51:11.487Z (2 months ago)
- Topics: hemdan, highest-priority-first, memory-manager, mini-os, operating-system, os, round-robin, scheduler, shortest-time-remanining-first, sqrt-os
- Language: C
- Homepage:
- Size: 1.15 MB
- Stars: 20
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Sqrt OS
[](https://github.com/AbdallahHemdan/Sqrt_OS/contributors)
[](https://github.com/AbdallahHemdan/Sqrt_OS/issues)
[](https://github.com/AbdallahHemdan/Sqrt_OS/network)
[](https://github.com/AbdallahHemdan/Sqrt_OS/stargazers)
[](https://github.com/AbdallahHemdan/Sqrt_OS/blob/master/LICENSE)
![]()
![]()
![]()
![]()
## About
> A CPU scheduler determines an order for the execution of its scheduled processes; it
> decides which process will run according to a certain data structure that keeps track
> of the processes in the system and their status.> A process, upon creation, has one of the three states: Running, Ready, Blocked (doing
> I/O, using other resources than CPU or waiting on unavailable resource).## System Description
> Consider a Computer with 1-CPU and fixed size memory (1024 ==> can be changed).
> Our scheduler implemented the complementary components as sketched in the following diagrams.📌 NOTE:
> We are supporting the following Scheduling algorithms:
1. HPF (Highest Priority First)
2. STRN (Shortest Time Remaining Next)
3. RR (Round Robin)## Used Data structures
| Algo/Part | DS |
|:-----------------:|:--------------:|
| Processes WTA | Linked list |
| HPF - SRTN | Priority queue |
| RR - Waiting list | Queue |
| Buddy | Binary tree |## Algorithm Flow
- Algo Explanation:
1. Recieve and process all processes which come in the current second
1. In case of free space: Allocate space for it and push it in the ready queue
2. Else: Push it in the waiting list2. Check the running process if it finishes or not
1. True: Free its allocated space and check the waiting list
2. False: Pass (continue the code flow)
3. Check if the ready queue is not empty:
- True: based on the algo, we decide that we will switch or not
4. Wait till the next second## Results
1. HPF Algorithm
2. SRTN Algorithm
3. Round Robin Algorithm
### Contributors
Abdallah Hemdan
Adel Mohamed
Ahmed Sherif
Ahmed Mahboub
### Licence
[MIT Licence](https://github.com/AbdallahHemdan/Sqrt_OS/blob/main/LICENSE)