Answers: 1 . (8 points) Suppose that a n automobile microcontroller has four pri
ID: 3758066 • Letter: A
Question
Answers:
1. (8 points) Suppose that an automobile microcontroller has four priority levels for interrupts (level 1 being the highest). The units interrupting the controller include an impact sensor subsystem, which needs attention within 0.1 ms, along with four other subsystems as follows:
Subsystem
Interrupt rate
Max service time(ms)
Fuel/ignition
500/sec
1 ms
Engine temperature
1/sec
100 ms
Dashboard display
800/sec
0.2 ms
Air conditioner
1/sec
100 ms
Use rate monotonic scheduling to assign a priority to each subsystem that guarantees the response time of 0.1 ms for the impact sensor and handles each of the other critical units before the next interrupt is produced.
a. Justify your priority assignments.
b. Does RMA guarantee schedulability?
Answers:
1. (8 points) Suppose that an automobile microcontroller has four priority levels for interrupts (level 1 being the highest). The units interrupting the controller include an impact sensor subsystem, which needs attention within 0.1 ms, along with four other subsystems as follows:
Subsystem
Interrupt rate
Max service time(ms)
Fuel/ignition
500/sec
1 ms
Engine temperature
1/sec
100 ms
Dashboard display
800/sec
0.2 ms
Air conditioner
1/sec
100 ms
Use rate monotonic scheduling to assign a priority to each subsystem that guarantees the response time of 0.1 ms for the impact sensor and handles each of the other critical units before the next interrupt is produced.
a. Justify your priority assignments.
b. Does RMA guarantee schedulability?
Explanation / Answer
Failing to do an accurate real time schedule design for a safety critical system means that designers do not know if the system will miss deadlines. It is impractical in a complex system (which means almost any real-world product) to do enough testing with a multitasked RTOS-based system to ensure that deadlines will be met under worst case conditions. Thus, a design team that fails to do scheduling analysis should appreciate that they have an unknown probability of missing deadlines, and can reasonably expect to miss deadlines in the worst case if the CPU load is above about 69% for a large number of non-harmonic tasks.
Priority-based scheduling
Many real-time systems use preemptive multitasking, especially those with an underlying real-time operating system (RTOS). Relative priorities are assigned to tasks, and the RTOS always executes the ready task with highest priority.
In this case, the scheduling algorithm is the method in which priorities are assigned. Most algorithms are classified as static priority, dynamic priority, or mixed priority. A static-priority algorithm assigns all priorities at design time, and those priorities remain constant for the lifetime of the task. A dynamic-priority algorithm assigns priorities at runtime, based on execution parameters of tasks, such as upcoming deadlines. A mixed-priority algorithm has both static and dynamic components. Needless to say, static-priority algorithms tend to be simpler than algorithms that must compute priorities on the fly.
To demonstrate the importance of a scheduling algorithm, consider a system with only two tasks, which we'll call Task 1 and Task 2. Assume these are both periodic tasks with periods T1 and T2, and each has a deadline that is the beginning of its next cycle. Task 1 has T1 = 50 ms, and a worst-case execution time of C1 = 25 ms. Task 2 has T2 = 100 ms and C2 = 40 ms. Note that the utilization, Ui, of task i is Ci/Ti. Thus U1 = 50% and U2 = 40%. This means total requested utilization U = U1 + U2 = 90%. It seems logical that if utilization is less than 100%, there should be enough available CPU time to execute both tasks.
Let's consider a static priority scheduling algorithm. With two tasks, there are only two possibilities:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.