Rate-Harmonized Scheduling Rate-Harmonized Scheduling for Saving Energy Anthony Rowe, Karthik Lakshmanan, Haifeng Zhu, Raj Rajkumar Real-Time and Multimedia Lab ECE Department Carnegie Mellon University
Outline • Energy-Saving RHS • Basic RHS Basic RHS • Evaluation • Motivation ti l E
Sensor Andrew Project • Community Sensing and Sharing Infrastructure • XML based publish / subscribe model • 1500 Sensor points deployed across campus 1500 S i t d l d • Battery operated subnets (7+months uptime)
Monitoring and Control Power Monitoring and Control BACnet
Campus Intelligent Workspace Campus Intelligent Workspace
Energy Management Energy Management • Save energy on networking • Save energy on networking – Build a good MAC protocol • Energy lost in collisions, retries, overhearing etc… Energy lost in collisions retries overhearing etc • Save energy on computation S t ti – Build a good energy scheduler • Where is energy lost here?
Problem Statement Problem Statement • Modern processors have support for different sleep modes – Active (Most energy, full processing) A ti (M t f ll i ) – Idle (Low energy, but no processing) – Sleep (Lowest energy, oscillator off) • These states have a transition time penalty – Active <-> Idle (quite fast) – Idle <-> Sleep (quite slow due to oscillator spin-up) Sometimes we can’t sleep because the transition time • would be too long – Can we batch task execution together to reduce transition Can we batch task execution together to reduce transition overhead?
Simple Example Simple Example { c, t } 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 {5,35} τ 1 {5,50} τ 2 Idle Sleep C sleep = 15
Example CPU parameters Processor Freq. Power Power Idle Power Sleep to Idle to Sleep (uW) (mW) Active Idle (ms) Active (us) (MHz) (mW) ATmega1281 g 8 16 6.6 23 12 6 Hitachi H8 8 .05 60 90 100 8 MSP430F5418 8 0.33 0.0085 4 10 5 ST Cortex M3 20 5.6 18.5 85 2 2 LPC2106 60 1 10 108 10 4 BF531 600 15 30 616 5 2
Rate-Harmonizing Schedulers • Use a Harmonizing Base Period for the release of tasks – Cluster task execution together whenever possible p – Maintain analyzable utilization bounds
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 τ 1 {1,10} τ 2 τ {1 15} {1,15} τ 3 {2,26} Idle Sleep RMS (C sleep =5) τ 1 {1,10} τ 2 {1,15} τ 3 {2,26} { } Idle Sleep RHS (C sleep =5) Base Harmonizing Period = 10
What about the schedulability? • We show that the task sets are still feasible under basic rate harmonized scheduling if: • We show the exact schedulability condition: y
All idles are gone All idles are gone… we win right? we win right? 0 0 5 5 10 10 15 15 20 20 25 25 30 30 35 35 40 40 45 45 50 50 55 55 60 60 65 65 70 70 75 75 80 80 85 85 90 90 95 100 105 110 95 100 105 110 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 τ 1 τ 1 {1,10} {1,10} τ 2 τ 2 {1,15} {1,15} τ 3 τ 3 {2,26} {2,26} Idle Idle Sleep Sleep Sleep Sleep RHS (C sleep =5) RHS (C sleep =7) Base Harmonizing Period = 10 No, identical task set with C sleep = 7 , sleep
Energy Saving RHS gy g 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 τ 1 {1,10} τ 2 {1,15} τ 3 {2,26} Idle Sleep RHS (C sleep =7) τ 1 {1,10} τ 2 {1,15} τ 3 {2,26} Idle Sleep E Energy-Saving RHS (C sleep =7) S i RHS (C 7) Energy Saver Task
Properties of Energy Saving RHS p gy g • All Idle task slots become sleep! All Idle task slots become sleep! • We might not need all three CPU states We might not need all three CPU states • Energy Consumption is now very regular – We can nicely estimate lifetimes y
What about schedulability? • We show the exact case condition
Nano-RK Features Nano-RK Features • C GNU tool-chain C GNU tool chain • Classical Preemptive Operating System Multitasking Abstractions • Real-Time Priority-Based Scheduling – Rate Monotonic Scheduling • Built-in Fault Handling • Resource Reservations – CPU, Network, Transducer Resource Control CPU Net ork Transd cer Reso rce Control – Forms Virtual Energy Budget http://www.nano-rk.org
How much energy can we save? gy Task C T U C sleep = 10 ms 1 1 20 .050 T sleep = 20 ms 2 1 25 .040 CPU = ATmega1281 CPU AT 1281 3 1 26 .038 (FireFly and IRIS motes) 4 1 28 .035 5 5 1 1 32 32 .031 031 6 2 50 .04 RMS = 9.83 mW 7 2 67 .029 ES-RHS = 6.5 mW S S 8 3 91 .033 9 9 100 .090 RHS saves 33%
How much do we save in a real system? How much do we save in a real system? Task Task C C T T U U Link Layer 1 20 .050 Network Layer 1 25 .040 HF Sensor Sampling 1 26 .038 Mobile Node Service 1 28 .035 Di Diagnostic ti 1 1 32 32 .031 031 RMS = 2.38mW RHS = 2.00 mW During the most active states we see a 16% savings on CPU energy
Conclusions Conclusions • We introduce and analyze Rate-Harmonized Scheduling as a means of clustering task S h d li f l t i t k execution • We show RHS can save energy by reducing unnecessary CPU Idle time y • We introduce Energy-Saving RHS gy g – Converts ALL Idle time into deep sleep
Questions?
Recommend
More recommend