real time systems - iit delhi

80
Real Time Systems Real-Time Systems Jane W. S. Liu, University of Ilinois at Urbana-Champaign

Upload: others

Post on 25-Dec-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Real Time Systems - IIT Delhi

Real Time Systems

Real-Time Systems

Jane W. S. Liu, University of Ilinois at Urbana-Champaign

Page 2: Real Time Systems - IIT Delhi

Real Time Types

Page 3: Real Time Systems - IIT Delhi
Page 4: Real Time Systems - IIT Delhi

Real time is not necessarily fast

● Fast means low average latency● Real time needs predictable worst case performance● One needs to mathematically prove that all deadlines

will be met even in the worst case– For uniprocessor system and periodic tasks, mathematical

proofs were given in 1970-1990. Now one has to perform some schedulability tests, and if the tests pass, the deadlines are guaranteed to be met.

– Linux real time patch is designed to be real time, but is not real time, as the code base is too complex for giving mathematical guarantees

– It has a number of changes to improve reliability/predictability

Page 5: Real Time Systems - IIT Delhi

Other real time system classifications● Based on where it runs

– Uniprocessor

– Multicore

– Distributed

● Based on time characteristics of tasks– Periodic

– Aperiodic

– Sporadic

● Based on when scheduling decisions are taken– Clock based

– Event based

– Hybrid

Page 6: Real Time Systems - IIT Delhi
Page 7: Real Time Systems - IIT Delhi
Page 8: Real Time Systems - IIT Delhi
Page 9: Real Time Systems - IIT Delhi

( )

Page 10: Real Time Systems - IIT Delhi
Page 11: Real Time Systems - IIT Delhi
Page 12: Real Time Systems - IIT Delhi
Page 13: Real Time Systems - IIT Delhi
Page 14: Real Time Systems - IIT Delhi
Page 15: Real Time Systems - IIT Delhi
Page 16: Real Time Systems - IIT Delhi
Page 17: Real Time Systems - IIT Delhi
Page 18: Real Time Systems - IIT Delhi
Page 19: Real Time Systems - IIT Delhi
Page 20: Real Time Systems - IIT Delhi
Page 21: Real Time Systems - IIT Delhi
Page 22: Real Time Systems - IIT Delhi

Schedulability Tests

Page 23: Real Time Systems - IIT Delhi
Page 24: Real Time Systems - IIT Delhi
Page 25: Real Time Systems - IIT Delhi

Data structure space and insertion times are too high for typical embedded real time platforms and applications

Page 26: Real Time Systems - IIT Delhi
Page 27: Real Time Systems - IIT Delhi
Page 28: Real Time Systems - IIT Delhi
Page 29: Real Time Systems - IIT Delhi
Page 30: Real Time Systems - IIT Delhi
Page 31: Real Time Systems - IIT Delhi
Page 32: Real Time Systems - IIT Delhi
Page 33: Real Time Systems - IIT Delhi
Page 34: Real Time Systems - IIT Delhi
Page 35: Real Time Systems - IIT Delhi
Page 36: Real Time Systems - IIT Delhi
Page 37: Real Time Systems - IIT Delhi
Page 38: Real Time Systems - IIT Delhi
Page 39: Real Time Systems - IIT Delhi
Page 40: Real Time Systems - IIT Delhi
Page 41: Real Time Systems - IIT Delhi
Page 42: Real Time Systems - IIT Delhi
Page 43: Real Time Systems - IIT Delhi
Page 44: Real Time Systems - IIT Delhi
Page 45: Real Time Systems - IIT Delhi
Page 46: Real Time Systems - IIT Delhi
Page 47: Real Time Systems - IIT Delhi
Page 48: Real Time Systems - IIT Delhi
Page 49: Real Time Systems - IIT Delhi
Page 50: Real Time Systems - IIT Delhi
Page 51: Real Time Systems - IIT Delhi
Page 52: Real Time Systems - IIT Delhi
Page 53: Real Time Systems - IIT Delhi
Page 54: Real Time Systems - IIT Delhi
Page 55: Real Time Systems - IIT Delhi
Page 56: Real Time Systems - IIT Delhi
Page 57: Real Time Systems - IIT Delhi
Page 58: Real Time Systems - IIT Delhi
Page 59: Real Time Systems - IIT Delhi
Page 60: Real Time Systems - IIT Delhi
Page 61: Real Time Systems - IIT Delhi
Page 62: Real Time Systems - IIT Delhi
Page 63: Real Time Systems - IIT Delhi
Page 64: Real Time Systems - IIT Delhi
Page 65: Real Time Systems - IIT Delhi
Page 66: Real Time Systems - IIT Delhi
Page 67: Real Time Systems - IIT Delhi
Page 68: Real Time Systems - IIT Delhi
Page 69: Real Time Systems - IIT Delhi
Page 70: Real Time Systems - IIT Delhi
Page 71: Real Time Systems - IIT Delhi
Page 72: Real Time Systems - IIT Delhi
Page 73: Real Time Systems - IIT Delhi
Page 74: Real Time Systems - IIT Delhi

Bounded Priority Inversion

Page 75: Real Time Systems - IIT Delhi

Unbounded Priority Inversion

Page 76: Real Time Systems - IIT Delhi

Priority Inheritence

Page 77: Real Time Systems - IIT Delhi

Transitive Priority Inheritence

Page 78: Real Time Systems - IIT Delhi

Ceiling Priority Protocol

● In the ceiling priority protocol, the priority of every task is known, as are the resources required by every task.

● For a given resource, the priority ceiling is the highest priority of all possible tasks that might require the resource.

● For example, if a resource R is required by four tasks (T1 of priority 4, T2 of priority 9, T3 of priority 10, and T4 of priority 8), the priority ceiling of R is 10, which is the highest priority of the four tasks.

● With the ceiling priority protocol, the task inherits the priority ceiling of the resource as soon as the task acquires the resource even when no other higher priority tasks contend for the same resource.

● This rule implies that all critical sections from every sharing task have the same criticality level. The idea is to finish the critical section as soon as possible to avoid possible conflicts.

Page 79: Real Time Systems - IIT Delhi

Ceiling Priority Protocol Rules

Page 80: Real Time Systems - IIT Delhi

Next week classes

● Commercial and free RTOS– Hard real time guarantees

● Linux Real Time patch– No guarantee, but design for more predictability

● Minor 2 (due on Oct 11):– Build raspbian from source (CFS scheduler)

– Apply BFS patch

– Apply Preempt RT patch

– Run same benchmark with three different schedulers and report average and worst case latencies