Giter VIP home page Giter VIP logo

semi-clairvoyant-mcs / mcqpa-sim-expts Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 219 KB

This code simulates the exact schedulability test for EDF scheduling of semi-clairvoyant sporadic task systems with graceful degradation using the following two algorithms: (i) the previously proposed approach (listed as Algorithm 1 in the paper) and (ii) Mixed-Criticality Quick Processor-demand Analysis or MC-QPA (listed as Algorithm 2 in the paper).

License: MIT License

C 98.87% Makefile 1.13%
edf edf-scheduling schedulability-analysis semi-clairvoyance task-scheduling graceful-degradation mixed-criticality-systems mixed-critical-systems scheduling-problem mcqpa

mcqpa-sim-expts's Introduction

AN EFFICIENT SCHEDULABILITY ANALYSIS OF SEMI-CLAIRVOYANT SPORADIC TASK SYSTEMS WITH GRACEFUL DEGRADATION

# How to Compile:
=================
	
1. Go to the path where the .c and .h files are stored.
2. (Optional) Type "make clean" in the terminal to get rid of all the object, executable and output files.
3. Either type "make" or "make all" in the terminal to compile.

# How to Execute:
=================

1. Compile the code as mentioned above.
2. The program expects two command line arguments "<executable name> <input method>".
   - Type "./bin/test f" in the terminal to execute the program by providing taskset inputs via file "input.txt".
   - Type "./bin/test t" in the terminal to execute the program by generating taskset inputs via the task parameter generator module included in the code.

# Structure of the program:
===========================

1. driver.c takes the required input in one of the following two ways (input method is passed as the second argument after executable name via command line):
   - If the second argument is 'f' --> The program accepts an input file "input.txt" containing task set parameters for all tasksets.
   - If the second argument is 't' --> The program generates the task set parameters for all tasksets.
2. The program may thus proceed in one of the following two ways:
	 - In case of input method 'f', the "fetch_task_parameter" function is called by the driver to read task parameters from the input file "input.txt".
	 - In case of input method 't', the "task_parameter_generator" function is called by the driver to generate taskset parameters using the method described in section 5.1 of our paper.
3. The schedulability test is applied to the generated / fetched tasksets using both the algorithms (presented in section 4 of the paper) to determine whether it is EDF schedulable.	
4. Based on the return values of the schedulability test functions, the final outputs are recorded.
5. The output of the code is printed out on the terminal screen and stored as comma separated values in the file "output.csv".

# Directory structure:
=====================

mcqpa-sim-expts
├── bin
│   └── test
├── inc
│   ├── auxiliary.h
│   ├── generator.h
│   ├── schedtest.h
│   └── tasks.h
├── input.txt
├── LICENSE
├── makefile
├── obj
│   ├── auxiliary.o
│   ├── driver.o
│   ├── generator.o
│   ├── iterative.o
│   └── mcqpa.o
├── README.txt
├── references.txt
└── src
    ├── auxiliary.c
    ├── driver.c
    ├── generator.c
    ├── iterative.c
    └── mcqpa.c

4 directories, 20 files

# List of Files:
================

Program files:
--------------

1. driver.c: Contains main. The driver module takes / generates the input tasksets and starts the simulation.
2. tasks.h: Contains task ADT definition and related macros.
3. generator.c: Contains task set parameter generator functions.
4. generator.h: Contains macros (defined for default parameter values/limits) and function declarations for the task set generator module.
5. iterative.c: Contains implementation of the exact EDF schedulability test for 3-parameter sporadic task systems [3] --> Listed as Algorithm 1 in the paper
6. mcqpa.c: Contains implementation of the proposed schedulability test, MC-QPA --> Listed as Algorithm 2 in the paper
7. schedtest.h: Contains macros (for return values), function declarations and ADT definitions for the schedulability test modules.
8. auxiliary.c: Contains auxiliary functions required by the schedulability test modules.
9. auxiliary.h: Contains function declarations for the auxiliary functions module.

Makefile:
---------

10. makefile: Used to compile the code.

Input file:
-----------

11. input.txt: Required when input menthod 'f' is used, i.e., taskset parameters are provided via file. The format of the file is as follows:
    <number of tasksets>
    <number of tasks in the i-th taskset>
    <period>	<deadline>	<criticality>	<wcet[LO]>	<wcet[HI]>    --.
    <period>	<deadline>	<criticality>	<wcet[LO]>	<wcet[HI]>	|
       .	    .		      .	    	    .       	    . 		|-- Task parameters 
       .	    .		      .	    	    .	    	    .		|   for i-th taskset
    <period>	<deadline>	<criticality>	<wcet[LO]>	<wcet[HI]>    --'
        

	--> NOTE THAT:
	    * Period and deadline must be positive integers.
	    * Criticality value '0' represents LO, '1' represents HI.

Output file:
------------

12. output.csv: Contains the following information in the form of comma seprated values
For input method 't': Taskset utilization, Weighted Schedulability, Number of interval lengths checked by Iterative test and MC-QPA, Number of (t,s) pair-points checked by Iterative test and MC-QPA
For input method 'f': Schedulability of each taskset>, Number of interval lengths checked by Iterative test and MC-QPA>, Number of (t,s) pair-points checked by Iterative test and MC-QPA

References:
-----------

13. references.txt: The sources used for some of the algorithms in our code are cited in this file.


mcqpa-sim-expts's People

Contributors

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