SFWR ENG 4AA4 Assignment 4 Solution

SFWR ENG 4AA4 Assignment 4 Solution - Assignment 4...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Assignment 4 , Mechtron/Sfwr Eng 4aa4 Sample Solution 1) Explain the differences between RM, DM, EDF scheduling. Which of these follow a dynamic priority policy?[3] Ans: All are priority based algorithms. In RM priority of a task is fixed based on its period and it remains fixed during the life time of the system, whereas in DM the priority is fixed based on the deadline of a task. A task that has the shortest period/relative deadline has the highest priority. In EDF priorities are calculated based on absolute deadlines of different tasks at a given time. The task that has the earliest absolute deadline gets the highest priority. EDF is a dynamic priority algorithm in which priorites of tasks keep on changing dynamically. 2) Consider the following 5 independent tasks with the specified periods: A(30, 5), B (4, 1), C (10, 2), D (8, 1), E (20, 1) a) Confirm that the task set is EDF schedulable.[2] As the periods of the tasks are equal to their deadlines, to be EDF schedulable: n ei ≤1 U= p i=1 i 5 1 2 1 1 ++ ++ = 0.79166 ≤ 1 30 4 10 8 20 Therefore the task set is EDF schedulable. U= b) Draw a graph showing how an EDF (Earliest Deadline First) policy would attempt to schedule the tasks for t = 0 to 40. [5] 1 Figure 1: 2 3) Consider an overloaded system consisting of the following task set: T1 (2, 1), T2 (5, 3) a) Graphically show a schedule based on RM algorithm and another based on EDF algorithm for 15 time units.[4 + 4] b) Comparing the two schedules, what can be concluded about predictability of the two algorithms? [2] Figure 2: EDF and RM schedules Comparing the two schedules it is obvious that RM is more pridictable as the same lower priority task misses the dealines. 3 ...
View Full Document

This note was uploaded on 12/13/2011 for the course SOFTWARE E SFWR ENG 4 taught by Professor Bokhari during the Fall '11 term at McMaster University.

Page1 / 3

SFWR ENG 4AA4 Assignment 4 Solution - Assignment 4...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online