Giter Site home page Giter Site logo

scheduler's Introduction

#Scheduler

##Files

  • fifo.{h, cpp} - first in first out scheduling
  • main.cpp - program entry point
  • makefile - defition for compiling on OSX 10.9 with c++11
  • request.h - object definition for job request and resource offers
  • scheduler.{h, cpp} - base clase for creating schedulers
  • wpqs.{h, cpp}, - weighted priority queue scheduler

##To Run

  • make
  • ./tester

This was only tested on OSX 10.9 using clang++ and the c++11 libraries

##File explanations

###main.cpp This file serves as the entry point to the program. It instantiates an instance of both scheudlers and inserts some job requests and resources. The next step would be to create two threads for generating job requests and simulating the time it might take to run a job. This could better simulate a stream of incomign requests and offers

###request.h This file outlines a Request object which is used for both job requests and resource offers. It holds the size of the request or the resource being offered. It also tracks the time it was created so that time metrics can be taken.

###scheduler.{h, cpp} This file is an abstract base class for schedulers. It exposes methods for adding jobs and resources. It has protected methods that its descendants can call to pretty print job schedulings. It also has a pure virtual method for scheduling which its descendants must implement. By default it has queues of Request objects for jobs and resources.

###fifo.{h, cpp} This is a basic implementation of the fifo scheduler that was suppsoed to be the default. It uses the built in queues for jobs and resources

###wpqs.{h, cpp} This is my implementation of a scheduler. It is supposed to use a weighted priority queue to determine who should be scheduled next. It is, unfortunately in its current state, just a priority queue based on the size of the request. This works a bit better than just a fifo queue because job starvation where small jobs are blocked by larger jobs is not possible. However if a series of small jobs come in, a large job will be blocked. I wanted to use the amount of time waiting to create a weighted priority, but was not able to get a good result in this manner, so I just reverted to a priority queue for the time being.

scheduler's People

Contributors

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