Introduction To Virtualization
Introduction To Virtualization
••• •
•• •••• ••••• • ••
•• • • • • •• • ••• •• • • • • ••••••••••••••••••
•• • ••• ••
•• •••••
• • ••••••••••••••• ••• •••• ••••
• •• ••• •• •••• • •••
•• •••••
••• •• •••••••••
••
• ••• • ••
•• • •• •••• • •••• •• • •• ••••••••
•• ••••• • •• • •
• • • ••• •• •••• • •• ••••••••••••
• ••••• •••••••••
••• •• •••
•• ••••••• •• • •••••
• • ••••• •
•
• •
• ••••••••
••• •
•• ••• • • • ••• • • • ••
• • • ••••••• •• •••••• ••• •••• •• ••• •••••• •• •••••••• •• • •••••••••••••
••• • • • • •
••••
• •• • • ••
•• •• • •• ••••••••••••••••••••
•••• •• • •• • ••
•
•• ••• •• •• •• • • •••••• •• • ••• • •••• • ••• • • •••••• ••
•• •• ••••
•••••••• • • •• • ••• ••• ••• ••••••
•• ••••••••••••••
• •• •
•• ••••
•• •• •••• ••••
• • • •
•••••
• •• • • •• • • •• •••
• • ••• •• ••••••••• • ••••••• •• •• • •••••• •• • ••••••••• ••••• •• •• • ••
• • • ••• • • • • •••• • •• •• •••
• • • • •••••••••••••••••••••••••
•• • • • ••• • •• •••• • • •••••
•••••
•• • •• •• • ••••••••
•• ••• ••••• ••• •• ••• • • •• •••••• ••• ••••••••
•• •• • • • •••••••••••••••• • •• ••• • •••• ••• ••• •• •• • •• ••• •••••
•• •• • • •• •••••••
••••• ••
••• • •• •••
••• •••••
•• ••• •• •••• •• •• • •• ••• •••• •• •••••
• •• • • •• ••• •• • • • • • •• • •••
•••• •• •• ••••••• • • • ••••••• •••••••••••••••••••••••••••••••••••
• •••• ••• • ••••••••• • • ••••• • •• • •••• ••••
••••• •••• • •• • • • •• • • • •• • •• •• •••
• • ••••
•• • •• ••• • ••• ••• • ••••• •••• •••
•••••• •• ••• •••••••
• • ••••• • ••• •••• •• ••••••••••• •••• •••• ••• • •• ••• • • •••
•••••••• • •• •• •••••• • •• •
•••••••••••••••••••••
• ••
• ■
•••• •• •••••
•• •• •• ••••••••
••• ••••• • ••••••• •••••• ••••
• • •• •••• • •••• ••••• •• •••••••
••• • •
••
•••
••• •••• ••• • •••• •• •••••• • • • • ••• • •••••• •••• ••
• •• •• ••• •• ••••••••••••••••••••••
• • •• ••••••• • • • •••
•••••••••
•• •• • •••••••••
•• ••••• ••• •• • • • •• • ••• ••• • ••• ••••••••
•• •• •
••• ••••• •••••• • ••• ••• • •• ••• • •••• •• ••••••••••
• • ••
••• •• •• •••••••
••• • • •• •• • ••
••• • • •• ••• • •••••••••••••••
••• •• • ••••• •• ••••••••
••••• • •• •• • •• ••• • • • ••••••••
• •••• • • •••••••••
•
• • •• •• •• ••
•••
•• ••• • •
•• ••• • •••••••• •• •••••
• • •• • ••••
•
• • • ••• •• ••• •
• ••• •••••
•• • ••• • • •• • ••
•• ••• ••• •• •• •••• •••
••••••••• ••••••••
•• •• ••
• • •••
••• •• ••••••
••••• •• •• •
• ••••
••• ••• •• •• •• • • •• ••• •• ••• • •• ••••• •• • ••• •••• •• •• • •••• • •• •••• ••
• ••••• •• ••••
•• •• ••• ••• ••• •
• ••• •••
••• •• ••• • •••• ••••••
• ••••• ••••• •••• ••
•• •••••
••••• • •• •••• •••• • • ••
• • ••• • ••••••••••••• •••
• ••••• • • ••••••
•• • ••• • • •• • ••
•••• •••••••••• •• • •• ••••• ••
••• ••• ••• • • ••••
• •• •••••••• • •• ••• • •
••••••••••••
• ••• •••• • • •••• ••• • • •••••••
•• •••••••••••••
•• • • • • • • • • •••
• • ••••• •••• •• •••••
•• • ••• •• •• •• • •••
•• • •• ••• • •• • ••••••••••••••••••••• ••••••••
••••• •• •• •• • ••••••••• ••••••••
•• • • ••• • •• • • •• •• •• • •• ••• • ••••••••
• •• • •••
• • ••••••••••••••••••••• •••• • •• ••••• ••
• ••• ••••••••• ••• • ••• ••• •••• •••• •••••
••• •
•••• • • •••• • • • ••• • • •
••••••••••••••••••
• ••• •• • • • • •• • • •••• •••
• • •
• •
••• ••••••••••
•
l
SCHOOL O, COMPUTING • SCHOOL OF BUSINESS • SCHOO~ OF OEStGt-, SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
• We will study system virtualization, or how to run one full system (OS and applications) over
another OS
• We w i 11 caver process vi rt u a Ii za ti on (e.g., Java vi rt u a I machine) which Iets a sing Ie process run on a
• Hypervisor or virtual machine monitor (VMM): a piece of software that allows multiple VMs to run
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO'- OF OEStGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Commodity servers with lots of compute and
storage, connected with high
speed networking, located in data centers
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Virtualization is technology that lets you create
useful IT services using resources that are
30% 30% 30%
traditionally bound to hardware. It allows you to use
a physical machine's full capacity by distributing its DO
capabilities among many users or environments. MAIL WEB LEGACYAPPS
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
What is Virtualization in technical terms
uses software to create an abstraction layer over the
physical hardware. In doing so, it creates a virtual • • •
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
We virtualize for a number of reasons such as:
• Increase IT Agility
o Spin up servers real-time rather than go to
procurement and initialize servers without buying
new hardware and leverage existing ones.
• Increased Flexibility
o Increase and decrease server resources in real time
through proper allocation.
• Increase Sea la bi Iity
o With more optimized load, we can say that the server
becomes more scalable
• Significant cost savings
o Because we are converting unused resources to
usable ones. We can save costs .
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
The most important factor is the cost.
But here are other reasons why:
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO, OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
• OS Virtualization - aka Virtual Machines
o Allows multiple versions of operating system running on a single machine at the same time.
This empowers business to reduce the amound of physical hardware to run software by
cutting down the actual number of machines.
• App Iication-Server Vi rt u a Iizat ion
o This enables IT departments to balance the workload of a specific server in the event of a
large project or change. In addition to load balancing it allows easier management of servers
and applications as you manage them in a single instance.
• Application Virtua Iization
o Often confused with the above. This virtualization virtualizes apps that can typically run on
hard disk but on the server. The ability to use CPU and RAM per application without the
operating system with less overhead like the Microsoft Terminal Services.
• Administrative Virtual ization
1
o One of the least-known forms of virtualization, likely that it s used in the data centers. The
concept of administration or management. For example, certain groups have access to
specific servers, infastructure, application files, and rules but not to change them .
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO, OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
• Network Virtualization
o Involves manual or automatic management of IP and accomplished through tools like routing
tables, N IC, Switches and VLAN Tags.
• Hardware Virtualization
o One of the rarest forms of virtualization. Except putting multiple software instance on a single
machine, chunks of a machine are partitioned off to perform specific tasks
• Storage Virtualization
o Storage virtualization is an array of servers that are managed by a virtual storage system. The
servers aren't aware of exactly where the data is, and instead function more like a workeer
bees in a hive .
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO. OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Virtualization began in 1960,
1966 Lorem ipsum dolor sit amet, 1966 Lorem ipsum dolor sit amet,
consectetur adipiscing. consectetur ad ipiscing.
1967 1967
•
l
SCHOOL OF COMPUTING • SCHOOL OF BUSINESS • SCHOO<. OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Computer hardware includes the physical parts of a
computer, such as the case, central processing unit
(CPU), monitor, mouse, keyboard, computer data
storage, graphics card, sound card, speakers and
motherboard.
•
l
SCHOOL 01' COMPUTING • SCHOOL OF BUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Typical Desktop Architecture - von Neumann
•
l
SCHOOL OF COMPUTING • SCHOOL OF RUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Connecting as a group - Computing Platforms
...
Databases
•
l
SCHOOL OF COMPUTING • SCHOOL OF RUSINESS • SCHOO~ OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Software is virtualized. Configurations are done but no development
Platform is virtua lized, a lower form. Development and tools are can be
integrated to the software. Can be developed or configured but no hardware
management
•
l
SCHOOL OF COMPUTING • SCHOOL OF 8l/$1NESS • SCHOOL OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Software complexity is a natural TREND PEOPLE SYSTEM l
PURPOSE TRASFORMATIVE
AGILE
byproduct of the functional complexity ORGANIZATIONS
2010s DRIVEN IMPROVEMENT
TAYLORISM
e
1910s
COGS IN
MACHINE
STANDARDIZED
PROCESSES
•
l
SCHOOL OF COMPUTING • SCHOOL OF 8l/$1NESS • SCHOOL OF OESIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
• •
UIC rev1e
•
l
SCHOOL 0" COMPUTING • SCHOOL OF 8USINESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
• A process is a running program
• User writes a program, compiles it to generate an executable
• Executable contains machine/CPU instructions
o Every CPU architecture (e.g., x86) defines a certain set of instructions
o Compiler translates high level language code to instructions the CPU can run
• To create a process, OS allocates memory in RAM for the memory image of
• the process, containing
o Code and static/global data from the executable
o Heap memory for dynamic memory allocations (e.g., malloc)
o Stack to store arguments/return address/local variables during function calls
• All instructions and variables in the memory image are assigned memory
addresses
o Starting at 0, up to some max value (4GB in 32-bit systems)
•
I l
SCHOOL 0" COMPUTING • SCHOOL OF 8USINESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Address= O
Code/data from com iled executable
1----------1 (machine instructions, static/global data)
Address= 12KB
Heap
. . . __ _ _ , j Address of this memory returned by malloc
Unused addresses * Heap and stack grow towards each other
New stack frame pushed by function call
stack Contains arguments, local vars, return address etc.
Popped when function returns
•••••
•
I l
SCHOOL 0" COMPUTING • SCHOOL OF 8USIN ESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
• When a process is run, CPU executes the code in the memory image
• When a process runs on the CPU, the CPU registers hold values related to the process execution
o The program counter (PC, or EIP in x86) has address of current instruction
o The CPU fetches the current instruction, decodes it, and executes it
o Any variables needed for operations are loaded from process memory into general purpose
CPU registers (EAX, EBX, ECX, EDX etc in x86)
o After instruction completes, values are stored from registers into memory
o The stack pointer (SP, or ESP in x86) has address of top of stack (current stack frame holds
arguments/variables of the current function that is running)
• The set of values of all CPU registers pertaining to a process execution is called its CPU context
•
I l
SCHOOL 0" COMPUTING • SCHOOL OF 8USINESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
EIP {PC) ----------► Code/data
CPU
ESP ----~------►
Stack
• • •••
•
l
SCHOOL 0" COMPUTING • SCHOOL OF 8USINESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
Concurrent execution, context switching
• To run a process, OS allocates memory, loads CPU context
o EIP points to instructions, ESP points to stack of process, registers have process data
o CPU now begins to run the process
• OS runs multiple process concurrently by multiplexing on the same CPU
• Context switch: After running a process for some time, OS switches from one process to another
• How does context switch happen? OS saves the CPU context of the old process and loads the
context of new process
o When EIP points to instruction of new process, new process starts to run
• Where is the context saved?
o OS has a data structure called Process Control Block (PCB) for each process
o PCB (specifically, a PCB field called kernel stack) temporarily stores context of a
• process when it is not running
•
I l
SCHOOL 0" COMPUTING • SCHOOL OF 8USINESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved
ou!
•
l
SCHOOL 0" COMPUTING • SCHOOL OF 8USINESS • SCHOO<. OF OF.SIGN SCHOOL OF COMPUTING JEIAN LOUELL NUEVA
© iACADEMY -Jeian Louell Nueva - 2021 - All Rights Reserved