Download presentation
Presentation is loading. Please wait.
Published byKimberly Harmon Modified over 8 years ago
1
Real-time Embedded Systems Cyclic scheduling
2
CYCLIC and SIMPLE EXECUTIVES Endless loop Basic cyclic executive Time driven cyclic executive Multi-rate cyclic executive - mrce including interrupts Priority based pre-emptive executive More specialised Rate Monotonic, Deadline Monotonic
3
C YCLIC E XECUTIVES Manually constructed Time Frame or Schedule Completely deterministic execution Schedule repeatedly executed every X * T ms
4
UTILISATION Any Task can be measured by an: Execution time C and a period P C If not preempted P Note for all tasks to be executable here, the utilisation :
5
C YCLIC E XECUTIVES - EXAMPLE Minor cycle time is HCF [highest common factor] of Task periods Major cycle time must be this HCF times LCM [least common multiple] of other task period factors
6
C YCLIC E XECUTIVES - EXAMPLE The tasks have periods: 100: 150: 300 => HCF is 50= 2: 3: 6 LCM is 6 Minor cycle = 50 ms & 6 minor cycles in each Major
7
C YCLIC E XECUTIVES - EXAMPLE Fitting code segments into slots: Time consuming iterative process Change example so Task 3 requires P of 350 then the periods are in ratio of 100:150:350 = 2: 3: 7 would require 42 minor cycles ! => Modification to add functions can be expensive in redesign time. => fragile design Time Frame C=40, P=100 C=100, P=300 C=40, P=150
8
C YCLIC E XECUTIVES - - RECAP Manually constructed Time Frame for the Schedule Repeatedly Executed and so is Fully Deterministic Minor cycle time is HCF [highest common factor] of Task periods [Minor cycle dictates minimum cycle time] Major cycle time must be this HCF times LCM [least common multiple] of other task period factors [Major cycle dictates maximum cycle time] Fitting code segments into the pattern of time slots is a time-consuming, iterative process => Modification to add functions is commonly expensive in redesign time => fragile design
9
C YCLIC E XECUTIVES - EXAMPLE S ONET High Efficiency Transparent LAN (using low-power Micro) Densely Packs Data on Loop-back, Base-band Bus Single Interface Type for ALL Devices SONET: a Simple Open Network, MD Cripps, MJ Reeve C Sowden, Journal of Microcomputer Applications, vol 8 pp 63-74, Aug 1985
10
C YCLIC E XECUTIVES - EXAMPLE S ONET
11
7 MINOR CYCLE 0..7 SLCMIDRES MASTER Slot0 Net Data Receive 1 Data to/from User 2 Net Server CMD/ID 3 User Interface Switch/signals 4 Data to/from User 5 Flow control translation 6 Error handling 7 Net Transmit
12
C YCLIC E XECUTIVES - EXAMPLE S ONET 'SIMPLE ' TIME-DRIVEN, CYCLIC EXECUTIVE So MAJOR CYCLE: 40 s + 3 * 59 s + 8 * ( 8 * 59 s ) [ MINOR CYCLES ] i.e. 3.993 ms per major cycle 250 major cycles/sec SLCMIDRES MASTER 40 s SLACK + 3 Slots [ 59 s ] SERVER Command* + Node ID* + RESET *or Node response to command of previous cycle 7 MINOR CYCLE 0..7 8 MINOR CYCLES each of 8 'Slots' of 59 s i.e. 3.993 ms per major cycle
13
M ORE F LEXIBLE S CHEDULING Apollo (-11) LEM AGC † Real-time multi-tasking operating system (Peter Adler & Don Eyles MIT Instrumentation Lab) 1. WAITLIST - up to 9 tasks, execution times ≤ 4 ms Interrupt-driven, time-dependent tasks (e.g. LEM Descent Engine) 2. EXECUTIVE - Priority-ordered queue; Less time-critical; Reschedule every 20 ms. † 1963-9, Raytheon Corp. approx 5000 RTL bipolar IC's (Fairchild). 20 instructions approximately. 36K words (14 bits + sign + parity) rope core ROM; 2K words core RAM; 2.048 MHz master clock; Add time - 20 microsec approximately.
14
R EAL -T IME S CHEDULING & THE MOON 1 Apollo 11 LEM “Eagle” Ref: A Fire on the Moon Norman Mailer, Weidenfeld & Nicolson Ltd, 1970, ISBN 0330 02610 0 pp343 On July 20, 1969, while Michael Collins orbited the Moon in Columbia, Neil Armstrong & Buzz Aldrin descended to the lunar surface. At 30,000ft Buzz Aldrin Reported 1202 Alarms Executive Overflow: no core sets Major concern until CapCom (Charlie Duke who flew on Apollo-16) relayed 'Go on that 1202' on down to 2,000ft Aldrin reported 1201 Alarms Executive Overflow: no vacant areas
15
R EAL -T IME S CHEDULING & THE MOON 2 Action on an Alarm: Restart AGC & the program in progress when alarm hit Thus sheds low priority activity Rendezvous (high-altitude gate) radar left on as surface approached Edwin E. "Buzz" Aldrin Probable cause of schedule not meeting deadline was combination of all other tasks with landing radar and higher level radar - PINGS (PrimaryNavigation & Guidance)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.