alternatives for scheduling virtual machines in real time
play

Alternatives for Scheduling Virtual Machines in Real-Time Embedded - PowerPoint PPT Presentation

Introduction Timing properties of virtual machines Supporting real-time systems Conclusion Alternatives for Scheduling Virtual Machines in Real-Time Embedded Systems Robert Kaiser Distributed Systems Lab University of Applied Sciences


  1. Introduction Timing properties of virtual machines Supporting real-time systems Conclusion Alternatives for Scheduling Virtual Machines in Real-Time Embedded Systems Robert Kaiser Distributed Systems Lab University of Applied Sciences Wiesbaden, Germany IIES 08, Glasgow, 1-Apr-2008 Robert Kaiser kaiser@informatik.fh-wiesbaden.de

  2. Introduction Timing properties of virtual machines Supporting real-time systems Conclusion Outline 1 Introduction Timing properties of virtual machines 2 Hierarchical scheduling Proportional share scheduling Effect on latency Overhead vs. Latency 3 Supporting real-time systems Workload classification Requirements of different load classes Scheduling infrastructure 4 Conclusion Robert Kaiser kaiser@informatik.fh-wiesbaden.de 1 / 18

  3. Introduction Timing properties of virtual machines Supporting real-time systems Conclusion Outline 1 Introduction Timing properties of virtual machines 2 Hierarchical scheduling Proportional share scheduling Effect on latency Overhead vs. Latency 3 Supporting real-time systems Workload classification Requirements of different load classes Scheduling infrastructure 4 Conclusion Robert Kaiser kaiser@informatik.fh-wiesbaden.de

  4. Introduction Timing properties of virtual machines Supporting real-time systems Conclusion Motivation(1) Embedded systems are becoming more powerful Disproprotionate relation of performance vs. cost (e.g. 2 x cost ⇒ 10 x performance) Using this potential makes sense .. .. economically: same/more performance at lower cost .. technically: fewer components ⇒ fewer points of failure ⇒ More functionality per controller Complexity must be managed, though... Robert Kaiser kaiser@informatik.fh-wiesbaden.de 2 / 18

  5. Introduction Timing properties of virtual machines Supporting real-time systems Conclusion Motivation(2) Software of embedded systems becomes more complex Applications from different suppliers .. .. may serve different (unrelated) purposes .. may not be aware of each other .. need to be securely isolated (liability, safety, security) ⇒ A case for virtualisation! Robert Kaiser kaiser@informatik.fh-wiesbaden.de 3 / 18

  6. Introduction Timing properties of virtual machines Supporting real-time systems Conclusion A Case for Virtualisation Complex embedded systems need management Applications must be kept from interfering with each other → Need fault containment Applications may be programmed against different OS APIs → Need to support multiple OSs in parallel ⇒ Similar requirements as server consolidation Many embedded systems already have the necessary resources (e.g. MMU/MPU) But can virtualisation be applied to embedded systems ”as is”? Workload is often known in advance → Dynamic resource management is less important Many applications have soft/hard timing requirements ⇒ Need to support real-time guest systems! Robert Kaiser kaiser@informatik.fh-wiesbaden.de 4 / 18

  7. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Outline 1 Introduction Timing properties of virtual machines 2 Hierarchical scheduling Proportional share scheduling Effect on latency Overhead vs. Latency 3 Supporting real-time systems Workload classification Requirements of different load classes Scheduling infrastructure 4 Conclusion Robert Kaiser kaiser@informatik.fh-wiesbaden.de

  8. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Hierarchical scheduler Virtual machine monitor acts as a 60 % CPU 30 % CPU 10 % CPU scheduler Guest OS Guest OS Guest OS Virtual machines host guest OSs Processes which –again– act as schedulers → VMM is the first level in a Local Local Local scheduler hierarchy Scheduler Scheduler Scheduler VMM is unaware of this: VM−Scheduler ”VMs are just processes” VMM/Hypervisor Goal: share the CPU among VMs Hardware Robert Kaiser kaiser@informatik.fh-wiesbaden.de 5 / 18

  9. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Proportional share scheduling Ideal: VMs continuously VM share CPU VM exec time 1 Reality: approximation by time multiplexing VM 2 Smaller quanta: → better approximation CPU share ... but also: more overhead VM 66% 1 VM - Scheduler invocations 33% 2 - Cache & TLB losses real world time Robert Kaiser kaiser@informatik.fh-wiesbaden.de 6 / 18

  10. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Proportional share scheduling Ideal: VMs continuously VM share CPU VM exec time 1 Reality: approximation by time multiplexing VM 2 Smaller quanta: → better approximation active VM ... but also: more overhead 2 - Scheduler invocations 1 - Cache & TLB losses real world time Robert Kaiser kaiser@informatik.fh-wiesbaden.de 6 / 18

  11. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Proportional share scheduling Ideal: VMs continuously VM share CPU VM exec time 1 Reality: approximation by time multiplexing VM 2 Smaller quanta: → better approximation active VM ... but also: more overhead 2 - Scheduler invocations 1 - Cache & TLB losses real world time Robert Kaiser kaiser@informatik.fh-wiesbaden.de 6 / 18

  12. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Proportional share scheduling Ideal: VMs continuously VM share CPU VM exec time 1 Reality: approximation by time multiplexing VM 2 Smaller quanta: → better approximation active VM ... but also: more overhead 2 - Scheduler invocations 1 - Cache & TLB losses real world time Robert Kaiser kaiser@informatik.fh-wiesbaden.de 6 / 18

  13. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Proportional share scheduling Ideal: VMs continuously VM share CPU VM exec time 1 Reality: approximation by time multiplexing VM 2 Smaller quanta: → better approximation active VM ... but also: more overhead 2 - Scheduler invocations 1 - Cache & TLB losses real world time Robert Kaiser kaiser@informatik.fh-wiesbaden.de 6 / 18

  14. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Proportional share scheduling Ideal: VMs continuously VM share CPU VM exec time 1 Reality: approximation by time multiplexing VM 2 Smaller quanta: → better approximation active VM ... but also: more overhead 2 - Scheduler invocations 1 - Cache & TLB losses real world time Robert Kaiser kaiser@informatik.fh-wiesbaden.de 6 / 18

  15. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Effect on latency Comparing RT process running on real hardware vs. virtual machine Virtual machine may experience a ”blackout” Worst case delay: T del = ( N − 1 ) · T vm + N · T sw T sw ��� ��� ��� ��� Case I: no Virtualisation ���������������������������� ���������������������������� r j s j l j Case II: Proc. in VM0 (worst case) ������� ������� r j s j p vm T sw T sw T sw T sw T T vm T vm T vm �� �� ��� ��� �� �� �� �� ��� ��� ��� ��� �� �� �� �� �� �� ��� ��� vm VM0 VM1 VM2 VM0 Robert Kaiser kaiser@informatik.fh-wiesbaden.de 7 / 18

  16. Introduction Hierarchical scheduling Timing properties of virtual machines Proportional share scheduling Supporting real-time systems Effect on latency Conclusion Overhead vs. Latency Effect on latency Comparing RT process running on real hardware vs. virtual machine Virtual machine may experience a ”blackout” Worst case delay: T del = ( N − 1 ) · T vm + N · T sw T sw ��� ��� ��� ��� Case I: no Virtualisation ���������������������������� ���������������������������� r j s j l j Case II: Proc. in VM0 (worst case) ������� ������� BLACKOUT! r j s j p vm T sw T sw T sw T sw T T vm T vm T vm �� �� ��� ��� �� �� �� �� ��� ��� ��� ��� �� �� �� �� �� �� ��� ��� vm VM0 VM1 VM2 VM0 Robert Kaiser kaiser@informatik.fh-wiesbaden.de 7 / 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend