460 likes | 607 Views
Chapter 9. Multiprocessor Virtualization. Mobile Embedded System Lab. Ki Seok Choi ( 최기석 ). Contents. Introduction to Multiprocessor Systems Multiprocessor Architecture Types of multiprocessing Clustered Systems Shared-Memory Systems
E N D
Chapter 9.Multiprocessor Virtualization Mobile Embedded System Lab. Ki Seok Choi (최기석)
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
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]
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
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 P M I/O M I/O Network connection for message passing M I/O M I/O P P
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 P P M I/O
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
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
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.
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
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.
50 gets evictedfrom P2 cache P2’s writerequest arrived P2 reads 2@50 P2 requestswrite 2@50 P2 reads 2@cached 50 P2 reads 1@50 50 gets evictedfrom P2 cache P1 requestswrite 1@50 P1 reads 1@cached 50 P1’s writerequest arrived 50 gets evictedfrom P1 cache P1 reads 1@50 P1 reads 2@50 Memory coherence models Assumption : write-through caches and longer delay to P2 cache than P1 cache 0 1 2 P1 sees the order “0-1-1-2”, while P2 sees “0-2-1-2” : violation of memory coherency
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
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 shared-memory systems • Supports higher performance parallel programming of symmetrical multiprocessors
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
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.
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
Partitioning of SMP system Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 P P P P P P P P Memory I/O Memory I/O Memory I/O Virtual Machine Monitor P P P P P P P P P Actual SMP hardware Memory I/O
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)
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
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.
Motivation : Workload consolidation • Consolidation model Database server Virtualized App. Server Virtualized App. Server Virtualized App. Server User PC User PC User PC User PC User PC User PC
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
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.
Motivation : System Migration • New version of application should be tested before migration.
Motivation : Reduction of System Downtime • Upgrade of existing OS requires system to shutdown. • This can be done in a spare partition.
Motivation : Heterogeneous Systems • Sometimes the old OS should run while the new one is running.
Motivation : Improving System Utilization • The system can be configuredaccording 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
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
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
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
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-way SMP N nodes Clustered
Types of Partitioning Techniques Partitioning Techniques With hardware support Without hardware support Physical Partitioning Logical Partitioning SVM-Based Approaches OS-Based Approaches Microprogram Based Hypervisor Based Same ISA Different ISA
Types of Partitioning Techniques Partitioning Techniques With hardware support Without hardware support Physical Partitioning Logical Partitioning SVM-Based Approaches OS-Based Approaches Microprogram Based Hypervisor Based Same ISA Different ISA
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)
Types of Partitioning Techniques Partitioning Techniques With hardware support Without hardware support Physical Partitioning Logical Partitioning SVM-Based Approaches OS-Based Approaches Microprogram Based Hypervisor Based Same ISA Different ISA
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.
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 Receive command Central Control Unit Console of system administrator Send commands HW resource HW resource HW resource
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
Physical Partitioning : Advantages • Better security isolation • Each partition is protected from the DoS attacks by otherpartitions • System administrator of one partition can not take unauthorized action in other partitions
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.
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.