




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















Single Instruction, Single Data (SISD)
Data Parallel Model:
Memory Architecture Models CPU CPU CPU CPU Interconnect Mem Mem Mem Shared Memory Model Message Passing Model (amenable to single address space) (amenable to multiple address spaces)
Message passing (or Distributed Memory)
pstart = p# * 100000; min[p#] = D[0]; for (i = pstart; i < pstart+100000; i++) { if (D[i] < min[p#]) min[p#] = D[i]; } barrier(); if (p# == 0) { real_min = min[0]; for (i = 1; i < pMax; i++) { if (min[i] < real_min) real_min = min[i]; } cout << real_min; }
Objective is to write parallel programs that can use asmany processors as are available.
Parallelization is limited by communication. - In terms of latency – In terms of amount of communication
Atomic update to data structures so that theactions from different processors are serialized.
Also, no matter how much you parallelize, theperformance is ultimately limited by the serialcomponent.
Better known as Amdahl’s Law
Jet Service to Chicago
Latency = sender overhead + transport latency + receiver overhead
© Wen-mei Hwu and S. J. Patel, 2002ECE 412, University of Illinois
Example: two processors trying to increment a sharedvariable
Requires an atomic memory update instr - example: test and set, or compare and exchange - Using cmpxchg, implement barrier(); - Scalability issues with traditional synchronization