Question: You are tasked with implementing a table-driven scheduler for a real-time system, using Java. The scheduler should be able to handle a fixed set of
You are tasked with implementing a table-driven scheduler for a real-time system, using Java. The scheduler should be able to handle a fixed set of tasks, each with its own period and execution time. You will need to implement a TableDrivenscheduler class that reads the task set from a table, schedules each task according to its period, and repeats the process indefinitely. Requirements: Your implementation must meet the following requirements: The scheduler should be implemented in a TableDrivenscheduler class. The task set should be represented as a two-dimensional array, where each row represents a task and has two velues: the task's period and execution time, respectively. The scheduler should use the table to determine the order in which tasks are scheduled. The scheduler should repeat the scheduling process indefinitely. The scheduler should print a message when a task is started and when it finishes. Pseudo code discussed in the class int schedTablesize =3; Int entry =0 time handler() int next time; current = schedTable[entry].task // next time = sched Table[entry].time + getTime(d: next_time = current. time + getTime0: (Absolute time) entry =(entry+1) schedTablesize; set_timer(next_time) ) Taskset Entry Task E Period 0T1310 1 T2 240 2 Ts 560
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
