top of page

Real-time task schedules I machine learning assignment help

Updated: Dec 28, 2021

Assignment Description

This programming assignment requires you to create a set of real-time task schedules along with DVFS settings corresponding to each task. This homework can be done on your PC using any programming language you choose to use. Your script or program will process an input text file that includes a list of tasks to be executed, their deadlines, and generates an output file listing a sequence of scheduling decisions based on four different scheduling policies: EDF, RM, Energy Efficient (EE) EDF and EE RM.(There are two input file you should test both of them in each method) Assume each task has a period that is equal to its deadline. For this programming assignment, we limit CPU to maximum four different frequencies/power settings. When CPU is not running a task, it consumes idle power at the lowest frequency.

The command line arguments of your program should be $ your_program <input_file_name> <EDF or RM> [EE]

The command line arguments of your program should be $ your_program <input_file_name> <EDF or RM> [EE]

In other words, the parameters are the file name, the scheduling strategy (either EDF or RM), and optionally EE (which stands for energy efficient). Two example calls could be:

$ ./my_solution input.txt EDF EE

$ ./my_solution input.txt RM

Below is an example of the input file (we use tab here for readability, but the actual file will be space-delimitated). You may copy the following into a text file and use it for testing. Be sure to substitute the tabs with space characters. Note that all power values are in mW, and all execution times/deadlines are specified in seconds.

5 1000 625 447 307 212 84

w1 520 53 66 89 141

w2 220 40 50 67 114

w3 500 104 134 184 313

w4 200 57 74 103 175

w5 300 35 45 62 104

The first row represents: <# of tasks> < the time the system will execute up to in seconds>

<active CPU power @ 1188 Mhz> <active CPU power @ 918 Mhz> <active CPU power @ 648 Mhz> <active CPU power @ 384 Mhz> <idle CPU power @ lowest frequency>

All other rows represent: <name of task> <deadline/period> <WCET @ 1188 Mhz> <WCET @ 918 Mhz> <WCET @ 648 Mhz> <WCET @ 384 Mhz> (WCET = worst-case execution time)

As the deliverable of this programming assignment, your program should parse such an input file, and generate scheduling sequences based on following four algorithms:

  • EDF: Earliest deadline first when all tasks run at maximum CPU frequency

  • RM: Rate-monotonic when all tasks run at maximum CPU frequency

  • EE EDF/RM: Your scheduler needs to adjust the frequency of the CPU to be as low as possible (however, you still need to make sure that lowering the frequency for a task results in lower energy – remember that low power does not always mean low energy) while still meeting the deadlines and ensuring tasks are still scheduled in order as defined by either EDF or RM policy. An intuitive way to think about this is that you change each task’s frequency to fill in ‘gaps’ in the schedule, while not violating the deadlines.

bottom of page