Unit2_a
Unit2_a
• In the shared memory MIMD model, all the PEs are connected to a
single global memory and they all have access to it.
• The communication between PEs in this model takes place through
the shared memory
• Modification of the data stored in the global memory by one PE is
visible to all other PEs.
• Systems based on this model are also called tightly coupled
multiprocessor systems.
Distributed memory MIMD machines
• In the distributed memory MIMD model, all PEs have a local memory.
• The communication between PEs in this model takes place through
the interconnection network.
• Systems based on this model are also called loosely coupled
multiprocessor systems
• The network connecting PEs can be configured to tree, mesh, cube,
and so on. Each PE operates asynchronously
• The shared-memory MIMD architecture is easier to program but is
less tolerant to failures and harder to extend with respect to the
distributed memory MIMD model.
• Failures in a shared-memory MIMD affect the entire system, whereas
this is not the case of the distributed model, in which each of the PEs
can be easily isolated.
Approaches to parallel programming
Need :
• A sequential program is one that runs on a single processor
and has a single line of control.
• To make many processors collectively work on a single
program, the program must be divided into smaller
independent chunks so that each processor can work on
separate chunks of the problem.
A wide variety of parallel programming approaches are
available. The most prominent among them are the following:
• Data parallelism
• Process parallelism
• Farmer-and-worker model
Data parallelism
• The divide-and-conquer technique is used to split data into
multiple sets, and each data set is processed on different PEs
using the same instruction.
• This approach is highly suitable to processing on machines
based on the SIMD model.
Process parallelism
• In the case of process parallelism, a given operation has
multiple activities that can be processed on multiple
processors.
Farmer and worker model
• In the case of the farmer- and-worker model, a job
distribution approach is used.
• one processor is configured as master and all other
remaining PEs are designated as slaves
• the master assigns jobs to slave PEs and, on completion,
they inform the master, which in turn collects results.
Levels of parallelism
• Top-Down Style. :
• Systems developed according to this style are composed of one large main
program that accom- plishes its tasks by invoking subprograms or
procedures
• works on divide-and-conquer approach