0% found this document useful (0 votes)
11 views5 pages

CB308 Lecture5-6 StudyGuide

The document covers lectures on scheduling periodic and sporadic tasks, emphasizing the importance of handling, testing, and guaranteeing deadlines in real-time systems. It discusses various scheduling strategies, including partitioned and global scheduling, and highlights the significance of admission tests and resource access control protocols like Priority Inheritance and Priority Ceiling. Key takeaways include the need for effective resource management to prevent issues like priority inversion and the trade-offs between predictability and utilization in multiprocessor environments.

Uploaded by

225245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

CB308 Lecture5-6 StudyGuide

The document covers lectures on scheduling periodic and sporadic tasks, emphasizing the importance of handling, testing, and guaranteeing deadlines in real-time systems. It discusses various scheduling strategies, including partitioned and global scheduling, and highlights the significance of admission tests and resource access control protocols like Priority Inheritance and Priority Ceiling. Key takeaways include the need for effective resource management to prevent issues like priority inversion and the trade-offs between predictability and utilization in multiprocessor environments.

Uploaded by

225245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CB308 – Real-Time Auditing & Defense

Lecture 5: Scheduling Periodic & Sporadic Tasks


Lecture 6: Multiprocessor Scheduling & Resource-Access Control

Lecture 5 — Scheduling Periodic & Sporadic Tasks


Slide 1 – Title & Context
• Scheduling Periodic & Sporadic Tasks
• CB308 – Real-Time Auditing & Defense
• Instructor Name · Date
Speaker Notes:

• Tip for students: Visualise periodic tasks like a


metronome; sporadic tasks are surprise claps between
beats.
Slide 2 – Learning Objectives
• Handle periodic & sporadic tasks reliably.
• Apply admission tests for sporadic requests.
• Guarantee deadlines under unpredictable arrivals.
Speaker Notes:

• Keep these three verbs in mind: HANDLE – TEST –


GUARANTEE.
Slide 3 – Arrival-Pattern Review
• Periodic exact inter-arrival T (e.g., 10 ms sensor tick).
• Sporadic ≥ minimum gap Tₘᵢₙ (e.g., push-button).
• Irregular arrivals demand bandwidth control.
Speaker Notes:

• Image placeholder →
Periodic_vs_Sporadic_Timeline.png (full-width).
Slide 4 – Periodic Task Parameters
• Each task: Period T, WCET C, Deadline D.
• CPU utilisation U = Σ C/T.
• RM is optimal among fixed-priority schemes for purely
periodic sets.
Speaker Notes:

• Mnemonic: ‘T-C-D’.
Slide 5 – RM Worked Example
• T1 (10 ms,1 ms), T2 (20 ms,2 ms), T3 (50 ms,5 ms).
• U=0.30 ≤ RM-bound(3)=0.78 schedulable.
• Shortest period → highest priority.
Speaker Notes:

• Image: RM_Gantt_Simple.png (centre).


Slide 6 – Sporadic Task Model
• Sporadic task has min gap T_s; uncontrolled arrivals risk
overload.
• Sporadic server gives budget C_s every T_s.
• Blends with RM or EDF scheduling.
Speaker Notes:

• Diagram: bucket analogy for bandwidth.


Slide 7 – Sporadic Servers in Action
• Capacity replenishes each T_s so backlog bounded.
• Better average response vs polling.
• Implemented in VxWorks POSIX sporadic server.
Speaker Notes:

• Show real trace if available.


Slide 8 – Admission / Acceptance Test
• Compute U_new = U_curr + C_s/T_s.
• Admit if U_new ≤ U_bound (RM) or ≤1 (EDF).
• Otherwise defer or reject request.
Speaker Notes:

• Image: Admission_Test.png (decision diamond).


Slide 9 – Case Study: Packet Filter
• Periodic routing refresh 50 ms (C=5 ms).
• Sporadic firewall checks (T_s=2 ms, C_s=0.3 ms).
• Utilisation kept <70 % to avoid stalls.
Speaker Notes:

• Image: Network_Sporadic_Case.png (centre).


Slide 10 – Key Takeaways & References
• Periodic = heartbeat; Sporadic = bounded bursts.
• Sporadic server + admission test protect deadlines.
• Read: Sprunt 1989; Buttazzo 2011; Liu 2000.
Speaker Notes:

• Quick quiz: What if T_s too small?

Lecture 6 — Multiprocessor Scheduling & Resource-Access Control


Slide 1 – Title & Architecture
• Multiprocessor Scheduling & Access Control
• CB308 – Real-Time Auditing & Defense
• Multi-core ≠ automatic speed-up!
Speaker Notes:

• Image: Multicore_Architecture.png (right).


Slide 2 – Learning Objectives
• Partitioned vs Global scheduling.
• Load-balancing heuristics.
• Priority Inheritance & Priority Ceiling protocols.
Slide 3 – Partitioned vs Global Overview
• Partitioned: offline bin-pack tasks; no migrations at
runtime.
• Global: single ready queue; tasks migrate.
• Trade-off: predictability vs utilisation.
Speaker Notes:

• Draw side-by-side diagrams.


Slide 4 – Partitioned Algorithms
• Heuristics: First-Fit, Worst-Fit, Best-Fit Decreasing.
• NP-hard → approximate solutions.
• Low migration cost; better cache locality.
Speaker Notes:

• Icon: bins and coloured blocks.


Slide 5 – Global EDF & Pfair
• EDF-Global: earliest deadline runs anywhere.
• Schedulable if U_total ≤ m – (m-1)·U_max.
• Pfair/LLREF: fairness by slicing quanta; high migration
cost.
Speaker Notes:

• Image: Global_EDF_Timeline.png (centre).


Slide 6 – Load-Balancing Strategies
• Work-stealing, CPU affinity, migration thresholds.
• Linux RT push/pull; Zephyr SMP idle-pull.
Slide 7 – Priority Inversion Problem
• Low-P task holds mutex, High-P task blocks, Medium-P
pre-empts.
• Mars Pathfinder resets every few sols.
Speaker Notes:

• Timeline sketch of inversion.


Slide 8 – PIP vs PCP
• PIP: mutex owner inherits highest waiter priority.
• PCP: global ceiling prevents deadlock & bounds
blocking.
• Blocking ≤ one lower-priority critical section.
Speaker Notes:

• Image: ResourceSharing_Protocol.png (full-width).


Slide 9 – Pathfinder Case Study
• Original kernel lacked inheritance ➔ reset loop.
• Patch added priority inheritance; fault resolved.
• Lesson: always compute worst-case blocking.
Speaker Notes:
• Image: Pathfinder_Fix.png (right).
Slide 10 – Takeaways & Sources
• Partitioned simpler; Global uses CPU better with
overhead.
• Proper resource protocols avoid deadly inversions.
• Read: Rajkumar 1990; Baruah 1999; Liu 2000.
Speaker Notes:

• Challenge: schedule 90 % load on 2 cores.

You might also like