1 / 10

Parallel Programming models I

Parallel Programming models I. Parallel Machines: an abstract introduction. Our main focus will be on three kinds of machines Bus-based shared memory machines Scalable shared memory machines Cache coherent Hardware support for remote memory access Distributed memory machines.

carter
Télécharger la présentation

Parallel Programming models I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Parallel Programming models I

  2. Parallel Machines: an abstract introduction • Our main focus will be on three kinds of machines • Bus-based shared memory machines • Scalable shared memory machines • Cache coherent • Hardware support for remote memory access • Distributed memory machines

  3. Bus based machines Mem0 Mem1 Memk PE0 PE1 PE N-1

  4. Bus based machines • Any processor can access any memory location • Read and write • Bus bandwidth is a limiting factor • Also, how do you deal with 2 processors changing the same data? • Locks (more on this later)

  5. Scalable shared memory m/cs PE0 PE0 PE0

  6. Scalable shared memory m/cs PE0 PE0 PE0 Interconnection Network with support for remote memory access Mem0 Mem0 Mem0

  7. Distributed memory m/cs PE0 PE0 PE0 Interconnection Network Mem0 Mem0 Mem0

  8. Writing parallel programs • Programming model • How should a programmer view the parallel machine? • Sequential programming: von Neumann model • Parallel programming models: • Shared memory (Shared address space) model • Message passing model • Shared Objects model

  9. Shared Address Space Model • All memory is accessible to all processes • Processes are mapped to processors, typically by a symmetric OS • Coordination among processes: • by sharing variables • Avoid “stepping on toes”: • using locks and barriers

  10. Matrix multiplication for (i=0; i<M; i++) for (j=0; j<N; j++) for (k=0; k<N; k++) C[I][j] += A[i][k]*B[k][j]; In a shared memory style, this program is trivial to parallelize Just have each processor deal with a different range of I (or J?) (or Both?)

More Related