Git Product home page Git Product logo

adelrizq / sqrt_os Goto Github PK

View Code? Open in Web Editor NEW
10.0 5.0 3.0 1.27 MB

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

License: MIT License

Makefile 0.80% C 99.20%
schedular os operating-systems synchronization synchronizer sqrt-os round-robin shortest-remaining-time-first highest-priority-first memory-manager

sqrt_os's Introduction

OS ^ 1/2

GitHub contributors GitHub issues GitHub forks GitHub stars GitHub 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 list

    2. 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

  1. SRTN Algorithm

  1. Round Robin Algorithm

Contributors


Abdallah Hemdan


Adel Mohamed


Ahmed Sherif


Ahmed Mahboub

Licence

MIT Licence

sqrt_os's People

Contributors

abdallahhemdan avatar adelrizq avatar ahmedsherif304 avatar mahboub99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.