Your SlideShare is downloading. ×
0
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Download It
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Download It

332

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
332
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 2. Some Benefits of Virtualization <ul><li>Server consolidation </li></ul><ul><ul><li>Also called workload consolidation </li></ul></ul><ul><li>Better security and reliability for applications using same host </li></ul><ul><li>Testing of software concurrently with production use of a host </li></ul><ul><li>Disaster management </li></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 3. What is Virtualization? <ul><li>To understand virtualization, let us begin with a virtual resource </li></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 4. Virtual Resources <ul><li>Definition </li></ul><ul><ul><li>Illusion of a resource, supported by an OS through use of a real resource </li></ul></ul><ul><li>Motivation </li></ul><ul><ul><li>To have more number of resources available </li></ul></ul><ul><ul><li>To have more of a resource available, e.g., virtual memory </li></ul></ul><ul><li>Historical </li></ul><ul><ul><li>The concept originated in 1960s! </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 5. Virtual Resources <ul><li>A virtual resource is an abstraction </li></ul><ul><li>The OS implements the abstraction through use of real resources </li></ul><ul><li>The implementation can be changed without affecting the application using the virtual resource </li></ul><ul><li>An application can be migrated to any host offering the same abstraction — portability </li></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 6. Virtual Resources <ul><li>Use of virtual resources started with I/O devices </li></ul><ul><ul><li>Motivation: Have more I/O devices available </li></ul></ul><ul><ul><li>Each user could have own I/O device </li></ul></ul><ul><li>Then came virtual memory </li></ul><ul><ul><li>Motivation: Have larger memory </li></ul></ul><ul><li>And then .. Virtual machines </li></ul><ul><ul><li>Motivation? </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 7. Virtual Machines <ul><li>Motivation: Provide a machine to each user so that a user could use an OS of own choice </li></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 8. Virtual Machines <ul><li>A virtual machine could be used in other contexts as well … </li></ul><ul><ul><li>Motivation? </li></ul></ul><ul><ul><ul><li>Since it is an abstraction, it can be made to have desirable properties, e.g., simplicity </li></ul></ul></ul><ul><ul><ul><ul><li>Some programming languages have their own virtual machines, e.g., Pascal, Java </li></ul></ul></ul></ul><ul><ul><ul><li>If implemented on several hosts, it provides portability </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 9. What is Virtualization? <ul><li>Definition: </li></ul><ul><li>Virtualization is the process of mapping the resources and interfaces of a virtual resource into the resources and interfaces of a host machine. </li></ul><ul><li>Issues in virtualization </li></ul><ul><ul><li>Complexity </li></ul></ul><ul><ul><li>Correctness —includes reliability, security … </li></ul></ul><ul><ul><li>Performance! (overhead of the mapping) </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 10. Overview of Virtualization <ul><li>Virtual device virtualization </li></ul><ul><ul><li>Map an operation on a virtual resource into an operation of a real resource, e.g. virtual disks </li></ul></ul><ul><ul><ul><li>Could be achieved through minimal overhead </li></ul></ul></ul><ul><ul><ul><li>OS may map several virtual devices into same real device </li></ul></ul></ul><ul><li>Virtual memory virtualization </li></ul><ul><ul><li>Virtual memory manager maps parts of the virtual memory into real memory </li></ul></ul><ul><ul><ul><li>Overhead: loading and removal of pages </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 11. Overview of Virtualization <ul><li>Virtual machine virtualization </li></ul><ul><ul><li>Application ‘running under’ a virtual machine executes an instruction of the virtual machine (we call it the guest machine ) </li></ul></ul><ul><ul><li>The actual operation should be implemented through execution of instructions of the real machine (we call it the host machine ) </li></ul></ul><ul><ul><li>It should incur minimal overhead </li></ul></ul><ul><ul><ul><li>Hence it should be achieved through minimal interpretation </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 12. Overview of Virtualization <ul><li>Who performs virtualization of virtual machines? </li></ul><ul><ul><li>A virtual machine operating system (VM OS) </li></ul></ul><ul><ul><li>A virtual machine monitor (VMM) </li></ul></ul><ul><ul><ul><li>Also called a hypervisor </li></ul></ul></ul><ul><ul><ul><li>Not a full-fledged operating system </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 13. Overview of Virtualization <ul><li>VM/370 </li></ul><ul><ul><li>Provides virtual machines that have a subset of the capabilities of the real machine </li></ul></ul><ul><ul><li>Implements a virtual machine through virtualization </li></ul></ul><ul><ul><ul><li>Low overhead: Does not interpret each instruction </li></ul></ul></ul><ul><ul><ul><li>Lets an application’s code execute on the real machine most of the time </li></ul></ul></ul><ul><ul><li>Multiplexes various virtual machines </li></ul></ul><ul><ul><ul><li>Overlaps their operation so that each virtual machine receives a fair opportunity to operate </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 14. Overview of Virtualization <ul><li>VM/370 </li></ul><ul><ul><li>‘Schedules’ a virtual machine </li></ul></ul><ul><ul><li>Makes arrangement to regain control at critical times </li></ul></ul><ul><ul><li>Issue: Ensure non-interference between virtual machines </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 15. Overview of Virtualization <ul><li>VM/370 </li></ul><ul><ul><li>Ensures non-interference </li></ul></ul><ul><ul><ul><li>Does not allow a virtual machine’s OS (i.e, guest OS) to execute privileged instructions </li></ul></ul></ul><ul><ul><ul><li>Runs the guest OS in ‘user mode’ of CPU </li></ul></ul></ul><ul><ul><ul><ul><li>Drawback: loses the distinction between a guest OS and an application running under a guest OS </li></ul></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 16. Overview of Virtualization <ul><li>VM/370 </li></ul><ul><ul><li>How does it control overhead? </li></ul></ul><ul><ul><ul><li>Allows a virtual machine to use instructions of the CPU directly during its operation </li></ul></ul></ul><ul><ul><ul><ul><li>No overhead at such times </li></ul></ul></ul></ul><ul><ul><ul><ul><li>OS of the guest machine is in control </li></ul></ul></ul></ul><ul><ul><ul><li>Interrupts occurring during guest OS operation can be handled directly by the guest OS </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 17. Performing Virtualization <ul><li>Full virtualization </li></ul><ul><ul><li>Host machine and guest machine have identical capabilities </li></ul></ul><ul><ul><ul><li>Ad hoc arrangements may be need to ensure non-interference </li></ul></ul></ul><ul><li>Paravirtualization </li></ul><ul><ul><li>Some host machine instructions are not virtualized; their use is replaced by use of other instructions </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 18. Performing Virtualization <ul><li>Paravirtualization (contd) </li></ul><ul><ul><li>Achieved in two ways </li></ul></ul><ul><ul><ul><li>Port a guest OS to work under a VM OS or VMM </li></ul></ul></ul><ul><ul><ul><ul><li>Replaces use of nonvirtualized instructions by other instructions while ‘installing’ a guest OS </li></ul></ul></ul></ul><ul><ul><ul><li>Perform dynamic binary translation </li></ul></ul></ul><ul><ul><ul><ul><li>Perform substitutions of nonvirtualized instructions during operation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Allows a guest OS to be used readily </li></ul></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 19. Supporting Virtualization <ul><li>Hardware features </li></ul><ul><ul><li>Provide more CPU modes </li></ul></ul><ul><ul><ul><li>Prevents interference by letting host OS, guest OS and application use different CPU modes </li></ul></ul></ul><ul><ul><li>Provide easily virtualizable features </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 20. Supporting Virtualization <ul><li>Software support </li></ul><ul><ul><li>Ensure noninterference </li></ul></ul><ul><ul><li>Provide performance isolation </li></ul></ul><ul><ul><li>Reduce overhead </li></ul></ul><ul><ul><ul><li>Replace control transitions of the kind ‘application -&gt; host OS -&gt; guest OS’ by ‘application -&gt; host OS’ </li></ul></ul></ul><ul><ul><ul><li>Replace data transfers ‘application -&gt; guest OS -&gt; host OS -&gt; device’ by ‘application -&gt; .. device’ </li></ul></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 21. Benefits of Virtualization Revisited <ul><li>Workload consolidation </li></ul><ul><ul><li>Create several virtual machines on a host </li></ul></ul><ul><li>Security and reliability of applications </li></ul><ul><ul><li>Create a virtual machine for each application </li></ul></ul><ul><li>Test an application concurrently with production use of a host </li></ul><ul><ul><li>Use separate virtual machines </li></ul></ul><ul><li>Disaster management </li></ul><ul><ul><li>Port a virtual machine </li></ul></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay
  • 22. References <ul><li>These slides are based primarily on Chapter 4 of </li></ul><ul><li>the book: </li></ul><ul><li>Operating Systems —A Concept-Based Approach, </li></ul><ul><li>  D. M. Dhamdhere, McGraw-Hill, 2008 </li></ul>Moving towards Virtualization… Department of Computer Science and Engineering, IIT Bombay

×