43
Chapter 9. Multiprocessor Virtualization Mobile Embedded System Lab. Ki Seok Ch oi ( 최최최 )

ch9. Multiprocessor Virtualization

Embed Size (px)

Citation preview

Page 1: ch9. Multiprocessor Virtualization

Chapter 9.Multiprocessor Virtualization

Mobile Embedded System Lab.

Ki Seok Choi ( 최기석 )

Page 2: ch9. Multiprocessor Virtualization

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

Page 3: ch9. Multiprocessor Virtualization

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]

Page 4: ch9. Multiprocessor Virtualization

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

Page 5: ch9. Multiprocessor Virtualization

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

Page 6: ch9. Multiprocessor Virtualization

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

Page 7: ch9. Multiprocessor Virtualization

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

Page 8: ch9. Multiprocessor Virtualization

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

Page 9: ch9. Multiprocessor Virtualization

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.

Page 10: ch9. Multiprocessor Virtualization

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

Page 11: ch9. Multiprocessor Virtualization

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.

Page 12: ch9. Multiprocessor Virtualization

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

Page 13: ch9. Multiprocessor Virtualization

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

Page 14: ch9. Multiprocessor Virtualization

14 / 43

Memory coherence models

Page 15: ch9. Multiprocessor Virtualization

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

Page 16: ch9. Multiprocessor Virtualization

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

Page 17: ch9. Multiprocessor Virtualization

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.

Page 18: ch9. Multiprocessor Virtualization

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

Page 19: ch9. Multiprocessor Virtualization

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

Page 20: ch9. Multiprocessor Virtualization

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)

Page 21: ch9. Multiprocessor Virtualization

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

Page 22: ch9. Multiprocessor Virtualization

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.

Page 23: ch9. Multiprocessor Virtualization

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

Page 24: ch9. Multiprocessor Virtualization

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

Page 25: ch9. Multiprocessor Virtualization

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.

Page 26: ch9. Multiprocessor Virtualization

26 / 43

Motivation : System Migration

New version of application should be tested before migration.

Running Running TestingPartition 1 Partition 2 Partition 3

Page 27: ch9. Multiprocessor Virtualization

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

Page 28: ch9. Multiprocessor Virtualization

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

Page 29: ch9. Multiprocessor Virtualization

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

Page 30: ch9. Multiprocessor Virtualization

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

Page 31: ch9. Multiprocessor Virtualization

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

Page 32: ch9. Multiprocessor Virtualization

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

Page 33: ch9. Multiprocessor Virtualization

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

Page 34: ch9. Multiprocessor Virtualization

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

Page 35: ch9. Multiprocessor Virtualization

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

Page 36: ch9. Multiprocessor Virtualization

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)

Page 37: ch9. Multiprocessor Virtualization

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

Page 38: ch9. Multiprocessor Virtualization

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.

Page 39: ch9. Multiprocessor Virtualization

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

Page 40: ch9. Multiprocessor Virtualization

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

Page 41: ch9. Multiprocessor Virtualization

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

Page 42: ch9. Multiprocessor Virtualization

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.

Page 43: ch9. Multiprocessor Virtualization

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.