Multiprocessors

Multiprocessor Classification

MIMD machines

The main problem that designers of parallel machines need to solve is the way processors communicate with one another. The easiest way to solve the problem is to assume explicit communication (i.e. the processes use send and receive primitives to communicate with one another). However message passing makes parallel programming exceedingly hard so researchers have attempted to create parallel machines that support shared memory. For small scale systems bus-based multiprocessors are easy enough to build that they dominate the market. Larger parallel shared memory machines are quite a bit harder and only recently have we seen succesfull efforts in building one.

The cache coherence problem

The cache coherence problem stems from the fact that processors copy data in their local caches for performance purposes. Once the same data is replicated in multiple caches a write into any of the copies will make the other copies inconsistent. For bus-based multiprocessors the problem can be solved using snooping. Snooping is monitoring all activities that occur on the shared bus and modifying cache state appropriately. The figure above shows the possible states for a cache line and the transitions from state to state based on the actions taken by a processor and the actions observed on the bus. Scalable solutions cannot use snooping since scalable networks do not provide broadcasting. Solutions to scalable shared memory machines include directory solutions, where a portion of memory is allocated to hold information about coherence blocks. The information includes the state of the block and a list of sharing processors. Based on that information a processor can enforce coherence by exchanging point to point messages with the processors that are recorded in the sharing list.

Types of cache misses

There are 4 types of cache misses in a parallel system: