410 likes | 631 Views
Aperiodic Task Scheduling for Hard Real-Time Systems. There are different types of tasks. Some background information:. Execution time: Period: Utilization… for the i - th task: for the system: (“Ideal” system utilization is 70% 1 .)
E N D
Some background information: • Execution time: • Period: • Utilization… for the i-th task: for the system: (“Ideal” system utilization is 70%1.) • Response Time = (completion) - (request)
You have tasks – now schedule them! • Meet hard timing deadlines • High schedulable utilization • Fast average response times • Transient overload stability
Rate Monotonic Scheduling Shorter Period Higher Priority • guarantees schedulability • is very likely schedulable • Static priority low scheduling overhead
Background servicing and polling tasks have drawbacks. • Not-so-great response time • Wasted execution time • What if we could respond to aperiodic tasks right away, and preserve execution time?
Background servicing and polling tasks have drawbacks. • Not-so-great response time • Wasted execution time • What if we could respond to aperiodic tasks right away, and preserve execution time? Bandwidth Preserving Algorithms
Priority Exchange (PE) • If aperiodic tasks are pending, service them • If not, server and highest priority periodic task exchange priorities • Aperiodic requests preempt periodic tasks in the event of a priority tie
Both DS and PE algorithms have benefitsover the other. • DS easier to understand and implement • “Server Size” – server’s utilization “Periodic Scheduling Bound” PE: DS: • Given , PE has better Given , PE has better
We want the benefits of both DS and PE in one algorithm. Sporadic Server Algorithm (SS)
Vocabulary • = currently executing priority level = a priority level is active is idle • = time at which server’s execution time is replenished (for a given )
set when active (if time was consumed) • Replenishment amount set when idle or server depleted
set when active (if time was consumed) • Replenishment amount set when idle or server depleted
set when active (if time was consumed) • Replenishment amount set when idle or server depleted
This all sounds great, but how do you schedule a sporadic server? • Rate-monotonic algorithm requires that ready-to-execute tasks execute immediately Server Server
This all sounds great, but how do you schedule a sporadic server? • Rate-monotonic algorithm requires that ready-to-execute tasks execute immediately Server Server
Theorem 2: Schedule it like a periodic task. • Sporadic server periodic task w/ same • Server unconsumed delayed request • Server completely consumed normal • Server partially consumed combination Theorem 1: (see board) “Critical Instant” = t(longest response time) “Critical Zone” = t(complete) – critical instant Schedulable = for all tasks, critical zone < deadline
1. Sporadic server periodic task w/ same Lemma 1: A task set schedulable with is also schedulable if is split into tasks whose C’s sum to and each with T equal to . Lemma 2: If in a task set is replaced with a sporadic server with identical requests, the server’s behavior will be the same as .
2. Server unconsumed delayed request • (see board) • Delayed periodic request is OK! • Doesn’t make critical zones longer • All tasks remain schedulable
3. Server completely consumed normal • (see board) • Same as Lemma 2 – consume and replenish! • All tasks remain schedulable
4. Server partially consumed combination • (see board) • We can split server in two by Lemma 2 • One part is just a normal period • One part is a period with a delay • All tasks remain schedulable
Our sporadic server algorithm doesn’t necessarily work for sporadic tasks.
How can we check schedulabilityof combined deadline- & rate- monotonic servers?
Summary • Soft deadline aperiodic tasks share RM SS • Sporadic tasks each have dedicated DM SS • SS algorithm • Easy to implement (like DS) • Larger server size (like PE) • Good response time (like DS and PE) • SS works for soft- and hard-deadline aperiodic tasks • We can test schedulability for all task sets
Acknowledgements 1: Real-Time Systems Design and Analysis, 3rded, Phillip A. Laplante