1 / 77

COS497 - Cloud Computing 5. Virtualization

COS497 - Cloud Computing 5. Virtualization “Virtualization is an abstraction layer that decouples the physical hardware from the operating system to deliver greater IT resource utilization and flexibility.” – www.vmware.com.

walker-clay
Download Presentation

COS497 - Cloud Computing 5. Virtualization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COS497 - Cloud Computing • 5. Virtualization • “Virtualization is an abstraction layer that decouples the physical hardware from the operating system to deliver greater IT resource utilization and flexibility.” – www.vmware.com

  2. Within computing, the concept of virtualization is not new. For years, there has been virtual memory, virtual hard disks, virtual networks, etc. - With virtual memory, for example, computer software gains access to more memory than is physically installed, via the background swapping of data from memory to disk storage, and back again, by the OS. - Similarly, virtualization techniques can be applied to other IT infrastructure layers - including networks, storage, laptop or server hardware, operating systems and applications. Basically, for the cloud, virtualization is using one physical machine to support multiple virtual machines that run in parallel and independently.

  3. What is it? Virtualization is a framework or methodology of dividing the resources of a computer into multiple execution environments • Done by applying one or more concepts or techniques such as • Hardware and software partitioning • Time-sharing use of resources • Partial or complete machine simulation • Emulation • Quality of service • And many others

  4. Not a new concept • VM projects in the 1960s at IBM • IBM and MIT headed research through the years and eventually developed the idea of a Virtual Machine Monitor (VMM) – an operating system-like software package that creates and supports virtual machines.

  5. Problem Assessment – For customer organizations Organizations (businesses, universities, etc.) have to invest in hardware and software resources, as well as IT support (i.e. personnel) – this is costly, $$$$$ There are other problems, as well … • Too many servers for too little work – organizations over-invest to cope with peak demands. • Aging hardware reaching end of usable life – replacement costs. • High infrastructure requirements • Limited flexibility in shared environments

  6. Low utilization metrics of servers across the organization

  7. High costs and infrastructure needs. • Maintenance • Leases • Networking • Floor space • Cooling • Power • Disaster Recovery

  8. Heterogeneous Environments - Different Operating Systems Different applications may require different operating systems

  9. Apple Mac Intel AMD

  10. Problem Assessment – For Internet service providers • The big Internet service providers such as Google, Amazon, Yahoo, etc. have invested enormous sums of money on 100,000s of servers, and storage and the infrastructure that they require in order to deliver their services without delay. • The daily up-keep of these resources in terms of money is also staggeringly high. • However, all the resources are veryunder-utilized. • So, why not sell these under-utilized resources to organizations? • Moreover, a single server may support a number of “time-shared” applications.

  11. Cloud providers adopted an approach known as multi-tenancy for supporting their SaaS offerings Multi-tenancyrefers to a principle in software where a singleinstance of the software runs on a server, but serves multipleclients (the tenants). E.g. one instance of a CRM package is used by many clients. This is more efficient for the Cloud providers.

  12. A key benefit of virtualization is the ability to run multiple, differentoperating systems on a single physical system and share the underlying hardware resources. Virtualization is a criticalaspect of cloud computing, and utility computing in general. - Pooling resources (e.g. sharing processors) for higher utilization is a requirement of utility computing. In a cloud, this allows higher elasticity and system security

  13. Benefits of Virtualization Someof the benefits that are typically provided by a virtualized system …

  14. Virtualization Stack Cloud Stack Cloud Applications Cloud Services Operating System Virtual Machine Manager Hardware

  15. Background - Virtualization You cannot get physical access to the cloud server machines - The hardware can, and does, frequently change! To avoid dependency on specific hardware, you write your cloud (server) program to run on virtual machines (VMs).

  16. Virtualization is based on the software concept of a Virtual Machine Monitor (VMM) Virtualization inserts a software layer (i.e. the VMM) at different points in the computer architecture. - Said in a different way, there are different types of virtualization. VMM designed for virtual machines • API is hardware-like to ease guest OS ports Acts like a micro-kernel OS, performing such low-level tasks as virtual memory mapping, scheduling, I/O management, etc.

  17. What is a Virtual Machine Monitor? A virtual machine monitor (VMM),also called a hypervisor, is a program that allows multiple, possibly different, guestoperating systems to share a single hardware host– another form of multi-tenancy. Each guest operating system appears to have the host's processor, memory, and other resources all to itself. However, the VMMis actually controlling the host processor and resources, allocating what is needed to each guest operating system,in turn, and making sure that the guest operating systems (executing invirtual machines) cannot disrupt each other.

  18. Virtual Machine (VM) “A VM is an efficient, isolated duplicate of a real machine” Duplicate:A VM should behave identically to the real machine. Programs cannot distinguish between execution on real or virtual hardware, except for - Fewer resources are available (and, potentially, are different between executions!) - Some timing differences (when dealing with devices) Isolated: Several VMs execute without interfering with each other. Efficient:A VM should execute at speeds close to that of real hardware. Requires that most instructions are executed directly by real hardware. Hypervisoraka virtual-machine monitor- Software implementing the VM.

  19. A virtual machine is just a software package that simulates a real machine. A real machine may support (i.e. execute) many virtual machines – time-shared execution. The real machine shares its execution time between the virtual machines. Each virtual machine is loaded with a guest operating system, and (guest) applications that execute on top ofthe guest operating system – a virtual machine container.

  20. Virtual Container Virtual Container App. B App. A Operating System Operating System App. A App. B Virtualization Layer Operating System Hardware Hardware Conventional system A single OS controls all hardware platform resources Virtualizedsystem It makes it possible to run multiplevirtual “containers” on a single physical platform

  21. Virtual machine must model a real machine exactly and efficiently - Why? Want minimal slowdown in performance. - A VM needs to be run on the physical machine it virtualizes. (Obviously!) We will only concern ourselves with virtualizing at the ISA level Note: ISA = instruction-set architecture (The hardware-software interface – assembly language-level)

  22. Aside:Instruction set architecture The instruction set architecture (ISA) is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O. An ISA includes a specification of the set of op-codes (machine language), and the native commands implemented by a particular processor. The ISA instructions can execute in one of two modes: - Unprivileged – most instructions - Privileged – a few, special instructions, executed by the operating system

  23. When an application (executing in unprivileged mode) tries to execute a privileged instruction (e.g. perform some I/O operation – a system call), a trap is made into the operating system, and the operating system (executing in privileged mode) performs the operation on behalf of the application. The switch between application and operating, and vice versa, is known as a context switch. App OS

  24. The ISA Interface • Interface between hardware and software • Important for the OS developer

  25. Why Virtual Machines? • Historically used for easier sharing of expensive mainframes: – Run several (even different) OSs on same machine, called guest operating systems – Each using a subset of the physical resources. – Ran as a single-user, single-tasked OS in time-sharing mode. • Went out of fashion in 1980s – Time-sharing OSs common-place – Hardware too cheap to worry ... • Now back in fashion with the Cloud

  26. Hypervisor (aka VMM) • Program that runs on real hardware to implement avirtual machine. • Controls resources – Partitions hardware – Schedules guest operating systems – Mediates access to shared resources E.g. console • Implications – Hypervisor executes in privileged mode. – Guest OS software executes in unprivilegedmode. – Privileged instructions in guest OS cause a trap into the hypervisor. – Hypervisor interprets/emulates them.

  27. Main Concern of the VMM • Biggest problem faced by the VMM is to present the hardware to the VM in a “safe, transparent and efficient way”. • Safe? • Whatever a VM does, it should not be able to affect other VMs or the VMM • Maintain illusion by tricking the software into thinking it has the hardware to itself, and by hiding the true state of the hardware.

  28. VMM Main Components • Dispatcher – after trap, decides what to do. • Allocator – provides VMs resources. • Interpreter – simulate instruction which trapped.

  29. Virtualization comes in three (traditional) variants: • - High-level language virtual machines • - Operating system-level virtualization • - Hardware-level virtualization

  30. 1. High Level-Language Virtual Machines • The virtualization layer sits as an application program on top of the native operating system. • Can run any programs written for the virtual machine abstraction regardless of the operating system hosting that virtual machine. • An example of this is the Java Virtual Machine which executes Java Byte Code produced by Java compilers. Java Byte Code JVM Applications OS Real Machine

  31. Linux Microsoft

  32. Application Guest OS 2. Operating System-Level Virtualization • Virtual Machine VMM Applications • Virtualization layer sits between the host operating systemandthe application programs that run on the guest operating system. • Virtual Machine runs applicationswritten for aguest operating system, but in a controlled environment. • VM uses the host OS API. HostOS Real Machine

  33. VMM runs as a guest application with a guest OS on top of host OS. • Relies on host OS for memory management, processor scheduling, resource allocation, hardware drivers.

  34. 3. Hardware-Level Virtualization • Virtualization layer sits right on top of the real hardware. • The VMM is a thin software layer that exports a virtual machine abstraction to the guest operating systems. • Since the VMM presents a version of the real machine, all software written for that hardware will run on that virtual machine. • Original design from IBM in the 1960s.

  35. Hardware Virtual Machine Monitors • Virtual machines are exported by thin layer of software, the VMM. • The hardware-level VMM runs directly on the hardware, and can “export” multiple VMs that look exactly like or similar to the real hardware the hardware.

  36. The Traditional Approach • A traditional VMM (Virtual Machine Monitor) presents its (virtual) “hardware” as being functionally identical to the physical hardware. - But this approach can be difficult to implement (Especially with x86 systems!) - There are also situations where it is useful to provide real and virtual resources (for example, virtual and real timers) • Under this model, the VM would not have access to this information.

  37. Traditional Virtual Machine • Original meaning of the term virtual machine – All guest and host software use the same ISA – VMM runs on bare hardware – privileged mode – VMMintercepts and implements all the privileged operations for the guest OS.

  38. Attributes of All Virtual Machines • Software Compatibility • VM provides compatible abstraction so all software written for the machine that VM is virtualizing will run on it. • Java example: “Write once, run anywhere”. • Isolation • All software running on the virtual machine is contained within it, and cannot affect other VMs or processes.

  39. Attributes of All Virtual Machines • Encapsulation • Virtual machines provide a level of “indirection”. Any software running within them can be controlled and manipulated. • Can act like putting a filter on a print service to monitor content or perform additional book keeping. • The Java VM, for example, can perform run-time error checking and garbage collection that C++ compiled code (say) cannot do running directly on the hardware. • Performance • Any new software layer adds overhead to system

  40. Modern Virtualization Types – Modern Terminology Two “architectures” for implementing virtualization in the cloud are the hosted and native types. The hostedtype provides a virtualization layer on top ofthe standard operating system, and supports the broadest range of hardware configurations. The guest operating systems and their applications run on top ofthe virtualization layer. In contrast, the nativetype is the first layer of software installed on the hardware (Hence, it is often referred to as a “bare metal” approach). - Since it has direct access to the hardware resources, the native type is more efficient than hosted types, enabling greater scalability, robustness and performance.

  41. Native Virtualization • Hosted Virtualization

  42. • When hosted VMM hypervisor tries to execute a privileged instruction, it is trapped and passed to the host OS for execution. •Hosted VMM is less efficient than native VMM - Twice number of mode switches - Twice number of context switches •Hosted VMM can run, besides native applications, - a “Sandbox” for untrusted applications - and is convenient for running alternative OS on desktop Native versus Hosted VMM Native Hosted

  43. Traditional

  44. Hosted Architecture Examples VMWareGSX, Player, Oracle VirtualBox

  45. Native (Bare-Metal) Architecture Examples Xen, VMWare ESX

  46. Virtualization and the Challenges • Speed and Performance • Security • Resource Isolation • Functionality

  47. For the cloud, the two major virtualization technology providers are VMWareandXen. But there are others such as Oracle’s VirtualBoxand KVM.

More Related