Giter Club home page Giter Club logo

eemcs-wip's Introduction

====================================================
ENERGY-EFFICIENT MIXED-CRITICALITY SCHEDULER (EEMCS)
====================================================

=========
Algorithm
=========

--> The driver code starts fetches the input task parameters and begins the simulation.
--> The task preprocessing functions store the input parameters in a task structure array and sort it in decreasing order of criticality levels and utilizations (for offline task allocation).
--> The offline task allocator then sequentially allocates low-period tasks and high-period tasks to cores using a criticality-aware modified bin packing scheme while ensuring EDF-VD schedulability in each core. The algorithm attempts to maximize the number of shutdownable cores by limiting all the low-period task allocations to a minimal required subset of all the available cores.
--> The runtime scheduler loop then executes at every decision point for all cores. 
	--> The scheduling decision points include: 1. Arrival 2. Current job termination 3. Criticality level change due to wcet budget overrun at current level 4. Job overrun 5. Core wakeup
 	--> If the decision point is due to a job arrival: ready jobs (active/discarded) are added to their allocated core's run queue (active) or discarded queue (discarded). If the core is not ACTIVE at the moment, add job to pending request queue.
 	--> If the decision point is due to job termination: 
 		--> If run queue is non-empty: the next active job is scheduled and the maximum procrastination interval (slack time) is computed for each core. If the discarded job queue is non-empty, the highest criticality discarded job's is accommodated in one of the cores if enough slack time is available.
 		--> If run queue is empty: the maximum procrastination interval (slack time) is computed for each core. If this interval exceeds the SHUTDOWN THRESHOLD, the core is SHUTDOWN and the counter for WAKEUP is initialized. Else, (i.e. if this interval is less than the predetermined SHUTDOWN THRESHOLD), DVFS optimizations are triggered (wip).
 	--> If the decision point is due to job exceeding its wcet budget: the criticality level of the system is updated / if it triggers a mode change, the criticality mode and virtual deadlines of all the jobs in the system are updated.
 	--> If the decision point is due to job overrun: the job is aborted, criticality level remains unchanged.
 	--> If the decision point is due to core waking up: the core status is reset and it execution is resumed by copying all jobs in the pending request queue to the core's run queue. 
 	--> At every decision point, the scheduler schedules the next job / updates currently executing job's parameters, handles preemptions for all the active cores.

=============
List of Files
=============

--------
.h files
--------

--> header.h: Contains all the ADT definitions and function declarations.

--------
.c files
--------

--> driver.c: File which contains main. Takes inputs and starts the simulation.
--> tasks.c: Contains task structure array preprocessing functions.
--> allocator.c: Contains all the functions related to the working of the criticality-aware offline task allocator. A modified bin-packing scheme is followed -- low period tasks are first accomodated, followed by the remaining (high period tasks) using a criticality-aware WFD/FFD scheme. 
--> scheduler.c: Contains all the functions related to the working of the runtime scheduler. The jobs of active tasks in each core are scheduled using partitioned EDF-VD and all the discarded jobs are scheduled globally in the slack time generated by these jobs. 
--> dp_slack.c: Contains all the functions related to the working of the dynamic procrastinator, slack calculator and discarded job scheduler.

---------------
.txt input file
---------------

--> input.txt: Contains the taskset input for which the scheduling algorithm is simulated.

The input file format is as follows:

<total number of tasks>
<total number of criticality levels>

In the following lines, enter parameters for each task in the taskset as follows:
<task phase>	<task period>	<task deadline>	<task criticality>	<wcet @ 1>	<wcet @ 2>   ...   <wcet @ task criticality>	 	 

----------------
.txt output file
----------------

-- NA -- [currently printing out the results to the terminal for verifiction]

--------
makefile
--------
 
Makefile: used to compile the code

==============
How to Compile
==============

--> Type 'make' or 'make all' in the terminal to compile the program

==============
How to Execute
==============

--> Type ./test in the terminal to execute the program

==================
Output of the Code
==================

--> Unformatted [currently printing out output SCHEDULE with debug prints]

eemcs-wip's People

Contributors

akankshac-073 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.