Skip to content

Real Time Scheduling Simulator that uses one of the 3 Scheduling: 1.Rate Monotonic (RM) 2.Earliest Deadline First (EDF) 3.Deadlne Monotonic to test whether a batch of tasks/jobs from a file will be completed before their deadline

Notifications You must be signed in to change notification settings

Ayoub-HEDFI/Real-Time-Scheduling-Simulator

 
 

Repository files navigation

Real Time Scheduling Simulator

Table of Content

  1. Introduction
  2. How To Run File
  3. Input File Format

Introduction

Real Time Scheduling Simulator that uses one of the 3 Scheduling Algorithm:

  • Rate Monotonic (RM)
  • Earliest Deadline First (EDF)
  • Deadlne Monotonic (DM)

to test whether a batch of tasks/jobs from a file will be completed before their deadline.

How To Run File

  1. Open terminal and navigate to project folder
  2. In terminal execute: make RTS_Simulator (Compile all the files)
  3. In terminal execute: ./RTS_Simulator (Executes the program)
  4. Enter and run one of the program command listed below

Program Command Format

Simulate Scheduling Algorithm

  • sim [view] [algorithm] < [input_file]

    [view] - Displays different views.

    • -d => Gives the user a detailed view of the simulated information.
    • -v => Gives the user a verbose view of the simulated information.
    • Without this parameter the user gets a minimal view.

    [algorithm] - Allows the user to execute the input file using different algorithm.

    • -a RM => Rate Monotonic Algorithm.
    • -a EDF => Earliest Deadline First Algorithm.
    • -a DM => Deadline Monotonic Algorithm.
    • User MUST select an algorithm.

    [input_file] - Allows the user to specify the name of the input file which is stored in the Process_Files folder.

    Example of sim command: $ sim -d -a RM < file1.txt


Generate Input File

  • gen [number_of_process] [mode] > [output_file]

    [number_of_process] - Allows the user to generate a specific number of processes; greater than 5.

    • -n <number_of_process> => The number-of-process must be 5 or greater.
    • Without this parameter the program generates a random number of processes between 5 and 10.
      NB. The upper bound can be changed in the FileGeneration.h file by changing the value of MAX_PROCESSES.

    [mode] - Changes the version of input file that will be generated.

    • -d => The context switch is equal to 5 and the arrival times are different.
    • Without this parameter thecontext switch is equal to 0 and the arrival time for all processes becomes 0.

Input File Format

number_of_processes process_switch
process_number arrival_time burst_time relative_deadline period
process_number arrival_time burst_time relative_deadline period
.
.
.

Example:

4 0
1 0 2 16 10
2 0 1 8 5
3 0 5 16 30
4 0 2 20 15

About

Real Time Scheduling Simulator that uses one of the 3 Scheduling: 1.Rate Monotonic (RM) 2.Earliest Deadline First (EDF) 3.Deadlne Monotonic to test whether a batch of tasks/jobs from a file will be completed before their deadline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.3%
  • Makefile 0.7%