SlideShare a Scribd company logo
Scheduling techniques for reducing processor
energy use in MacOS
Jacob R. Lorch and Alan Jay Smith
CSL704 – Advanced Operating Systems
25/Jan/2019 – Class Presentation
Anurag Banerjee (2018CSM1007)
Introduction
Background
Research Problem
Data
Methodologies(Terms/Strategies/Tools)
Results
Conclusion
2
Introduction
 What components consume power?
 CPU, fan, physical drives
 Components depend on each other
fan on CPU etc.
 When on battery, high power consumption is undesirable
 Battery life
 Fan noise
3
Background
 Work set in late 90’s
 Focuses on PowerPC Duo 230 and 280c
 Runs on System 7 OS later rebranded as Mac OS
 It is a single user, single tasking OS
 Single memory space for OS and user processes
4
Background (contd…)
 “Macintosh lacks multitasking, but, tries to fake it…” – Byte, Sept. 1986
 Uses co-operative multitasking – non-preemptive
 Rapid process switching, when active window changes
 Regular cycling of applications
 Switching controlled by applications not OS
 One process crashes – OS can crash
 MacOS X Mojave is latest, renders most of this research obsolete
5
Research Problem
 CPU major power consumer in System 7 or Mac OS 7
 Does busy waiting
 Identify and put CPU in low power state
 This task is non-trivial
 Heuristics to identify busy wait – parametric scheduling
6
Data
 Trace-driven simulation data was collected from 6 Apple Computers, Inc. Engineers
 Workload focused on engineer’s usage pattern
 6 users, less data – can’t generalize results with high confidence
7
Methodologies
 The optimum scheduling results are calculated theoretically
 All strategies compared against it
 The current scheduling strategy is compared with new strategies proposed by
authors
 Comparison is done for processor energy savings and performance impact
 For evaluation, performance impact of current strategy is taken as baseline
 Scheduling is event driven, in a non-preemptive environment
8
Terms
 Performance Impact: percent increase in workload runtime
 Greediness Threshold: Count of CPU gain and yield without doing useful work
 Block: when process has no event to process
 Cooperative Multitasking: Processor only yields control when it wants to
 Quantum: period between CPU assignment and yield of control
 Event or Activity:
 user input,
 I/O device read or write,
 any change in the appearance of the cursor,
 any time spent with the cursor as a watch
 Turns on sound chip
9
Strategies
 Current Strategy(C): inactivity timer based – 2s no activity, 15s no I/O
 Why inactivity timer? high overhead in CPU on/off
 Schedule process even when not ready (OS)
 Process can request CPU even if nothing to do (application)
 Simple Scheduling Technique(I): do not schedule a process, when it requested to
be blocked (i.e., until conditions are fulfilled)
 Greediness Technique(G): heuristic to decide if process making un-necessary
request and block it
 Sleep extension technique(S): constant factor * sleep-times
 Basic Strategy(B): Turn off processor when no process is available to run
10
Tools Used
 IdleTracer: collects traces of events to simulate different strategies (authors
created)
 ItmSim: simulates current Mac OS power management strategy
 AsmSim: to simulate the proposed strategies
 Process behavior on modified sleep time ignored
11
Results
(per strategy)
 Optimal: 82% energy saving – 17.67% of useful work in 29.56 hours of trace
 *(ES – energy saving, PI – performance impact)
 C: 28.79% ES with 1.84% PI
 Recovers 35% of idle time
 B: 31.98% ES with 0% PI
 Recovers 39% of idle time
 BI: 47.10% ES with 1.08% PI
 Recovers 57% of idle time
 BIS: 51.72% ES for 1.84% PI, sleep multiplier of 2.25
 BIG: 66.18% ES for 1.84% PI, forced sleep period of 0.52 and greediness threshold
of 61
 Recovers 80% of idle time
12
Results
(per strategy)
 BIGS: BIG is best BIGS for 1.84% PI
 If sleep multiplier increased, bad results
 changes on increasing PI threshold
 Results have low sensitivity to these parameters
 BIG > BIR > BIS > BI > C for energy saving
 BIR – process requests a sleep time of zero, with probability p we force it to sleep for a period
f instead
 For user 2, BIG > C > B
 Finder – yield with sleep time zero
 Greediness technique helps
 Sleep extension technique useless
13
14
15
Results
(discussions)
 Less data, possibility of type II error (when truth is rejected)
 Useful quanta considered non-useful or other way round
 Composite strategy BIG better than current
 A: Average total Power consumption
 P: Power consumed by components that remain on
 S: Power saving by turning CPU off
 𝐴 = 𝑃 +
1−𝐸𝑆
1+𝑃𝐼
𝑆
 For given workload, current strategy consumed A = 8.27 W
 For given workload, BIG strategy consumed A = 6.89 W
16
17 Reciprocal of slope of the curve is an indicator of efficiency
Conclusion
 “designers of OS and applications for single-user systems are not generally
concerned with rigorous management of processor time”
 Rather compactness of code and short development cycle
 Not scheduling non-useful quanta contributes to increased energy saving
 Delay in scheduling useful quanta (due to sleep etc.) causes performance impact
 This work is good for academic purposes, quite obsolete for present day
18
Future Research
 Actually implement it in the OS and observe benefits in real time
 Gather more trace data
 Applicability to other single user OS (like those of Microsoft)
 It may be re-emphasized that this direction of research is no longer relevant
19
Thank You
 Questions ?
20

More Related Content

PPTX
jStanley: Placing a Green Thumb on Java Collections
ODP
Electrical Audit of Computer Labs on Campus
DOC
Synthesizable integrated circuit and system design for solar chargers
PDF
Results 1 Spanish City Council
PDF
Types of operating system
PPT
Akash
PDF
Energy power efficient real time systems
PDF
Energy efficient-resource-allocation-in-distributed-computing-systems
jStanley: Placing a Green Thumb on Java Collections
Electrical Audit of Computer Labs on Campus
Synthesizable integrated circuit and system design for solar chargers
Results 1 Spanish City Council
Types of operating system
Akash
Energy power efficient real time systems
Energy efficient-resource-allocation-in-distributed-computing-systems

Similar to Scheduling techniques for reducing processor energy use in MacOS (20)

PDF
A Review of Different Types of Schedulers Used In Energy Management
PPTX
Computer Architecture and Organization
PDF
LCU14-410: How to build an Energy Model for your SoC
PDF
Hibernation in Linux 2.6.29
PPTX
Improving Xen idle power efficiency
PDF
On the-joint-optimization-of-performance-and-power-consumption-in-data-centers
PDF
Linux_swspnd_v0.3_pub1
DOCX
Energy-efficient Query Processing in Web Search Engines
PPT
OK Labs - Virtualization as the Nexus of Multicore Power Management
PDF
Exploiting latency bounds for energy efficient load balancing
PDF
PowerManagement
PDF
Parallel and Distributed Computing Chapter 9
PPTX
A Study on Task Scheduling in Could Data Centers for Energy Efficacy
PPTX
System-wide Energy Optimization for Multiple DVS Components and Real-time Tasks
PDF
22). smlevel energy eff-dynamictaskschedng
PDF
Energy Efficient Change Management in a Cloud Computing Environment
DOCX
UNIT II - CPU SCHEDULING.docx
PPT
low current systems design and implementation ppt presentation
PDF
Analyze and optimize Android apps power consumption
A Review of Different Types of Schedulers Used In Energy Management
Computer Architecture and Organization
LCU14-410: How to build an Energy Model for your SoC
Hibernation in Linux 2.6.29
Improving Xen idle power efficiency
On the-joint-optimization-of-performance-and-power-consumption-in-data-centers
Linux_swspnd_v0.3_pub1
Energy-efficient Query Processing in Web Search Engines
OK Labs - Virtualization as the Nexus of Multicore Power Management
Exploiting latency bounds for energy efficient load balancing
PowerManagement
Parallel and Distributed Computing Chapter 9
A Study on Task Scheduling in Could Data Centers for Energy Efficacy
System-wide Energy Optimization for Multiple DVS Components and Real-time Tasks
22). smlevel energy eff-dynamictaskschedng
Energy Efficient Change Management in a Cloud Computing Environment
UNIT II - CPU SCHEDULING.docx
low current systems design and implementation ppt presentation
Analyze and optimize Android apps power consumption
Ad

Recently uploaded (20)

PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Welding lecture in detail for understanding
PPTX
web development for engineering and engineering
PDF
composite construction of structures.pdf
PPTX
Sustainable Sites - Green Building Construction
PPT
Project quality management in manufacturing
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Well-logging-methods_new................
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Construction Project Organization Group 2.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding
web development for engineering and engineering
composite construction of structures.pdf
Sustainable Sites - Green Building Construction
Project quality management in manufacturing
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Digital Logic Computer Design lecture notes
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Well-logging-methods_new................
Operating System & Kernel Study Guide-1 - converted.pdf
Construction Project Organization Group 2.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Automation-in-Manufacturing-Chapter-Introduction.pdf
UNIT 4 Total Quality Management .pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Ad

Scheduling techniques for reducing processor energy use in MacOS

  • 1. Scheduling techniques for reducing processor energy use in MacOS Jacob R. Lorch and Alan Jay Smith CSL704 – Advanced Operating Systems 25/Jan/2019 – Class Presentation Anurag Banerjee (2018CSM1007)
  • 3. Introduction  What components consume power?  CPU, fan, physical drives  Components depend on each other fan on CPU etc.  When on battery, high power consumption is undesirable  Battery life  Fan noise 3
  • 4. Background  Work set in late 90’s  Focuses on PowerPC Duo 230 and 280c  Runs on System 7 OS later rebranded as Mac OS  It is a single user, single tasking OS  Single memory space for OS and user processes 4
  • 5. Background (contd…)  “Macintosh lacks multitasking, but, tries to fake it…” – Byte, Sept. 1986  Uses co-operative multitasking – non-preemptive  Rapid process switching, when active window changes  Regular cycling of applications  Switching controlled by applications not OS  One process crashes – OS can crash  MacOS X Mojave is latest, renders most of this research obsolete 5
  • 6. Research Problem  CPU major power consumer in System 7 or Mac OS 7  Does busy waiting  Identify and put CPU in low power state  This task is non-trivial  Heuristics to identify busy wait – parametric scheduling 6
  • 7. Data  Trace-driven simulation data was collected from 6 Apple Computers, Inc. Engineers  Workload focused on engineer’s usage pattern  6 users, less data – can’t generalize results with high confidence 7
  • 8. Methodologies  The optimum scheduling results are calculated theoretically  All strategies compared against it  The current scheduling strategy is compared with new strategies proposed by authors  Comparison is done for processor energy savings and performance impact  For evaluation, performance impact of current strategy is taken as baseline  Scheduling is event driven, in a non-preemptive environment 8
  • 9. Terms  Performance Impact: percent increase in workload runtime  Greediness Threshold: Count of CPU gain and yield without doing useful work  Block: when process has no event to process  Cooperative Multitasking: Processor only yields control when it wants to  Quantum: period between CPU assignment and yield of control  Event or Activity:  user input,  I/O device read or write,  any change in the appearance of the cursor,  any time spent with the cursor as a watch  Turns on sound chip 9
  • 10. Strategies  Current Strategy(C): inactivity timer based – 2s no activity, 15s no I/O  Why inactivity timer? high overhead in CPU on/off  Schedule process even when not ready (OS)  Process can request CPU even if nothing to do (application)  Simple Scheduling Technique(I): do not schedule a process, when it requested to be blocked (i.e., until conditions are fulfilled)  Greediness Technique(G): heuristic to decide if process making un-necessary request and block it  Sleep extension technique(S): constant factor * sleep-times  Basic Strategy(B): Turn off processor when no process is available to run 10
  • 11. Tools Used  IdleTracer: collects traces of events to simulate different strategies (authors created)  ItmSim: simulates current Mac OS power management strategy  AsmSim: to simulate the proposed strategies  Process behavior on modified sleep time ignored 11
  • 12. Results (per strategy)  Optimal: 82% energy saving – 17.67% of useful work in 29.56 hours of trace  *(ES – energy saving, PI – performance impact)  C: 28.79% ES with 1.84% PI  Recovers 35% of idle time  B: 31.98% ES with 0% PI  Recovers 39% of idle time  BI: 47.10% ES with 1.08% PI  Recovers 57% of idle time  BIS: 51.72% ES for 1.84% PI, sleep multiplier of 2.25  BIG: 66.18% ES for 1.84% PI, forced sleep period of 0.52 and greediness threshold of 61  Recovers 80% of idle time 12
  • 13. Results (per strategy)  BIGS: BIG is best BIGS for 1.84% PI  If sleep multiplier increased, bad results  changes on increasing PI threshold  Results have low sensitivity to these parameters  BIG > BIR > BIS > BI > C for energy saving  BIR – process requests a sleep time of zero, with probability p we force it to sleep for a period f instead  For user 2, BIG > C > B  Finder – yield with sleep time zero  Greediness technique helps  Sleep extension technique useless 13
  • 14. 14
  • 15. 15
  • 16. Results (discussions)  Less data, possibility of type II error (when truth is rejected)  Useful quanta considered non-useful or other way round  Composite strategy BIG better than current  A: Average total Power consumption  P: Power consumed by components that remain on  S: Power saving by turning CPU off  𝐴 = 𝑃 + 1−𝐸𝑆 1+𝑃𝐼 𝑆  For given workload, current strategy consumed A = 8.27 W  For given workload, BIG strategy consumed A = 6.89 W 16
  • 17. 17 Reciprocal of slope of the curve is an indicator of efficiency
  • 18. Conclusion  “designers of OS and applications for single-user systems are not generally concerned with rigorous management of processor time”  Rather compactness of code and short development cycle  Not scheduling non-useful quanta contributes to increased energy saving  Delay in scheduling useful quanta (due to sleep etc.) causes performance impact  This work is good for academic purposes, quite obsolete for present day 18
  • 19. Future Research  Actually implement it in the OS and observe benefits in real time  Gather more trace data  Applicability to other single user OS (like those of Microsoft)  It may be re-emphasized that this direction of research is no longer relevant 19

Editor's Notes

  • #2: Discuss the paper…
  • #3: Structure of presentation Intro – motivation Background – what was there in 90’s Problem they focus on Where they get data
  • #4: SSD no optical drive – better Blade less cooling systems
  • #5: Powerpc - developed by AIM – apple, IBM, Motorola System 7 is last of the classic Mac OS – now obviously discontinued
  • #6: Process can monopolize Even when nothing to do it will use CPU
  • #7: Non trivial in the sense how do you recognize process is not doing useful work? Thus come in the heuristics
  • #8: A sum total of around 30 hours of trace data was collected
  • #9: Optimum – for 30 hours of trace we know the useful times, calculate the actual runtime Time – useful process work, process switching, bring process in/out, OS useful work, OS non-useful work Current is old
  • #10: Increase due to forced sleep
  • #12: Mr. Lorch Created as part of Master’s thesis ItmSim tries to duplicate proprietary MacOS strategy
  • #13: Optimal around 5.3 hours of useful work Observe the pattern of energy savings Recovers idle time means – save the processor from busy wait