CS695 Topics in Virtualization and Cloud Computing Spring 2019 Lecture 2 9.1.2019 ------------------- 0. Exercise #1 due 15th January 2019 https://www.cse.iitb.ac.in/~puru/ https://www.cse.iitb.ac.in/~puru/courses/spring19/cs695/exercises/ex1.html - Course to run in Slot 6. 1. Recap - cloud computing: computing-as-a-service - several models on offer: IaaS, PaaS, SaaS, FaaS, *aaS - our focus: IaaS --- virtualization, containers - note: several other interesting problem domains of cloud computing. - this class: introduction to virtualization. 2. the world of abstractions - as hardware gets complex and more transistors density has reached 100 million (and more) transistors per squared millimeter. we still happily and quickly write new and interesting programs. ... how is this possible? - the answer: abstractions. an abstraction is specification of a functionality with an interface to invoke/use the functionality. an abstraction has to be provided/implemented. - the abstractions picture applications via APIs use libraries libraries via the ABI use OS functionality OS uses hardware functionality via the ISA 3. the process view - an abstraction associated with applications and programs is a process. - what is a process? - an program in execution - what does it imply for an operating system? - it is an abstraction provided and implemented by the OS. - what is the process view of a system/machine? - memory address space - files and a file system - device end points (IP address, device partitions) - system calls (the interface for OS abstractions) - machine registers the OS maintains per-process kernel state to support and maintain this abstraction---the process(view) 4. resource virtualization/multiplexing for processes - An OS provides an isolated process view to all processes i.e., all processes have access to a large address range, an exlusive set of CPUs, network end points, disks etc. - what is the mechanism to achieve this? - virtualization of resources and their multipexing! - examples: virtual memory, processor virtualization, virtual file system layer. - each process thinks its owns the CPU, not aware of other processes. this view provided by the context switching and process state save and restore mechanism. - each process has a zero-starting memory address space. provided by OS via virtual memory and it's mappings. - three main building blocks of the OS (i) privileged modes of execution required by OS to establish sole/exclusive ownership of resources and OS state (ii) interrupts and interrup-driven operations for IO and as events for OS actions (iii) the system call interface for applications to invoke OS functionality explicitly 5. Why is this relevant for IaaS? - provide the abstraction of a software/virtual machine! - "virtualize" the system-view (for an OS) - system view: CPU, memory, disks, devices, ISA etc. - OS gets a isolated view of a (virtual) machine - why interesting? - multiplex machines! - can run custom OS - runtime isolation - OS development and debugging - nested virtualization - new granularity of hosting for IaaS - on-demand, secure, pay-on-use - the key question then is ... - how to provide all properties of a physical machine as a virtual machine for the OS to consume? - how to set up the multiplexing and sharing of physical resources? - the hypervisor/virtual machine monitor is the machine virtualizer!