cwhsueh@csie.ntu.edu.tw - PowerPoint PPT Presentation

About This Presentation
Title:

cwhsueh@csie.ntu.edu.tw

Description:

NEWS???. Introduction. What is a real-time system? ... NEWS???. Systems Issues. In RTS, the OS and AP are very tightly coupled, than time-sharing systems. ... – PowerPoint PPT presentation

Number of Views:531
Avg rating:3.0/5.0
Slides: 34
Provided by: csieN
Category:
Tags: csie | cwhsueh | edu | ntu

less

Transcript and Presenter's Notes

Title: cwhsueh@csie.ntu.edu.tw


1
Real-Time System Development ?????? Introduction
to Real-Time Systems
  • ???
  • cwhsueh_at_csie.ntu.edu.tw
  • http//www.csie.ntu.edu.tw/chsueh/
  • 95 Fall

2
Outline
  • Introduction
  • Real-Time Scheduling
  • Pinwheel Scheduling
  • Conclusion

3
eBook and eLearning Tool Architecture
eLearning Platform
Development Tool
eBook Platform
Auxiliary Tool
eLearning Auxiliary Tool
eBook Digital Content Development Tool
eLearning Platform Reader SCORM HTML XML
eBook Teaching Digital Content
  • Physical
  • Serial
  • USB
  • 1394
  • IrDA
  • Bluetooth
  • 802.11

Teaching/Peer Ware Application Development Tool
Teaching AP
Peerware AP
System Dvelopment Kit Compatibility Testing Kit
eBook Teaching Application Platform
eBook OS (Kernel / UI / Communication)
  • Protocol
  • SyncML

eBook Hardware
ICE
DDK
4
Introduction
  • What is a real-time system?
  • A system enforcing timing constraints, e.g.
    Avionics, Missile Control,
  • Real-Time v.s. High Performance
  • What is a real-time operating system?
  • An operation system enforcing timing constraints,
    Lynx, pSOS, VxWorks.
  • What is a timing constraint?
  • A constraint of timing requirements, e.g. period,
    distance, deadline, ready time,

5
Real-Time Application
  • Industrial and automation system
  • Computer networking system
  • Gaming and multimedia
  • Medical instrument and devices
  • Financial transaction applications
  • Military defense system
  • Security monitoring and response system
  • Data acquisition system
  • Machine vision/translation system

6
Real-Time Systems
Value
Deadline
Soft RTS
Hard RTS
FirmRTS
Time
-Value
7
Real-Time Systems (RTS)
8
Systems Issues
  • In RTS, the OS and AP are very tightly coupled,
    than time-sharing systems.
  • shared memory, special buses (instruction, data,
    event, memory, control, invalidate, ).
  • A RTOS must response to internal and external
    events deterministically.
  • Low-priority tasks may wait for high-priority
    task or events indefinitely.
  • System architecture needs to provide high
    computational speed, high-speed interrupt
    handling, and high I/O throughput,
    fault-tolerance.

9
Outline
  • Introduction
  • Real-Time Scheduling
  • Pinwheel Scheduling
  • Conclusion

10
Real-Time Task Model
  • Periodic Task Model
  • parameters are known a priori

request time ready time
deadline
  • Predictability vs. Schedulability
  • high predictability and schedulability
  • easy-to-check schedulability condition

11
Distance-Constrained Task Model
  • video server
  • inter-frame distance must be less than 33ms
  • robot arm movement
  • needs steady and smooth operations
  • satellite/cellular phone tracking
  • service in constant time interval
  • more predictable inter-execution time than the
    periodic task model
  • worst inter-execution time for periodic tasks is
    2?period-ei

12
Scheduling Approaches
  • Time-Driven Scheduling Approach
  • widely used
  • inflexible, efficient
  • large space needed
  • e.g. cyclic executive
  • Priority-Driven Scheduling Approach
  • dynamic-priority
  • e.g. earliest deadline first
  • fixed-priority
  • e.g. rate monotonic

13
Periodic Real-Time Schedulers
  • Earliest Deadline First optimal
    dynamic-priority scheduler
  • job with earlier deadline gets higher priority
  • schedulability condition
  • r (T) 1
  • Rate Monotonic optimal fixed-priority scheduler
  • job with smaller period gets higher priority
  • schedulability condition
  • r (T) n (21/n- 1)
  • n?8, ?2 ? 0.69

14
Outline
  • Introduction
  • Real-Time Scheduling
  • Pinwheel Scheduling
  • Conclusion

15
Pinwheel Problem
  • Given a multiset Aa1, a2, ... ,an, ai ? N
  • Find an infinite sequence of symbols from 1, 2,
    ... , n such that at least one symbol i within
    any interval of ai symbols
  • A2,3 1 2 1 2 1 2 ...
  • 1 1 2 1 1 2 ...
  • Similar to finding a unit-time schedule

16
Pinwheel Scheduler
  • Given a multi-set of distance constraints of n
    tasks
  • Aa1, a2, ... ,an, density r(A) Si (1/ai )
  • Find another Bb1, b2, ... ,bn, "i, bi ai ,
  • A is schedulable if B is schedulable.
  • If bis are multiples (bibj) and r(B) 1,
  • B is schedulable.
  • E.g. A3,4,6,7 (specialized) B 3,3,6,6
  • schedule is 1 2 3 1 2 4 1 2 3 1 2 4 ...
  • The goal is to minimize density increase

17
Pinwheel Schedule
12
0
11
1
T1
10
2
T4
T2
9
3
T2
8
T3
4
T1
7
5
6
0 1 2 3 4 5 6 7 8 9 10 11 12
Pinwheel schedule
18
Pinwheel Transformation
2
  • Pinwheel
  • any numbers multiples
  • jitterless, predictable
  • Signal
  • analog digital
  • noiseless, ease of control
  • e.g. CD music

19
Previous Works
CX the set of all instances schedulable by
Scheduler x dX the schedulable density bound
for Scheduler x
  • Saxa1 ,
  • dSa ³ 0.5
  • Sx a1 /2 lt x a1 ,
  • dSx ³ 0.65
  • S23use 2 and 3,
  • dS23 ³ 7/12 _at_ 0.58
  • Sbc ba1 , b c lt 2b
  • dSbc ³ 2/3 _at_ 0.67

20
Single-node Pinwheel Scheduling
  • Earlier work use a base of 2 , find x in (a1/2 ,
    a1
  • Sa, Sx, Sbc, Sby, Sxy 0.5, 0.65, 2/3,
  • distance constraints of integer, unit execution
    time
  • Sr use a base of 2 , find r in (a1/2 , a1
  • real-number distance constraints and execution
    times
  • Our contributions
  • Srg use a base of g
  • Srb try all bases (optimal for single-number
    reduction)
  • HSr near-optimal polynomial-time heuristic
  • Integer Pinwheel Scheduling Sxg, Sxb , HSx

21
Various Pinwheel Schedulers
22
Synchronous Scheduling
  • Intranode pinwheel scheduling makes task
    executions regular and predictable, i.e. no
    jitter.
  • Internode in all nodes, transform the periods of
    all tasks to harmonic numbers so that tasks of
    the same period are synchronized.
  • The worst case delay for a task between its
    arrival and the beginning of its execution on a
    node is one period.

23
(No Transcript)
24
(No Transcript)
25
Simplification
26
Study of Pinwheel Scheduling
  • n tasks are schedulable on a node (using HSr)
  • if the total utilization is n (21/n - 1).
  • n tasks are schedulable on all nodes (using DSr)
  • if the utilization on any node is 21/n-1.
  • Algorithm of O (n log n nl) to minimize the
    total or maximum task delay between two nodes
    with l different periods.
  • Algorithm of O (mn log n mnl) to minimize the
    total end-to-end delay on m nodes.
  • Polynomial heuristics to reduce the maximum
    end-to-end delay on m nodes.

27
Pinwheel Scheduling Properties
  • Good jitter control in schedules
  • Easy-to-check schedulability
  • Predictable resource accesses
  • Easy extension for aperiodic tasks
  • Predictable end-to-end delay
  • Network scheduling (INFOCOM95 by Han Shin)
  • Flexible time-driven approach

28
Time-driven Scheduling Approach
  • on-line approach
  • execute tasks according to off-line generated
    schedule or parameters
  • more flexible
  • off-line approach
  • construct complete schedule
  • exponential time and space
  • generate effective time parameters
  • start time, resume time, finish time
  • optimization

29
SSr Pinwheel Schedule Constructor
  • Generate start times and finish times in O(n2)

5.3
0
10.6
15.9
21.2
task1
task2
task3
task4
30
Time-Driven Pinwheel Scheduling
  • Generate effective pinwheel schedule.
  • Use an on-line scheduler to schedule tasks
    according to the effect schedule.
  • Generate start times and finish times using SSr
  • Next resume time can be found in O(n)
  • the latest finish time of the preempting tasks

task1
task2
task3
31
TOPSTime-driven On-line Pinwheel Scheduler
Sstart time, Ffinish time, Rresume time
amortized
32
Comparison of Schedulers
for higher priority tasks
33
Designing Real-Time Applications
  • Performance Requirement
  • where the AP can be tested.
  • timing constraints, resolution.
  • Precise Functionality
  • which functionalities in which programs
  • locked in memory for high-priority process
  • Required interprocess communication
  • shared memory
  • fastest, waste memory
  • synchronization mechanism
Write a Comment
User Comments (0)
About PowerShow.com