Misconceptions About Real Time

  • 1,418 views
Uploaded on

 

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,418
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
55
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious Problem for Next Generation Systems , IEEE Computer, 21(10), pp. 10-19, October 1988.
  • 2. Real-Time Computing
    • The correctness of the system
      • Logical result of the computation
        • Functional correctness
      • Time to produce the result
    • Next generation RT system
      • Distributed/adaptive
      • Online guarantees
      • Long lifetime
  • 3. There is no science in RT system design
    • Most good science grew out of attempts to solve practical problems
    • Real-time system engineers need help
      • The first flight of a space shuttle was delayed due to a subtle timing bug due to a transient overload during system initialization
      • A scientific framework to prevent such a bug to be included is needed
      • Real-time scheduling, resource management, RT programming language, …
  • 4. Advances in supercomputer hardware will cover RT requirements
    • One can exploit parallel processors to improve throughput
      • It does not mean timing constraints can be met automatically
    • Unless HW is designed to perfectly match the application, the processors and their communication subsystems may not be able to handle all of the task load and time-critical traffic
      • Real-time task and communication scheduling can get harder as more hardware is used
  • 5.
      • Demand for computational power often exceeds supply
      • Intelligent management of finite resources is required
  • 6. RT Computing = Fast Computing
    • RT computing
      • The objective of fast computing is to minimize the average response time
      • The objective of real-time computing is to meet the individual timing requirement of each task
        • Meet individual task deadlines
      • Fast computing cannot necessarily provide predictability
        • Fastest hardware & software used in the space shuttle failed to support the timing requirements
        • Testing is not the answer
  • 7.
      • Fast is relative
      • Worst case, not average case, response time matters
      • Not speed but predictability is the goal
      • Functional and timing behaviors should be as deterministic as necessary to satisfy system specification
      • Guarantee the delay is shorter than the upper bound
      • Predictability is not only hardware or algorithmic issue
        • The delay statement in Ada only specifies the minimum delay before the next task is scheduled
        • Many things, including scheduling theory, software design, formal methods, RTOS, can change things
  • 8. RT Programming = Assembly Coding, Priority Interrupt Programming, Device Driver Writing
    • Hand-coding may have bugs, especially large RT program
    • Objective in RT research
      • Automate
      • Customized resource scheduler from timing-constraint spec.
  • 9. RT System Research = Performance Engineering
    • To investigate effective resource allocation strategies to satisfy timing-behavior requirement (≈Perf. Engineering)
    • Specification & verification of timing behavior
    • Programming language semantics
    • Theoretical problems
    Common misconceptions(5)
  • 10. Real-time systems function in static environment
    • Not necessarily true
    • Once deployed, real-time systems stay for more than 10 years
    • Many embedded real-time systems these days need configurable, composable RTOS
  • 11. Main Research Issues
    • Specification and verification
      • Modeling and verification of systems that are subject to timing constraints
    • RT scheduling theory
      • Meet the specified timing requirements
      • Support the utilization bound to meet all deadlines
      • Meet as many deadlines as possible, if it is impossible to meet all deadlines
  • 12. Main Research Issues
    • RTOS
      • Guarantee RT constraint
      • Support FT and distribution
      • Scheduling time-constrained resource allocation
    • RT programming language and design methodology
      • High level abstraction to deal with complex real-time systems
      • Management of time
      • Schedulability check
      • Reusable RT software module
  • 13. Main Research Issues
    • (Distributed) RTDB
      • Concurrency in transaction processing
      • RT scheduling algorithm
    • Fault tolerance
      • Formal specification of the timing constraints
      • Error handling
    • RT system architecture
      • Interconnection topology (process, I/O)
      • Fast, reliable, and time-constrained communication
      • Cost-effective and integrated fashion
      • WCET analysis
  • 14. Main Research Issues
    • RT communication
      • End-to-end deadlines
      • Packet scheduling
      • Dynamic routing
      • Network buffer management
    • Wireless Sensor Networks
      • Newly emerging area
      • Small, inexpensive, wireless sensors for RT sensing & control
  • 15. Rate Monotonic, EDF (Earliest Deadline First), and Deadline Monotonic Scheduling Algorithms
    • C. Liu and J. Layland, Scheduling Algorithm for Multiprogramming in a Hard Real-time Environment , Journal of the ACM, 20(1), pp. 41-61, January 1973.
    • N.C. Audsley, A. Burns, M.F. Richardson, and A. J. Wellings, Hard real-time scheduling: The deadline monotonic approach, IEEE Workshop on Real-Time Operating Systems, 1992.
    • N.C. Audsley, A. Burns, M.F. Richardson, and A. J. Wellings, Applying new scheduling theory to static priority preemptive scheduling, Software Engineering Journal, 8(5):284-292, Sept 1993.
  • 16. Terminologies
    • Job
      • Each unit of work that is scheduled and executed by the system
    • Task
      • A set of related jobs
      • For example, a periodic task Ti consists of jobs J1, J2, J3, … coming at every period
    • Release time
      • Time instant at which a job becomes available for execution
      • It can be executed at any time at or after the release time
    • Deadline
      • Time instant by which a job should be finished
      • Relative deadline: Maximum allowable response time
      • Absolute deadline = release time + relative deadline
  • 17.
    • Periodic task T i
      • Period P i
      • Worst case execution time C i
      • Relative deadline D i
    • Job J ik
      • Absolute deadline = release time + relative deadline
      • Response time = finish time – release time
    • Deadline miss if
      • Finish time > absolute deadline
      • Response time of J ik > D i
  • 18. Optimal Scheduling Algorithm
    • A scheduling algorithm S is optimal if S cannot schedule a real-time task set T, no other scheduling algorithm can schedule T
    • E.g., Rate Monotonic & EDF
  • 19. Assumptions
    • Single processor
    • Every task is periodic
    • Deadline = period
    • Tasks are independent
    • WCET of each task is known
    • Zero context switch time
  • 20. Fixed Priority vs. Dynamic Priority Scheduling Algorithms
    • Fixed priority system
      • Assign the same priority to all the jobs in each task
      • Rate monotonic
    • Dynamic priority system
      • Assign different priorities to the individual jobs in each task
      • EDF
  • 21. Rate Monotonic
    • Optimal fixed priority scheduling algorithm
    • Shorter period -> Higher priority
      • Higher rate -> higher priority
    • Utilization bound
  • 22. RM Example  1  2  3 time Task Execution Time (C) End Of Period (T = Period Length)
  • 23. Utilization Bound (UB) Test Processor Utilization for a task, i Utilization Bound for n tasks
    • Results:
    • If U (=  U i ) ≤ U(n) then the set of tasks is schedulable .
    • If U(n) <  U i ≤ 1 then the test is inconclusive .
    • U < U(n) is sufficient but not necessary
    U i = C i T i U(n) = n(2 - 1) 1 n
  • 24. Utilization Bound Test U(3) = 3(2 1/3 – 1) = 0.779 U 1 = 40 / 100 = 0.4 U 2 = 40 / 150 = 0.267 U 3 = 100 / 350 = 0.286 U total = 0.953 Result: U 1+2 = 0.667, schedulable. However, 0.779 < 0.953 < 1 Therefore, inconclusive for  3 . 350 100  3 150 40  2 100 40  1 Period (T) Execution Time (C) Task
  • 25. EDF
    • Shorter absolute deadline -> Higher priority
    • Utilization bound U b = 1
    • U b is necessary and sufficient
  • 26. Comparisons
    • RMS
      • RMS may not guarantee schedulability even when U < 1
      • Low overhead: Priorities do not change for a fixed task set
    • EDF
      • EDF guarantee schedulability as long as U <= 1
      • High overhead: Task priorities may change dynamically
    • For more comparisons, refer to “ Rate Monotonic vs. EDF: Judgment Day ”
  • 27. Assumptions
    • Single processor
    • Every task is periodic
    • Relative deadline = period
    • Tasks are independent
    • WCET of each task is known
    • Zero context switch time
    • What happens if relative deadline < period ?
  • 28. Deadline Monotonic Scheduling Algorithm
    • Shorter relative deadline -> higher priority
    • RMS is a special case of DMS where D i = P i
    • Necessary and sufficient schedulability analysis, called response time analysis , exists
  • 29. Optimal Scheduling Algorithms Relative Deadline < Period
    • DMS
      • Shorter relative deadline -> Higher priority
      • Optimal preemptive fixed priority scheduling
    • EDF
      • Shorter absolute deadline -> Higher priority
      • Optimal preemptive dynamic priority scheduling
  • 30. DMS Response Time Analysis Audsley et al.
    • Tasks are sorted in non-increasing order of priority. (T i has the highest priority)
    for (each task T i ) { I = 0; R=0; while (I + C j > R) { R = I + C i; if (R > D i ) return Unschedulable; I = ∑ k=1, i-1  R/Pi  Ci; } } return Schedulable
  • 31. Summary Note: EDF is optimal for aperiodic tasks too EDF Processor demand analysis EDF Utilization bound Dynamic Priority DMS Response time analysis RMS Utilization bound Response time analysis Fixed Priority D < P D i = P i