项目作者: Blockost

项目描述 :
Process scheduler in C
高级语言: C++
项目地址: git://github.com/Blockost/scheduler.git
创建时间: 2017-05-11T21:03:34Z
项目社区:https://github.com/Blockost/scheduler

开源协议:

下载


Readme

Documentation

A special Doxygen documentation has been written for this project. You can read it as html by going to $PROJECT_ROOT/docs/html/index.html.
You can also build your own documentation using the latex sources at $PROJECT_ROOT/docs/latex.

Prerequisite

In order to compile and run this project you must have installed on your computer the followings : CMake, Boost, OpenMP

  1. # apt-get install cmake libboost-all-dev libopenmpi1.6

Compile sources

To compile sources, you will have to run the following lines :

  1. $ mkdir bin && cd bin && cmake .. && make

It will create a folder name ‘bin’, navigate to it, build the Makefile, and run the Makefile.

Populating

Use -c or —client as argument on the scheduler’s executable to start the client. It will populate the queue with your tasks.

  1. $ ./Scheduler -c

Scheduling

Use -s or —sequential to start the scheduler in sequential mode. Use -p or —parallel to start in parallel.

  1. $ ./Scheduler -s

Algorithm

  1. WHILE timer not expired DO
  2. -- New task incoming...
  3. IF no processor can handle it (processors would be overloaded)
  4. Wait for a processor to unload
  5. ELSE
  6. IF one processor is empty (no task running)
  7. Attach the task to it
  8. ELSE
  9. Get the less-loaded processor
  10. Attach task to it
  11. END
  12. END
  13. END