ch9. Multiprocessor Virtualization
-
Upload
cameroon45 -
Category
Technology
-
view
2.142 -
download
2
Transcript of ch9. Multiprocessor Virtualization
Chapter 9.Multiprocessor Virtualization
Mobile Embedded System Lab.
Ki Seok Choi ( 최기석 )
2 / 43
Contents
Introduction to Multiprocessor Systems
Multiprocessor Architecture Types of multiprocessing Clustered Systems Shared-Memory Systems
Partitioning of Multiprocessor Systems Motivation Mechanisms to Support Partitioning Types of Partitioning Techniques
Physical Partitioning
3 / 43
Introduction to Multiprocessor Systems
What is a Multiprocessor System? A single system that has multiple processors [Developers.net]
What is the goal? To solve compute-intensive problems faster [Michael J. Quinn]
To solve larger problems in same amount of time [Michael J. Quinn]
4 / 43
Multiprocessor Architecture
Types of multiprocessing system Clustered system
Shared-memory processing system (SMP)
Hybrids of clustered and SMP system Distributed shared memory system (DSM) SMP clusters system
5 / 43
Clustered system
A system that has multiple nodes
Each node has a processor a memory I/O devices an operating system
Good for independent workloads
P
M I/O
P
M I/O
P
M I/O
P
M I/O
Network connectionfor message passing
6 / 43
Shared-memory processing system(SMP)
A system that has multiple processors a memory I/O devices an operating system
Good for applications with shared data
P
M I/O
P P
7 / 43
Hybrids of clustered and shared-memory
Distributed shared memory system (DSM) Clustered system supporting a single OS image across the
multiple processors Not popular because of the high sensitivity of the
performance of applications to the algorithms and data structures
SMP clusters system Clustered system of nodes Each node is a small SMP
8 / 43
Clustered Systems (1/2)
Cluster = terminal node + server nodes + network Terminal node – allows the user to access cluster Server node – executes specific service routines Network – connects nodes for communication
Example IBM Parallel Sysplex system HP Superdome Hyperplex system
9 / 43
Clustered Systems (2/2)
Beowulf cluster system (1997) Inexpensive commodity CPU Inexpensive commodity disk Inexpensive 100Mbps ethernet network Free OS (Linux)
Blade server – denser form of Beowulf cluster Unnecessary I/O devices are eliminated in each node. Tight form of node in a thin package is called blade.
10 / 43
Shared-memory systems
Many commercial applications are based on shared-memory paradigm. More convenient to write programs than message-passing
paradigm
But, hardware needed to support these systems is more complex than those for message-passing systems. To maintain coherence in memory locations
11 / 43
Memory coherence models
Memory coherence refers to the visibility of a write to a given memory location by all other processors in the system.
Memory coherence is satisfied if the order of writes to a given location by one processor is maintained when observed by any other processor in the system.
12 / 43
Memory coherence models
0 1 2
P2 requestswrite 2@50
P1 requestswrite 1@50
P1 reads 1@cached 50
P2 reads 2@cached 50
50 gets evictedfrom P2 cache
P1’s writerequest arrived
P2 reads 1@50
P1 reads 1@50
P2’s writerequest arrived
50 gets evictedfrom P1 cache
50 gets evictedfrom P2 cache
P1 reads 2@50
P2 reads 2@50
P1 sees the order “0-1-1-2”, while P2 sees “0-2-1-2” : violation of memory coherency
Assumption : write-through caches and longer delay to P2 cache than P1 cache
13 / 43
Memory coherence models
Write Invalidate Protocol Write to shared data an invalidate is sent to all caches
which snoop and invalidate any copies
Write Broadcast Protocol Write to shared data broadcast on bus, processors
snoop, and update copies
14 / 43
Memory coherence models
15 / 43
MPI vs. OpenMP
MPI = “Message Passing Interface” Standard specification for message-passing libraries Libraries available on virtually all parallel computers Free libraries also available for networks of workstations or
commodity clusters
OpenMP = “Open Multi Processing” OpenMP an application programming interface (API) for sha
red-memory systems Supports higher performance parallel programming of symm
etrical multiprocessors
16 / 43
Multiple Processors Applications
Used in servers and high-end desktop systems
Have large amounts of memory and I/O devices
Web servers : manage huge databases and service requests simultaneously
Computational servers : used for large scientific calculations with huge amount of memory and disk capacity
17 / 43
Utilization of Multiprocessors
Actual number of physical processors > ideal number of processors needed Cause 1: limitations of parallelism available in the programs Cause 2: limitations in the scalability of applications due to
the overhead of communication between processors
Multiprocessor system needs to be partitioned to utilize system resources.
18 / 43
Partitioning
Two dimensions of partitioning In time domain In space domain Can be mixed together
We can partition the multiprocessing system to several virtual multiprocessing systems. Virtual architectures are independent to actual platforms. We focus on several virtual shared-memory systems
operating simultaneously on a single shared-memory host system
19 / 43
Partitioning of SMP system
P P P P P P P P P
Virtual Machine Monitor
Memory I/O
Memory Memory MemoryI/O I/O I/O
P P P P P PP P
Virtual Machine 1 Virtual Machine 2 Virtual Machine 3
Actual SMP hardware
20 / 43
Motivation : Workload consolidation
SMP system is widely used. Advanced cache coherence technology Ease of programming
But it is very expensive. Large number of disks Requirement for high reliability Need for special environment (by cooling and security)
So functions are distributed to several systems. Ex) three-tier model (ref. next page)
21 / 43
Motivation : Workload consolidation
Three-tier model
Database server
Application server
Application server
Application server
User PC User PC User PC User PC User PC User PC
22 / 43
Motivation : Workload consolidation
Recently, administrative costs of computer centers are critical. They are dependent on the number of systems.
These cost are lowered by reducing the different types of systems in the center.
So the small systems are integrated to a single large system.
23 / 43
Motivation : Workload consolidation
Consolidation model
User PC User PC
User PC User PC
User PC User PC
Database server
Virtualized App. Server
Virtualized App. Server
Virtualized App. Server
24 / 43
Motivation : Workload consolidation
The consolidation of multiple workstation users on a large remote server
Problem : Need to address the problems of privacy protection and flexibility requirement
Solution : Virtualization of large servers through partitioning of physical resources
25 / 43
Motivation : Cluster-based programming model
Recently, inexpensive blade servers are increasing.
Programming tools and applications for clustered platform are rapidly increasing.
SMP system needs to have ability to run cluster-based applications (written with MPI).
The Program using MPI can run unchanged on a partitioned system.
26 / 43
Motivation : System Migration
New version of application should be tested before migration.
Running Running TestingPartition 1 Partition 2 Partition 3
27 / 43
Motivation : Reduction of System Downtime Upgrade of existing OS requires system to shutdown. This can be done in a spare partition.
Running Running UpgradingPartition 1 Partition 2 Partition 3
28 / 43
Motivation : Heterogeneous Systems
Sometimes the old OS should run while the new one is running.
Old OSRunning
New OS Running
Partition 1 Partition 2 Partition 3
Running
29 / 43
Motivation : Improving System Utilization The system can be configured according to the changing
workload Configured as a single system image of the whole system
for peak workload Configured as multiple partitions running separate OS for
average workload Capacity planning helps to determine the partition scheme
and keep the compute requirement closer to the average workload
Dynamic migration of resources from one partition to another helps improving the utilization of resources
30 / 43
Motivation : Multiple Time-zone requirements It is common for some international company to have
geographically distributed branches
It is necessary to bring down the system for maintenance or upgrade at a convenient local time especially at night.
Partition system can make decisions independent of the other regions
31 / 43
Motivation : Failure Isolation
Most important feature of partitioning There are many failures that can be occurred.
Attacks over the network Malfunctions of software Hardware failures
Partitioning helps isolate the effects of failure. Hardware failures may or may not be local to a partition
Depend on the nature of partitioning Time multiplexed partitioning scheme – not local Physically partitioning scheme – local
32 / 43
Mechanisms to Support Partitioning
VMM is the key part to perform partitioning and can be implemented in different ways Completely in hardware Microcode supported by hardware Software supported by hardware
Make hardware modifications to support virtualization
=> VMM can operate in a new privilege mode Advantage: avoid the need to run a guest OS in user mode
which will cause performance degradation Disadvantage: unable to virtualize in a recursive manner
33 / 43
Types of Partitioning Techniques
Spectrum of partitioning (N: # of processors)
Types of partitioning are classified according to implementation of VMM Those with hardware support Those without hardware support
N nodesClustered
N-waySMP
34 / 43
Types of Partitioning Techniques
With hardwaresupport
Without hardwaresupport
Physical Partitioning
LogicalPartitioning
SVM-Based Approaches
OS-BasedApproaches
MicroprogramBased
HypervisorBased
Same ISA Different ISA
Partitioning Techniques
35 / 43
Types of Partitioning Techniques
With hardwaresupport
Without hardwaresupport
Physical Partitioning
LogicalPartitioning
SVM-Based Approaches
OS-BasedApproaches
MicroprogramBased
HypervisorBased
Same ISA Different ISA
Partitioning Techniques
36 / 43
Types of Partitioning Techniques
Physical partitioning Each OS image uses resources distinct from the ones used
by the other OS image. # of partitions is limited to # of processors
Logical partitioning OS images share some of the physical resources in a time-
multiplexed manner. # of partitions is not limited to # of processors Two implementations
VMM in microcode (firmware) VMM as a codesigned firmware-software layer (hypervisor)
37 / 43
Types of Partitioning Techniques
With hardwaresupport
Without hardwaresupport
Physical Partitioning
LogicalPartitioning
SVM-Based Approaches
OS-BasedApproaches
MicroprogramBased
HypervisorBased
Same ISA Different ISA
Partitioning Techniques
38 / 43
Types of Partitioning Techniques
System VM-based approach Multiple OS images on a single system
multiple virtual SMP systems on a single SMP system The only way to provide a virtual multiprocessing system
whose ISA is different from the ISA of the host system
OS based approach Partitioning of resources among processes (OS function) Do not provide VM different OS can not run additionally.
39 / 43
Physical Partitioning
Simplest, easiest to implement Imposes little overhead on an executing application Allows a partition to own its resources physically Control of the configuration of each partition
is mostly in hardware
Central Control UnitConsole of
system administrator
HW resource HW resourceHW resource
Receive command
Send commands
40 / 43
Physical Partitioning : Advantages
Failure isolation Isolation of SW failure
The control unit can reset the partition and reboot the OS for that partition without other partitions affected.
Isolation of HW failure One physical unit is associated with only one partition. Can not eliminate single points of failure
Control unit failure make it smaller and simpler
The crossbar switch connecting different boards make communication paths robust, add redundancy
41 / 43
Physical Partitioning : Advantages
Better security isolation Each partition is protected from the DoS attacks by otherpar
titions
System administrator of one partition can not take unauthorized action in other partitions
42 / 43
Physical Partitioning : Advantages
Better ability to meet system-level objectives System-level objectives – results from contracts between
system owners and users.
Physical partitioning creates partitions that are fixed and guaranteed independent of time.
43 / 43
Physical partitioning : Limitations
System utilization is bad.
Dynamic workload balancing is difficult because of physical constraints placed by fault isolation requirements.
Flexibility in allocating resources to partitions is not good.