Top Banner
23
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: Parallel programming model, language and compiler in ACA.
Page 2: Parallel programming model, language and compiler in ACA.

A programming model is a collection of program

abstraction providing a programmer a simplified

and transparent view of computer H/W and S/W.

Parallel programming model is designed for vector

computers.

Fundamental issues in parallel programming.

Creation, suspension, reactivation, termination.

Page 3: Parallel programming model, language and compiler in ACA.

Five model are designed that exploits

parallelism-:

Shared-variable model.

Message-passing model.

Data parallel model.

Object oriented model.

Functional and logic model.

Page 4: Parallel programming model, language and compiler in ACA.

In shared variable model parallelism depends on

how IPC is implemented.

IPC implemented in parallel programming by two

ways.

IPC using shared variable.

IPC using message passing.

Page 5: Parallel programming model, language and compiler in ACA.

IPC with shared variable

IPC with message passing

Page 6: Parallel programming model, language and compiler in ACA.

Critical section.

Memory consistency.

Atomicity with memory operation.

Fast synchronization.

Shared data structure.

Page 7: Parallel programming model, language and compiler in ACA.

Two process communicate with each other by

passing message through a network.

Delay caused by message passing is much longer

than shared variable model in a same memory.

Two message passing approach are introduced here.

Page 8: Parallel programming model, language and compiler in ACA.

Synchronous message passing-:

Its synchronizes the sender and receiver process

with time and space just like telephone call.

No shared memory.

No need of mutual exclusion.

No buffer are used in communication channel.

It can be blocked by channel being busy.

Page 9: Parallel programming model, language and compiler in ACA.

Asynchronous message passing-:

Does not need to synchronize the sender and

receiver in time and space.

Non blocking can be achieved.

Buffer are used to hold the message along the path

of connecting channel.

Message passing programming is gradually

changing, once the virtual memory from all nodes

are combined.

Page 10: Parallel programming model, language and compiler in ACA.

It require the use of pre-distributed data set.

Interconnected data structure are also needed to

facilitate data exchange operation.

It emphasizes local computation and data routing

operation such as permutation, replication, reduction

and parallel prefix.

It can be implemented on either SIMD or SPMD

multicomputer, depending on the grain size of

program.

Page 11: Parallel programming model, language and compiler in ACA.

Object are created and manipulated dynamically.

Processing is performed using object.

Concurrent programming model are built up from

low level object such as processes, queue and

semaphore.

C-OOP achieve parallelism using three methods.

Page 12: Parallel programming model, language and compiler in ACA.

Pipeline concurrency.

Divide and conquer concurrency.

Co-operating problem solving.

Page 13: Parallel programming model, language and compiler in ACA.

Two language-oriented programming for parallel

processing are purposed.

Functional programming model such as LISP,

SISAL, Strand 88.

Logic programming model as prolog.

Based on predicate logic, logic programming is

suitable for solving large database queries.

Page 14: Parallel programming model, language and compiler in ACA.

Language feature for parallel programming into six

categories according to functionality.

Optimization features

Used for program restructuring and compilation

directives.

Sequentially coded program into parallel code.

Automated parallelization.

Semi-automated parallelization.

Page 15: Parallel programming model, language and compiler in ACA.

Availability feature

Its use to enhance the user- friendliness.

Make language portable to large class of parallel

computers.

Scalability.

Compatibility.

Portability.

Page 16: Parallel programming model, language and compiler in ACA.

Synchronization/ communication feature

Shared variable for IPC.

Single assignment language.

Send/receive for message passing.

Logical shared memory such as the row space in

Linda.

Remote procedure call.

Data flow languages such as id.

.

Page 17: Parallel programming model, language and compiler in ACA.

Control of parallelism

Coarse, medium or fine grain.

Explicit versus implicit parallelism.

Loop parallelism in iteration.

Shared task queue.

Divide and conquer paradigm.

Shared abstract data type.

Page 18: Parallel programming model, language and compiler in ACA.

Data parallelism feature

It specified how data are accessed and distributed

Runtime automatic decomposition.

Mapping specification.

Virtual processor support.

Direct access to shared data.

Page 19: Parallel programming model, language and compiler in ACA.

Process management features

These feature are needed to support the efficient

creation of parallel processes.

Implementation of multithreading or multitasking.

Dynamic process creation at runtime.

Automatic load balancing.

Light weight processes.

Page 20: Parallel programming model, language and compiler in ACA.

Special language construct and data array

expression for exploiting parallelism in program.

First is FORTRAN 90 array notation.

Parallel flow control is achieve using do across and

do all type of keyword which is use in the

FORTRAN 90.

Same we also use FORK and JOIN method.

Page 21: Parallel programming model, language and compiler in ACA.

The role of compiler to remove the burden of

program optimization and code generation.

A parallelizing compiler consist of the three major

phases.

Flow analysis.

Optimization.

Code generation.

Page 22: Parallel programming model, language and compiler in ACA.

“Compilation phases in parallel code generation”

Page 23: Parallel programming model, language and compiler in ACA.

THANK YOU