Code Monkey home page Code Monkey logo

process-schedular-os's Introduction

process-schedular-Simulator

simulates process scheduling in linux OS by graphs and calculations using python

Prerequisites

python basic packages:

  • numpy
  • matplotlib
  • sys

Getting started

  • run process_generator.py by command line :

python process_generator.py readFile.txt WriteFile.txt

read file sample and format

sample to in

our random process generator work as follows:

First line should include the number of processes.
Second line should include μ and σ of arrival time distribution separated by a whitespace.
Third line should include μ and σ of burst time distribution separated by a whitespace.
Fourth line should include λ of prioritydistribution  

*N.B : you can implement your test cases yourself as you want

SCHEDULER SIMULATOR :

  • run scheduler.py by command line as follows (or any other way):
python scheduler.py

you will be asked to enter 4 entries :

  1. file to read (processes data)

sample to test

First line should include the number of processes.
Each line contains the parameters for one process only, separated by a white space, in the following order:
process number, arrival time, burst time and priority.
  1. context switching time (if needed).
  2. scheduling mode :
 1. Non-Preemptive Highest Priority First.(HPF)
 2. First Come First Served. (FCFS)
 3. Round Robin with fixed time quantum.(RR)
 4. Preemptive Shortest Remaining Time Next.(SRTN)
  1. quantum slice in case of (RR) mode.

output

graph:

  1. HPF : HPF
  2. FCFS : FCFS
  3. RR : RR
  4. SRTN : SRTN
-> above graphs are with 0 time context switching for simplicity but you can add any number you want as this fig :

FCFS_CSS

file output :

automatically created upon run with the following shape :

out file

process-schedular-os's People

Contributors

sha3er97 avatar

Watchers

James Cloos 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.