Multiprocessors I ================= Lecture 24, 4/22/2004 1) Went through slides: - mostly examples of multiprocessor machines of different sizes and organizations. . multi-chip multiprocessors . single-chip multiprocessors *** We're going to see lots of these in the future, now that we can fit many of them on a die and ILP parallelism is reaching its limits. 2) What is multiprocessing? - Diagram of SIMD machine (shared PC and instruction decode) - Diagram of MIMD machine (PC and decode for each processor) - Contrast with ILP parallelism (one PC, but each instruction only executed on one piece of data, unlike SIMD machine) 3) Examples of uses: - ATM transaction processing system - Web server - Graphics processors 4) Writing parallel programs can be hard... - static-page web serving -- easy - parallelizing the final project assignment (cache sim) -- hard 5) Granularity of parallelism: Granularity Example ----------- ------- bit 32-bit adder instruction (ILP) superscalar processor or out-of-order processor procedure ... task MSWord + Web browser running on two-processor machine 6) Communication models Asked question: how do two program communicate? Message passing: - e.g. network sockets - e.g. special API like MPI Shared memory: - Showed how page tables could implement this on operating system, for allowing two processes to share memory - Briefly mentioned issues with cache consistency