Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 Schedulability and Tasks

Similar presentations


Presentation on theme: "Lecture 4 Schedulability and Tasks"— Presentation transcript:

1 Lecture 4 Schedulability and Tasks

2 Priority Two independent properties of actions are important in real time system: Urgency is the timeliness constraint of action. Importance is the value of computational action to the system. Scheduling systems do not commonly contain these abstractions. They provide a low level abstraction called priority. The priority of a task is used to resolve disputes over which tasks execute when more than one task is waiting and ready to execute. Do not get confused: Importance of a task is the value of the completion of the action relative to the overall system goals. The task’s priority has to do with which task “wins” when more than one is available to run. *High priority is represented by low or high numerical – OS dependent.

3 Example Monitoring device. There is a high bandwidth waveform data.
An alarm must be reported within 10 sec. Waveform displays with more than 100ms delay would be unacceptable to user. It is not critical, but has tight timeliness with a hard deadline. Alarm handling is crucial for the system, but the user would not even notice half second delay in alarms. It is critical, but has broad timeliness with a soft deadline. Therefore, alarm handling will have lower priority to ensure that high bandwidth waveform data usually “wins” and its display is smooth. Task with hard deadline has higher priority than a task with a soft deadline.

4 Schedulability Timeliness of an action has to do with the action meeting its time constraints. The basic concept of timeliness in real-time systems is that action must begin in response to event arrival or due time arrival, and it must complete within a certain time after it begun. Schedulable task: task that can be determined whether it always meets its timeliness constraints. Deterministically schedulable task: as a special case, always guaranteed to meet all its deadlines. Event’s worse-case response time is less than task’s deadline.

5 Schedulability Scheduling analysis of hard real-time system is more straightforward, deterministic and predictable. Scheduling analysis of soft real-time system is more complicated, not always deterministic and not always predictable. Considering all deadlines to be hard is an approximation making the analysis easier but too strict. Assuming worst-case execution time, analysis may derive a conclusion that the system is not schedulable. But a soft-real system may still meet all its mission requirements.

6 Scheduling Determination of the policies that decide which tasks execute when multiple tasks are available. It is always a design concern!

7 Tasks states

8

9 Scheduling terms Preemptive – operating system may swap out tasks,
Non-preemptive – the task must voluntarily to give up control. A task is blocked when it is ready to run but cannot because a lower-priority task owns a required resource. Blocking is unavoidable in preemptive scheduling in which resources are shared among tasks. However, the blocking must be bounded so that worst case blocking may be computed. Unbounded priority inversion – high priority tasks may be blocked from execution by an indefinite set of other tasks.

10 Unbounded priority inversion – example

11 Unbounded priority inversion – example
Task A has the highest priority Every task by itself can be scheduled Look like even if task C locks the resource, task A will still meet its deadlines.

12 Unbounded priority inversion – example

13 Scheduling algorithms

14 Deadline Scheduling

15

16

17 Scheduling Algorithms
Round Robin – the task with equal priority get equal time slot. Preemptive scheduling. Earliest deadline first – the task with the closest deadline gets to run. Least laxity (dynamic scheduling) – laxity is a time to deadline minus remaining execution time. Task are scheduled in ascending order of their laxity.

18 Final Project In the final project, each group must implement scheduler using either algorithm 2 or algorithm 3.


Download ppt "Lecture 4 Schedulability and Tasks"

Similar presentations


Ads by Google