GithubHelp home page GithubHelp logo

queing-theory's Introduction

Queing-Theory

A simulation of a custom queing policy called donation policy.

This project is a done as an excersice for the network modeling course.

We simulate the queing policies FCFS (first come first serve) and SJF (shortest job first) under different load values, then we propose a new queing policy that we call donation policy and we simulate it.

The donation policy is a combination between the SJF policy and the processor sharing policy, it works as the following:

We assume we have 2 types of jobs BIG and SMALL ones each time we get a big job we do as SJF do, we through it to the back of all the small jobs but this time we will let each small job donate thisbig job an amount X of time, This means that the server will serve the big job for an amount X then serve the small job... this happens repeatidly so as the small jobs are served the big job is getting smaller and smaller... the amount of donation X is an hyperparameter that i tuned to find an optimal value, where it appears to be 2.

Finally we evaluate each of the policies by drawing:

  • A graph showing the time delay for a new job to get finished with respect to the load on the system.
  • A histogram showing the frequancy of the number of jobs in the system after each iteration of each of the policies.

queing-theory's People

Contributors

mohamadmansouri avatar

Stargazers

 avatar

Watchers

 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.