Top Banner
Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab. The University of Melbourne, Australia www.buyya.com
36

Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Dec 28, 2015

Download

Documents

Darrell Flowers
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Introduction to Parallel Computing:

Architectures, Systems, and Programming

Prof. Rajkumar Buyya

Cloud Computing and Distributed Systems

(CLOUDS) Lab. The University of Melbourne, Australiawww.buyya.com

Page 2: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Serial Vs. Parallel Services

QPlease

COUNTER

COUNTER 1

COUNTER 2

Page 3: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Overview of the Talk

Introduction Why Parallel Processing ?Parallel System H/W ArchitectureParallel Operating SystemsParallel Programming ModelsSummary

Page 4: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

P PP P P PMicrokernelMicrokernel

Multi-Processor Computing System

Threads InterfaceThreads Interface

Hardware

Operating System

ProcessProcessor ThreadPP

Applications

Computing Elements

Programming paradigms

Page 5: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Two Eras of Computing Architectures System

Software/Compiler Applications P.S.Es Architectures System Software Applications P.S.Es

SequentialEra

ParallelEra

1940 50 60 70 80 90 2000 2030

Commercialization R & D Commodity

Page 6: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

History of Parallel Processing

The notion of parallel processing can be traced to a tablet dated around 100 BC. Tablet has 3 calculating positions capable of

operating simultaneously. From this we can infer that:

They were aimed at “speed” or “reliability”.

Page 7: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Motivating Factor: Human Brain

The human brain consists of a large number (more than a billion) of neural cells that process information. Each cell works like a simple processor and only the massive interaction between all cells and their parallel processing makes the brain's abilities possible.

Individual neuron response speed is slow (ms)

Aggregated speed with which complex calculations carried out by (billions of) neurons demonstrate feasibility of parallel processing.

Page 8: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Why Parallel Processing?

Computation requirements are ever increasing: simulations, scientific prediction (earthquake),

distributed databases, weather forecasting (will it rain tomorrow?), search engines, e-commerce, Internet service applications, Data Center applications, Finance (investment risk analysis), Oil Exploration, Mining, etc.

Silicon based (sequential) architectures reaching their limits in processing capabilities (clock speed) as they are constrained by: the speed of light, thermodynamics

Page 9: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Age

Gro

wth

5 10 15 20 25 30 35 40 45 . . . .

Human Architecture! Growth Performance

Vertical Horizontal

Page 10: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

No. of Processors

C.P

.I

1 2 . . . .

Computational Power Improvement

Multiprocessor

Uniprocessor

Page 11: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Why Parallel Processing?

Hardware improvements like pipelining, superscalar are not scaling well and require sophisticated compiler technology to exploit performance out of them.

Techniques such as vector processing works well for certain kind of problems.

Page 12: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Why Parallel Processing?

Significant development in networking technology is paving a way for network-based cost-effective parallel computing.

The parallel processing technology is now mature and is being exploited commercially. All computers (including desktops and

laptops) are now based on parallel processing (e.g., multicore) architecture.

Page 13: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Processing Elements Architecture

Page 14: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Processing Elements

Flynn proposed a classification of computer systems based on a number of instruction and data streams that can be processed simultaneously.

They are: SISD (Single Instruction and Single Data)

Conventional computers SIMD (Single Instruction and Multiple Data)

Data parallel, vector computing machines MISD (Multiple Instruction and Single Data)

Systolic arrays MIMD (Multiple Instruction and Multiple Data)

General purpose machine

Page 15: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

SISD : A Conventional Computer

Speed is limited by the rate at which computer can transfer information internally.

ProcessorProcessorData Input Data Output

Instru

ctions

Ex: PCs, Workstations

Page 16: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

The MISD Architecture

More of an intellectual exercise than a practical configuration. Few built, but commercially not available

Data InputStream

Data OutputStream

Processor

A

Processor

B

Processor

C

InstructionStream A

InstructionStream B

Instruction Stream C

Page 17: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

SIMD Architecture

Ex: CRAY machine vector processing, Thinking machine cm*Intel MMX (multimedia support)

Ci<= Ai * Bi

InstructionStream

Processor

A

Processor

B

Processor

C

Data Inputstream A

Data Inputstream B

Data Inputstream C

Data Outputstream A

Data Outputstream B

Data Outputstream C

Page 18: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Unlike SISD, MISD, MIMD computer works asynchronously.

Shared memory (tightly coupled) MIMD e.g., Multicore

Distributed memory (loosely coupled) MIMD

MIMD Architecture

Processor

A

Processor

B

Processor

C

Data Inputstream A

Data Inputstream B

Data Inputstream C

Data Outputstream A

Data Outputstream B

Data Outputstream C

InstructionStream A

InstructionStream B

InstructionStream C

Page 19: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

MEMORY

BUS

Shared Memory MIMD machine

Communication: Source PE writes data to GM & destination PE retrieves it

Easy to build, conventional OSes of SISD can be easily be ported Limitation : reliability & expandability. A memory component or any

processor failure affects the whole system. Increase of processors leads to memory contention.

Ex. : Silicon graphics supercomputers and now Multicore systems

MEMORY

BUS

Global Memory SystemGlobal Memory System

ProcessorA

ProcessorA

ProcessorB

ProcessorB

ProcessorC

ProcessorC

MEMORY

BUS

Page 20: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

MEMORY

BUS

Distributed Memory MIMD

Communication : IPC (Inter-Process Communication) via High Speed Network.

Network can be configured to ... Tree, Mesh, Cube, etc. Unlike Shared MIMD

easily/ readily expandable Highly reliable (any CPU failure does not affect the whole system)

ProcessorA

ProcessorA

ProcessorB

ProcessorB

ProcessorC

ProcessorC

MEMORY

BUS

MEMORY

BUS

MemorySystem A

MemorySystem A

MemorySystem B

MemorySystem B

MemorySystem C

MemorySystem C

IPC

channel

IPC

channel

Page 21: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Types of Parallel Systems

Tightly Couple Systems: Shared Memory Parallel

Smallest extension to existing systems

Program conversion is incremental

Distributed Memory Parallel Completely new systems Programs must be

reconstructed Loosely Coupled Systems:

Clusters (now Clouds) Built using commodity

systems Centralised management

Grids Aggregation of distributed

systems Decentralized management

Page 22: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Laws of caution.....

Speed of computation is proportional to the square root of system cost.

i.e. Speed = Cost

Speedup by a parallel computer increases as the logarithm of the number of processors. Speedup = log2(no. of processors) S

P

log 2P

C

S

Page 23: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Caution....

Very fast development in network computing and related area have blurred concept boundaries, causing lot of terminological confusion: concurrent computing, parallel computing, multiprocessing, supercomputing, massively parallel processing, cluster computing, distributed computing, Internet computing, grid computing, Cloud computing, etc.

At the user level, even well-defined distinctions such as shared memory and distributed memory are disappearing due to new advances in technologies.

Good tools for parallel application development and debugging are yet to emerge.

Page 24: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Caution....

There is no strict delimiters for contributors to the area of parallel processing: computer architecture, operating systems,

high-level languages, algorithms, databases, computer networks, …

All have a role to play.

Page 25: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Operating Systems forHigh Performance

Computing

Page 26: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Operating Systems for PP

MPP systems having thousands of processors requires OS radically different from current ones.

Every CPU needs OS : to manage its resources to hide its details

Traditional systems are heavy, complex and not suitable for MPP

Page 27: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Operating System Models

Frame work that unifies features, services and tasks performed

Three approaches to building OS.... Monolithic OS Layered OS Microkernel based OS

Client server OS Suitable for MPP systems Simplicity, flexibility and high performance

are crucial for OS.

Page 28: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

ApplicationPrograms

ApplicationPrograms

System ServicesSystem Services

HardwareHardware

Monolithic Operating System

Better application Performance Difficult to extend Ex: MS-DOS

User Mode

Kernel Mode

Page 29: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Layered OS

Easier to enhance Each layer of code access lower level interface Low-application performance

ApplicationPrograms

ApplicationPrograms

System ServicesSystem Services

User Mode

Kernel Mode

Memory & I/O Device MgmtMemory & I/O Device Mgmt

HardwareHardware

Process ScheduleProcess Schedule

ApplicationPrograms

ApplicationPrograms

Ex : UNIX

Page 30: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Traditional OS

OS DesignerOS Designer

OS

Hardware

User Mode

Kernel Mode

ApplicationPrograms

ApplicationPrograms

ApplicationPrograms

ApplicationPrograms

Page 31: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

New trend in OS design

User Mode

Kernel Mode

Hardware

Microkernel

ServersApplicationPrograms

ApplicationPrograms

ApplicationPrograms

ApplicationPrograms

Page 32: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Microkernel/Client Server OS

(for MPP Systems)

Tiny OS kernel providing basic primitive (process, memory, IPC)

Traditional services becomes subsystems Monolithic Application Perf. Competence OS = Microkernel + User Subsystems

ClientApplication

ClientApplication

Thread lib.

Thread lib.

FileServer

FileServer

NetworkServer

NetworkServer

DisplayServer

DisplayServer

MicrokernelMicrokernel

HardwareHardware

User

Kernel

SendReply

Page 33: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Few Popular Microkernel Systems

MACH, CMU

PARAS, C-DAC

Chorus

QNX

(Windows)

Page 34: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Parallel Programs

Consist of multiple active “processes” simultaneously solving a given problem.

And the communication and synchronization between them (parallel processes) forms the core of parallel programming efforts.

Page 35: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Parallel Programming Models

Shared Memory Model DSM Threads/OpenMP (enabled for clusters) Java threads (HKU JESSICA, IBM cJVM)

Message Passing Model PVM MPI

Hybrid Model Mixing shared and distributed memory model Using OpenMP and MPI together

Object and Service Oriented Models Wide area distributed computing technologies

OO: CORBA, DCOM, etc. Services: Web Services-based service composition

Page 36: Introduction to Parallel Computing: Architectures, Systems, and Programming Prof. Rajkumar Buyya Cloud Computing and Distributed Systems (CLOUDS) Lab.

Summary/Conclusions

Parallel processing has become a reality: E.g., SMPs are used as (Web) Servers extensively. Threads concept utilized everywhere. Clusters have emerged as popular data centers

and processing engines: E.g., Google search engine.

The emergence of commodity high-performance CPU, networks, and OSs have made parallel computing applicable to enterprise and consumer applications. E.g., Oracle {9i,10g} database on Clusters/Grids. E.g. Facebook and Twitter running on Clouds