Giter Site home page Giter Site logo

os_scheduler's Introduction

OS_Scheduler

A simulation of scheduling processes by the operating system using C language and IPCs

Table of Contents


Overview

This is our project for the Operating Systems course at Cairo University. The project simulates the work of the operating system scheduler with the processes in the system using 3 different algorithms to run the processes which are:

  1. Non-preemptive Highest Priority First (HPF)
  2. Shortest Remaining time Next (SRTN)
  3. Round Robin (RR)

While it uses 2 different algorithms for memory allocations which are:

  1. First Fit.
  2. Buddy memory allocation.

System Description

image

Data Structures

  • Priority queue

    • Ready queue: To hold the processes PCBs arranged according to the scheduling algorithm.

      Scheduling algorithm Priority queue key
      Highest priority first Processes priority
      Shortest remaining time next The remaining time (initially it’s the process runtime)
      Round robin Arriving time
    • Unallocated Processes: To hold the process that can’t be currently allocated due to memory limits

  • Linked list

    • Used in first fit memory management algorithm
    • Hole linked list: To hold the free blocks of memory and their location
    • Processes linked list: To hold the allocated processes address space
  • Binary search tree

    • Buddy lists: To hold memory addresses and specify whether they are allocated or not

How To Run

  1. Clone the project
git clone https://github.com/YaraHisham61/OS_Scheduler
  1. Go to the project directory
cd code
  1. Compile your project using the command:
make  
  1. Choose the scheduling algorithm by modifying Makefile
-sch 1 : HPF
-sch 2 : SRTN
-sch 3 : RR
  1. Choose the memory allocation algorithm by modifying Makefile
-mem 1: First fit
-mem 2: Buddy
  1. Modify process.txt to the desired test case
  2. Run your project using the command:
make run

Outputs Files

  • scheduler.log
  • scheduler.perf
  • memory.log

Contributors

os_scheduler's People

Contributors

yarahisham61 avatar

Watchers

 avatar

Forkers

nancyalgazzar

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.