SlideShare a Scribd company logo
1 of 20
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

Similar to Scheduling techniques for reducing processor energy use in MacOS

Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxSheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
bagotjesusa
 
Real time os(suga)
Real time os(suga) Real time os(suga)
Real time os(suga)
Nagarajan
 
Multiprocessor scheduling 1
Multiprocessor scheduling 1Multiprocessor scheduling 1
Multiprocessor scheduling 1
mrbourne
 

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

Simulation of Process Scheduling Algorithms
Simulation of Process Scheduling AlgorithmsSimulation of Process Scheduling Algorithms
Simulation of Process Scheduling Algorithms
 
gcce-uapm-slide-20131001-1900
gcce-uapm-slide-20131001-1900gcce-uapm-slide-20131001-1900
gcce-uapm-slide-20131001-1900
 
Securing and Greening Your IT
Securing and Greening Your ITSecuring and Greening Your IT
Securing and Greening Your IT
 
Computer performance
Computer performanceComputer performance
Computer performance
 
Measuring Performance by Irfanullah
Measuring Performance by IrfanullahMeasuring Performance by Irfanullah
Measuring Performance by Irfanullah
 
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxSheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
 
Cs8493 unit 1
Cs8493 unit 1Cs8493 unit 1
Cs8493 unit 1
 
Computer architecture short note (version 8)
Computer architecture short note (version 8)Computer architecture short note (version 8)
Computer architecture short note (version 8)
 
Real time os(suga)
Real time os(suga) Real time os(suga)
Real time os(suga)
 
PROCESS Management presentation processins.pdf
PROCESS Management presentation processins.pdfPROCESS Management presentation processins.pdf
PROCESS Management presentation processins.pdf
 
Sustainable Development using Green Programming
Sustainable Development using Green ProgrammingSustainable Development using Green Programming
Sustainable Development using Green Programming
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system calls
 
OS-UNIT-1-Part-1.pptx
OS-UNIT-1-Part-1.pptxOS-UNIT-1-Part-1.pptx
OS-UNIT-1-Part-1.pptx
 
3330701_unit-1_operating-system-concepts.pdf
3330701_unit-1_operating-system-concepts.pdf3330701_unit-1_operating-system-concepts.pdf
3330701_unit-1_operating-system-concepts.pdf
 
Akash
AkashAkash
Akash
 
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and BeforeUsage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
 
Applying Cloud Techniques to Address Complexity in HPC System Integrations
Applying Cloud Techniques to Address Complexity in HPC System IntegrationsApplying Cloud Techniques to Address Complexity in HPC System Integrations
Applying Cloud Techniques to Address Complexity in HPC System Integrations
 
Multiprocessor scheduling 1
Multiprocessor scheduling 1Multiprocessor scheduling 1
Multiprocessor scheduling 1
 
Ch24 system administration
Ch24 system administration Ch24 system administration
Ch24 system administration
 
Ch24
Ch24Ch24
Ch24
 

Recently uploaded

Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
Kira Dess
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
drjose256
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
IJECEIAES
 

Recently uploaded (20)

Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentation
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney Uni
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 

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

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