Where does the memory live? UMA, NUMA, DSM, clusters and programming models

After this lesson you will place any multiprocessor on two independent axes — shared or private address space, centralized or distributed memory — find the home node of an address, estimate what remote accesses cost, and match each machine with its programming model.

One quiz of the paper of 8 January 2026, as the notes reproduce it (p. 505), is a picture and a question. The picture: columns N0 … N3; in each, a processor, its cache and a memory module stacked on top of each other, and every memory hanging on the same grey bar. Next to every memory module, in small print: "P0, P1, P2, P3". The question: "What type of multiprocessor architecture does the following picture represent?"

The four answers pair centralized or distributed memory with either a single logically shared address space or message passing. Every processor has a memory of its own, so the picture looks like four computers that must talk by messages. Look again at the small print. It decides the answer, and why it decides is what this lesson is about.

Shared or private: what an address means

Start with two instructions. Processors P0 and P1 both hold R1 = 0x2000. P0 executes SD F2, 0(R1) with F2 = 5; a moment later P1 executes LD F4, 0(R1). Does P1 get the 5?

It depends on the address space: "the set of memory addresses that a processor can use in its instructions" (p. 425). In a multiprocessor the question is whether all processors share one global address space or each has a private one of its own (Fig. 1).

P0 P1 SD F2, 0(R1) LD F4, 0(R1) 0x2000: 5 one memory the same X

Shared: one 0x2000 for everybody

P0 P1 message SD F2, 0(R1) LD F4, 0(R1) 0x2000: 5 0x2000: 0 memory of P0 memory of P1 two X

Private: a 0x2000 in every memory

Fig. 1. Two processors, both with R1 = 0x2000. Left: one address space — the store of P0 writes the very cell that the load of P1 reads, so P1 gets 5. Right: private address spaces — the number 0x2000 names one cell in each memory; P1 reads its own 0 unless P0 sends the value in a message.

In a shared address space all processors see one single logical memory: 0x2000 is the same location for everybody, and P1 reads the 5. Communication is implicit — a store by one processor, a load by another, no "send" — and a parallel program looks like a uniprocessor program with several threads (Pthreads, OpenMP): the shared-memory model.

With private address spaces each processor has its own separate memory space: P0's 0x2000 is not P1's, and no load or store crosses from one processor to another. P1 reads its own 0x2000; to get P0's value it must receive a message that P0 sends explicitly, with MPI_Send() and MPI_Recv() in MPI: the message-passing model (p. 425).

; P0, R1 = 0x2000
SD  F2, 0(R1)
; P1, R1 = 0x2000
LD  F4, 0(R1)

No call, no copy; a flag, a lock or a barrier makes P1 load only after the store.

; P0
SD  F2, 0(R1)
MPI_Send(X, dest=P1)
; P1
MPI_Recv(X, source=P0)
LD  F4, 0(R1)

Two calls and a copy into P1's own 0x2000; the receive waits for the message.

Each model buys what the other pays for (pp. 425–426). A shared address space is easy to program, copes with irregular communication, moves small items without message overhead, keeps the memory model that compilers already optimize for, and lets caches cut remote traffic automatically. It pays with hardware that is hard to build — a scalable, coherent shared memory — with locks and barriers, and with little control over where shared data sits. Private address spaces need simple hardware with no coherence protocol, make communication explicit, synchronize at every send/receive, give control over placement and isolate faults. They pay with a harder programming model, a fixed overhead on every small message, and the work of distributing the data by hand.

Shared memory is easier for the programmer and harder for the hardware, which needs cache coherence; message passing is the other way round. Both can express any algorithm; they differ in latency, control and scalability (p. 426).

"With shared memory nothing needs synchronizing: the data is just there." The opposite: communication is implicit, so nothing tells P1 when P0's store has happened. A flag, a lock or a barrier must order them.

Where the memory sits: UMA, NUMA and the multicore chip

The address space is about names. The second question is about wires: where the memory is physically placed, and how the latency behaves (p. 427). Fig. 2 redraws the UMA and NUMA pictures of the notes (Figs. 34 and 36), which, the notes warn, "could happen on the exam". The second one did: with a directory added to every node, it is the figure of the directory question in all three official papers.

P0 P1 P2 P3 C0 C1 C2 C3 Interconnection Network Main Memory same distance for all

Before: UMA, one central memory

P0 P1 P2 P3 C0 C1 C2 C3 MM0 MM1 MM2 MM3 Interconnection Network MM3 is far

After: NUMA, a memory in every node

Fig. 2. The UMA and NUMA pictures of the notes (Figs. 34 and 36), redrawn with four processors. Before: one main memory behind the interconnection network, equally far from every processor. After: a memory module in every node. P0 reaches MM0 inside its own node (blue), MM3 only through the network (orange, dashed). Every processor can still address every module: the address space did not change, the distance did.

In a UMA (Uniform Memory Access) machine all processors share one centralized physical memory "with the same access latency and bandwidth, regardless of which processor initiates the access" (p. 427); such machines are also called Symmetric Multiprocessors (SMPs) or Centralized Shared-Memory Multiprocessors. Each processor has private caches, sometimes a shared L3, and a snooping protocol keeps them coherent.

Uniform latency makes UMA simple: nobody asks whether data is local or remote, and sequential code ports naturally (p. 428). The price is scalability. Every miss of every processor goes to the same memory through the same interconnect, so demand grows with the processors while supply does not. The result is contention: "two or more processors (or components) try to use the same resource at the same time", and some must wait (p. 432, footnote 12). Classic SMPs stop at about 32 processors (p. 428); lesson 33 meets the same wall from the side of the bus, which saturates at about 36 (p. 420).

The way out is to move the memory into the nodes. In a NUMA (Non-Uniform Memory Access) machine each node is "Processor(s) + private caches + local memory module", a network (mesh, torus, crossbar) joins the nodes, and "the union of all local memories is one global shared address space" (p. 429). P0 reading MM0 stays inside its node; P0 reading MM3 crosses the network and waits longer.

NUMA buys scalability, to dozens or hundreds of nodes, and bandwidth, since every memory module adds its own. It costs programming effort, because performance now depends on where the data is placed, and hardware: a scalable network and, since snooping a whole network does not scale, a directory-based coherence protocol (p. 430).

The multicore chip is a small SMP

A multicore with a handful of cores is an SMP on one chip (p. 432) — the "single-chip dual-core shared-memory architecture" of the June 2025 paper's Question 2. Private L1 and L2 caches hold each core's working set and keep it off the shared resources; a larger, slower L3, shared by all cores, cuts the traffic to DRAM and is where shared data meets (Fig. 3, left). Each cache controller snoops the shared bus and invalidates or updates its copy when another core writes, which a few cores can afford (p. 432).

P0 P1 P2 P3 L1 L1 L1 L1 L2 L2 L2 L2 shared L3 one chip main memory

A handful of cores: one shared L3

P0 P1 P2 P3 L3·0 L3·1 L3·2 L3·3 P4 P5 P6 P7 L3·4 L3·5 L3·6 L3·7 mesh network-on-chip main memory

Many cores: L3 banks on a mesh

Fig. 3. Left: the centralized shared-memory multicore of H&P (notes, Fig. 35) — private L1 and L2 per core, one shared L3, one memory. Right: with more cores, one L3 and one bus become the bottleneck; the L3 is split into banks spread over the chip, and cores and banks talk over a network-on-chip, so several requests are served at once.

Beyond about eight cores, one shared L3 and one memory controller become the bottleneck (p. 433). The L3 is cut into banks placed around the chip, which serve requests in parallel, and the bus becomes a network-on-chip (NoC): a mesh, a ring or a crossbar.

"More than 8 cores means NUMA." The memory decides, not the core count. A 16-core chip with one memory system is UMA; a server with two 8-core sockets, each with its own memory, is NUMA. Read the "8-32 cores" that p. 435 files under DSM as multi-socket machines.

DSM: one address space over four memories

The notes explain a DSM with a university library system (pp. 434–435). Every faculty (a node) has its own library (a memory module); all the libraries together form one global catalogue (the address space); a student (a processor) can request any book (an address). A book from the own faculty comes quickly, one from another faculty rides the campus shuttle (the interconnect) and takes longer, and a central catalogue (the directory) records who borrowed which copy, so that everybody reads the latest version.

Distributed Shared Memory (DSM) is that machine: physical memory distributed among the nodes, one global shared address space, any location addressable by any processor — "distributed physically, shared logically" (p. 434). It is also called Cache-Coherent NUMA (cc-NUMA).

How can one address space live in four memories? The notes partition it (p. 436): Node 0 owns 0x0000–0x0FFF, Node 1 0x1000–0x1FFF, Node 2 0x2000–0x2FFF, and so on, so with four nodes Node 3 owns 0x3000–0x3FFF. Each node's memory controller serves its own range, and the owner of an address can be read off its top bits (Fig. 4).

address 0x2200, 14 bits node byte inside the node’s memory 10 0010 0000 0000 home node N2 byte 0x200 of MM2 top bits pick the node
Fig. 4. Four nodes of 4 KiB make a global space of 16 KiB: 14-bit addresses. The top 2 bits name the node that owns the address, the low 12 bits the byte inside that node's memory. 0x2200 = 10 0010 0000 0000 lives in MM2, at offset 0x200. A field of the address picks the node, as the index field picks the set of a cache.

Now follow the notes' example, a processor in Node 0 that accesses 0x2200:

; on P0, R1 = 0x2200
LD  F2, 0(R1)
  1. P0 looks for 0x2200 in its cache C0 and misses. The request leaves the node and goes to the interconnect.

  2. The interconnect routes it to Node 2, which owns 0x2000–0x2FFF: the top two bits of the address are 10.

  3. Node 2's memory module MM2 reads the block at offset 0x200 and sends the data back across the network into C0; the load completes into F2.

  4. Change R1 to 0x0200. The instruction is the same, but MM0 owns the address: the miss is served inside Node 0 and the network is never used. The program cannot tell the two cases apart; only the time differs.

The node whose memory holds an address is its home node; the node whose processor issues the access is the local node — here N2 and N0. The July 2024 paper asks it word for word, "What is the definition of home node?", about the NUMA picture of Fig. 2 with a directory D0 … D3 beside every memory, on an "Interconnection Network".

Home node — the node whose memory module holds an address, and the block that contains it; it is fixed by the physical address. In a directory protocol it also keeps the block's directory entry, so every request for the block goes through it. Local node — the node whose processor issues the request.

This vocabulary goes back to Stanford's DASH, "the first operational machine to include a scalable cache-coherence mechanism": up to 64 processors in clusters of four, joined by a directory. Its paper (Lenoski et al., IEEE Computer) calls home cluster "the cluster that contains the directory and physical memory for a given memory address".

Where does an address live?

Four nodes as in the notes' example: Node 0 owns 0x0000–0x0FFF, Node 1 0x1000–0x1FFF, and so on. Type an address and choose the processor that loads it: the picture draws the miss to the home node and the data back. The slider places an array A of 4 KiB, 512 doubles, that a loop on the same processor reads from start to end. The model assumes 80 ns for a local miss and 240 ns for a remote one: round numbers, not measurements.

  1. The widget starts with the notes' example: P0 accesses 0x2200. Before you look, say which node is home and how many times the access crosses the network. Then type 0x0200.
    What you should see

    Home is N2: 0x2200 lies in 0x2000–0x2FFF. The request crosses the network to N2 and the data crosses it back, 240 ns. With 0x0200 the home is N0, P0's own node: MM0 serves the miss without the network, 80 ns. The instruction is the same; the address alone decides where the data lives.

  2. Keep 0x2200 and let P2 issue the access instead. Predict the latency first.
    What you should see

    80 ns: the requester now sits in the home node, and the picture says "home = local". Local and remote are not properties of an address; they describe a processor and an address together.

  3. Back to P0. A starts at 0x2000: predict the average miss latency of the loop. Then move A until the loop is as fast as it can be. Last, put A at 0x1800 and run the loop on P1.
    What you should see

    240 ns: all of A is homed in N2, so every miss is remote. With A at 0x0000 every miss is local, 80 ns, three times faster, and not one instruction changed. At 0x1800 A straddles N1 and N2: half of P1's misses are local, 0.5 × 80 + 0.5 × 240 = 160 ns. One logically shared address space, physically distributed: data placement decides performance, the NUMA limitation of p. 430.

The second half of the widget is the formula behind "performance depends on data placement" (p. 430). If a fraction \(f\) of a loop's misses find their block in the local memory:

\[ t_{\text{avg}} = f \cdot t_{\text{local}} + (1 - f) \cdot t_{\text{remote}} \]
\(f\)
fraction of the misses whose home is the local node
\(t_{\text{local}}\), \(t_{\text{remote}}\)
latency of one local and one remote access; the widget assumes 80 ns and 240 ns

With 70% local misses, 0.7 × 80 + 0.3 × 240 = 56 + 72 = 128 ns; with 95%, 76 + 12 = 88 ns. Placement alone makes the average 45% longer.

Why reach into another node's memory at all? Because parallel programs share data (p. 437): an array that Node 0 initializes and Node 1 processes in place, a lock in Node 3's memory that Node 0 must acquire, the border cells of a simulation grid spread over the nodes. "If no processor could access remote memory, it wouldn't be ‘shared memory’ anymore; it would be pure message passing." With private memories the programmer would orchestrate every transfer — send(array, Node 1) here, receive(array, Node 0) there — while in a DSM "a simple load/store suffices" (p. 437): easier to program, harder to build.

Two pieces of hardware make it work. The interconnect moves cache lines between nodes and routes each request to the memory module that owns the block: a crossbar in small systems, a 2-D mesh, a torus or a fat tree in larger ones, a NoC inside a chip (p. 436). And since a DSM has no single bus to snoop, and broadcasting every write would not scale, a directory records which caches hold a copy of each block. It is stored alongside each memory block, at its home, and only the caches it lists are notified (p. 435); lessons 37 and 38 run it message by message.

Who decides which node's memory gets an array?

The notes say only that "the system (hardware + OS) automatically decides" whether an address is local or remote (p. 434). Placement is a second decision. The hardware fixes which physical addresses each node owns; the operating system chooses the physical pages that a program's data receive — commonly with a first-touch policy, from the memory of the node whose processor touches the page first. (Background, not in the notes.)

In a DSM the address decides the home node; local or remote is a relation between the processor and that address. The program is the same either way; only the latency changes.

Clusters: separate computers that talk by messages

Now take four ordinary servers in a rack. Each has its own processors, often multicore, its own private memory, a local disk and its own instance of the operating system; Ethernet, InfiniBand or another high-speed fabric joins them. That is a cluster (p. 438). There is no shared address space: P0's load of 0x2200 reads P0's own memory, whatever Node 2 keeps at that number.

Nodes communicate by explicit message passing: a process in Node A calls send(message, Node B), a process in Node B calls receive(message, Node A) (p. 438). The receive waits until the message has arrived (Fig. 5), so every send/receive pair is a synchronization point, and the network latency is paid in full.

P0 P1 MPI_Send MPI_Recv waits message time 0 3 6 8 14
Fig. 5. Explicit communication between two processes of a cluster. P1 reaches its receive at time 3 and stops (orange) until the message of P0 arrives at time 8: every send/receive pair is a synchronization point, and the network latency, here from 6 to 8, is paid in full.

The software is MPI (Message Passing Interface), the de facto standard of high-performance computing: not a language but a specification plus libraries, for C, C++ and Fortran and with Python bindings (p. 438). Processes that share no memory must exchange messages to cooperate; a standard interface makes their programs portable across machines and vendors.

Clusters win on scale and cost (pp. 438–439). They grow from a few nodes to tens of thousands, and memory grows linearly with them, since every node brings its own DRAM. They are built from off-the-shelf servers and network gear, cheaper than custom supercomputers, and they run scientific computing, data analytics and AI training at scale; they are the dominant architecture of cloud datacenters, where each server is one node. They also isolate faults: one node can fail without crashing the system, because nothing is shared with it.

The bill goes to the programmer (p. 439): the data must be partitioned explicitly and every transfer orchestrated — "who owns the data", "when to send it". The network latency is much larger than a local memory access, the bandwidth between nodes lower than to the local DRAM, and every send/receive pair costs coordination.

A DSM and a cluster can be built from the same boxes. The difference is the address space: one address space and one operating system, reached by loads and stores, or one of each per node, reached by messages.

Three ways to program the machine

A programming model is the same choice seen from the software: "the software-level abstraction that maps onto the underlying hardware organization" (p. 440). It fixes how processors communicate — through a common memory, by explicit messages, or by all running the same program on different pieces of data — and the primitives that express parallelism: threads, send/receive, barriers.

Shared memory

Threads communicate through shared variables — Thread 0 writes x = 42, Thread 1 later reads x — on any machine with one address space, UMA or NUMA (p. 440). Locks, semaphores, barriers and atomic operations prevent race conditions; the tools are OpenMP (pragmas for parallel loops), POSIX threads, Java or C# threads. It is the natural model for SMPs and multicores; coherence traffic, placement on NUMA and synchronization limit it at scale (p. 441).

Message passing

Process A calls MPI_Send(data, dest=B), Process B calls MPI_Recv(data, source=A); groups use collective operations — broadcast, scatter/gather, reduce, barriers (p. 441). The model scales to thousands of nodes with no coherence problem and explicit control of locality, at the price of complex programming, network overhead and waiting at the send/receive points (pp. 441–442).

Data parallel: one program, many slices

The third model starts from the data: the same operation on different elements of a large data set. All processors run the same program, each on its own portion — SPMD, Single Program, Multiple Data (p. 442). The notes add two 1000-element vectors A and B on four processors: Proc 0 takes indices 0–249, Proc 1 250–499, Proc 2 500–749, Proc 3 750–999, each with the same loop.

/* on every processor p = 0 … 3 */
for (i = 250*p; i < 250*(p+1); i++)
    C[i] = A[i] + B[i];
barrier();

Data-parallel programs move in bulk-synchronous phases: local computation on local data, then global communication or a barrier, then the next phase — the BSP model formalized by Leslie Valiant (p. 442). The barrier is also the weak spot: a phase lasts as long as its slowest processor (Fig. 6).

Proc 0 Proc 1 Proc 2 Proc 3 0–249 250–499 500–749 750–999 barrier at 250

Balanced: the barrier at 250

Proc 0 Proc 1 Proc 2 Proc 3 0–199 200–399 400–599 600–999 wait wait wait barrier at 400

One straggler: the barrier at 400

Fig. 6. One bulk-synchronous step of the addition of two 1000-element vectors on four processors, one time unit per element. Balanced (left), all four reach the barrier at 250. Suppose instead that Proc 3 holds 400 elements (right): the barrier comes at 400 and the other three wait 200 units each — 1000 units of work in 4 × 400 = 1600 processor-units of time, 62.5% efficiency.

Data parallelism runs on SIMD and vector machines, on GPUs where CUDA or OpenCL launch thousands of threads running the same kernel, on multicores with #pragma omp parallel for, and on MapReduce or Spark clusters (pp. 442–443). It is simple, scales when the data are large and split evenly, and keeps GPUs and vector units busy; it suffers from load imbalance and stragglers, and suits regular, array-like work, not trees or graphs (p. 443).

The three programming models side by side (notes, pp. 440–443).
ModelProcessors communicate byFitsToolsPays with
Shared memoryloads and stores to shared variables; locks, barriers, atomicsUMA and NUMA machines, multicoresOpenMP, POSIX threadscoherence traffic, placement on NUMA, synchronization
Message passingexplicit send / receive; broadcast, scatter / gather, reduceclustersMPIharder programming, network latency, waiting at send / receive
Data parallel (SPMD)the same program on its own slice; a barrier between phasesvector units, GPUs, multicores, MapReduce / Spark clustersCUDA, OpenCL, OpenMP, MPIload imbalance, stragglers, regular data only

"SPMD is SIMD." No. In SPMD each processor has its own program counter and may take different branches: a programming style on MIMD hardware, as with MPI or OpenMP. SIMD is hardware running one instruction stream on many data elements in lock step (lesson 30).

Two axes, four machines

Put the two questions side by side. The address-space model, shared or private, and the physical memory organization, centralized or distributed, are orthogonal: "choosing one does not force the other" (p. 431). All four combinations exist (p. 430).

The two axes and the four machines (notes, pp. 430–431).
Centralized memoryDistributed memory
Shared address spaceUMA: the classic SMP, a multicore chipNUMA: DSM, cc-NUMA
Private address spacesrare: MPI processes on one SMP boxclusters, large-scale MPI machines

The only unfamiliar cell is private and centralized: MPI processes on one SMP box, each in its own address space, exchanging copies through the one memory — "rare, but possible in small message-passing systems" (p. 430). The January 2026 quiz, though, gives a picture, not a name.

Sort the four machines

Four machines, drawn in the style of the exam picture. Choose a machine, decide its cell, then press the button of that cell. A right answer stays in the grid; a wrong one tells you which axis you misread and underlines the clues.

  1. Machine 1 is the January 2026 picture of the hook. Before you press anything, count its memory modules — that gives the column — then read the small labels next to them — that gives the row. Then press your cell.
    What you should see

    Shared · distributed, a DSM (cc-NUMA). One memory module in every node and no central memory: distributed. Every module answers to P0, P1, P2, P3, so loads and stores reach all of them: one logically shared address space. That is Answer 3 of the quiz.

  2. Select Machine 3 and compare it, box by box, with Machine 1. What is different? Predict its cell before you press.
    What you should see

    The boxes are identical; only the labels and the network changed. Each memory answers to its own processor only, and data crosses the network as messages: private · distributed, a cluster — Answer 4 of the quiz. "Shared memory" is about addresses, not about where the chips are.

  3. Machines 2 and 4 each have a single memory. Predict both cells, then check.
    What you should see

    Machine 2: one memory that every processor addresses — shared · centralized, the UMA SMP of Fig. 2. Machine 4: one physical memory cut into four private parts, one per process, which exchange messages — private · centralized, MPI processes on one box, the rare cell. Again a pair of hardware twins that differ only in the labels.

Back to the quiz of the hook. The column first: every node has its own memory module and there is no central one, so the memory is distributed, and Answers 1 and 2 are out. Then the row: every module is labelled "P0, P1, P2, P3", so every processor can load and store every module — a single logically shared address space. That rules out Answer 4, in which each processor reaches only its own memory and communicates by send/receive. The answer is 3: distributed memory, single logically shared address space, a DSM. Give each memory only its own processor's label, and the same drawing becomes a cluster: Answer 4.

"Shared memory" is about addresses, not about where the chips are: the number of memory modules sets the column, the processors that can address them set the row.

Exam-style questions

The questions follow the forms of the papers: the January 2026 picture quiz, an open question with eight sub-points as in June 2026, a shorter question in the style of the 2024 directory question, a computation, and quizzes with multiple answers and a true/false. The model answers are written here; there are no official solutions.

(SINGLE ANSWER) What type of multiprocessor architecture does the following picture represent?

N0 N3 P0 P3 C0 C3 MM0 MM3 P0, P1, P2, P3 P0, P1, P2, P3 … … …
The picture of the quiz, redrawn: N0 … N3, each with a processor, a cache and a memory module; every memory module is labelled P0, P1, P2, P3.
  • Answer 1: Centralized Memory; Single Logically Shared Address Space There is no central memory: every node has its own module, MM0 … MM3.
  • Answer 2: Centralized Memory; Message Passing Architectures Wrong on both axes: the memory is in the nodes, and the labels say that every processor addresses every module.
  • Answer 3: Distributed Memory; Single Logically Shared Address Space One memory per node (distributed), each addressable by P0–P3 (one shared address space): a DSM, also called NUMA.
  • Answer 4: Distributed Memory; Message Passing Architectures The memory is distributed, but with message passing each module would answer to its own processor only; here every module lists P0, P1, P2, P3.
Show model answer

Answer 3. Each node contains its own processor, private cache and memory module, so the memory is physically distributed and there is no single central memory: Answers 1 and 2 are wrong. Each memory module is annotated with P0, P1, P2, P3: every processor can access every module with ordinary loads and stores, so the memories form a single logically shared address space and Answer 4 is wrong. This is a Distributed Shared Memory (DSM) architecture, also known as NUMA.

This is the quiz of the 8 January 2026 paper as the notes reproduce it (p. 505), options verbatim; the notes' answer, 3, is correct. Read the picture in two moves: count the memories for the column, read the labels for the row. If the paper asks you to motivate, one sentence per axis is the whole answer.

Explain the main concepts and benefits of each one of the following organizations and models used in multiprocessors: 1. Shared address space; 2. Private address spaces (message passing); 3. Centralized shared-memory multiprocessors (UMA / SMP); 4. Distributed shared-memory multiprocessors (NUMA / DSM); 5. Home node of a block in a DSM; 6. Small-scale multicores; 7. Distributed-memory clusters; 8. Data-parallel (SPMD) programming model. (Five lines each.)

Show model answer

1. All processors see one logical memory: an address names the same location for every processor, any processor can load or store any address, and communication is implicit (one processor stores, another loads). Programmed with threads (Pthreads, OpenMP). Benefits: easy to program, handles irregular and dynamic sharing, low latency for small items, caches reduce remote traffic automatically. Costs: complex hardware (cache coherence), synchronization with locks and barriers, little control of data placement.

2. Each processor has its own address space: the same address names different locations on different processors, no load or store crosses processors, and data moves by explicit send/receive (MPI_Send / MPI_Recv). Benefits: simple hardware with no coherence protocol, the programmer sees when and how much data moves, every send/receive synchronizes, explicit placement, fault isolation. Costs: harder programming, high overhead for fine-grain sharing, data decomposed by hand.

3. One centralized physical memory shared by all processors, with the same latency and bandwidth whichever processor accesses it (symmetric). Processors with private caches, possibly a shared L3, reach it through a bus or crossbar; coherence by snooping. Benefits: the simplest programming (no data placement), sequential code ports easily, a uniform view for the OS. Limit: the single memory and interconnect saturate under contention, about 32 processors in classic designs.

4. Memory physically distributed: each node is processor(s) + caches + a local memory module, and the nodes are joined by a scalable interconnection network. The union of the local memories is one global address space, so programs still use loads and stores. The access time depends on whether the address is in the local module (fast) or in a remote node (slower). Benefits: scales to hundreds of cores, aggregate memory bandwidth grows with the nodes. Costs: performance depends on data placement; a scalable network and directory-based coherence are needed.

5. The home node of a block is the node whose main memory holds it, fixed by the physical address (if every node owns 4 KiB, N2 owns 0x2000–0x2FFF and the block of 0x2200 is homed in N2). In a directory protocol it also keeps the block's directory entry (state and sharer bits), stored with the block in its memory, so every request for the block goes through it. The local node is the node that issues the request. Benefit: the data and its coherence information are found from the address alone, without broadcasts.

6. A multicore chip with a few cores (up to about 8, sometimes 16) is an SMP on a chip: identical cores, uniform access to one main memory, one shared-memory machine for the OS. Private L1 and L2 caches per core hold the working sets and reduce contention; a shared L3 cuts DRAM traffic and is where shared data meets; coherence by snooping on the shared bus. Beyond about 8 cores the L3 is split into banks and the bus becomes a network-on-chip (mesh, ring, crossbar), so several requests are served in parallel.

7. A set of independent computers, each with its own processors, private memory, local disk and OS instance, connected by a network (Ethernet, InfiniBand); no shared address space, communication by explicit message passing with MPI. Benefits: scales to tens of thousands of nodes, memory grows linearly with the nodes, commodity hardware is cheap, one node can fail without crashing the system. Costs: harder programming (partition the data, orchestrate the messages), network latency much higher and bandwidth lower than local DRAM, synchronization at every send/receive.

8. All processors run the same program, each on its own portion of the data (Single Program, Multiple Data): adding two 1000-element vectors, Proc 0 takes indices 0–249, …, Proc 3 750–999. Execution proceeds in bulk-synchronous phases: local computation, global communication or a barrier, next phase (Valiant's BSP model). Benefits: one simple program, high scalability for large and evenly split data, efficient on GPUs and vector units. Costs: load imbalance and stragglers stall everyone at the barrier; it suits regular array computations, not trees or graphs.

The form is the June 2026 question: eight sub-points, about five lines each. Give three things in each: what it is, one concrete detail (a number, an example, an API) and the benefit with its cost. Sub-points 3 and 4 are best written as a pair, uniform against non-uniform latency; sub-point 5 is the July 2024 question "What is the definition of home node?".

Consider a distributed shared memory system with 4 nodes (N0, N1, N2, N3); each node has a processor Pi, a cache Ci and a main memory MMi, and the nodes are connected by an interconnection network. Each node owns 4 KiB of the physical addresses: N0 from 0x0000 to 0x0FFF, N1 from 0x1000 to 0x1FFF, N2 from 0x2000 to 0x2FFF, N3 from 0x3000 to 0x3FFF. Processor P0 executes LD F2, 0(R1) with R1 = 0x2200 and misses in C0; no other cache holds a copy of the block.

1. What is the definition of home node? Which node is the home node of this access? 2. Which node is the local node? 3. Describe the path of the request and of the data. 4. What changes, and what does not change, if R1 = 0x0200?

Show model answer

1. The home node of a block is the node whose main memory holds the block; it is fixed by the physical address, and in a directory protocol it also keeps the block's directory entry, so every request for the block goes through it. 0x2200 lies in 0x2000–0x2FFF: the home node is N2.

2. The local node is the node whose processor issues the request: N0.

3. C0 misses; the request leaves N0 and the interconnection network routes it, by address, to N2; MM2 supplies the block (offset 0x200 in its range); the data travels back to N0, is written into C0, and the load completes into F2. It is a remote access: two network crossings and a longer latency than a local access.

4. With 0x0200 the home is N0 itself: home and local coincide, and the miss is served by MM0 without using the network, with the shorter local latency. The program does not change — the same instruction in the same address space; only the latency changes.

Sub-question 1 is the July 2024 question word for word. In the directory exercises a third role appears, the remote node: a node that holds a cached copy of the block (lesson 37). Here no other cache holds a copy, so there is none; do not call N2 "remote" in that exercise vocabulary.

Let us consider a distributed shared-memory multiprocessor with 4 nodes (N0, N1, N2, N3) and a clock frequency of 1 GHz. With all memory references hitting in the caches, the CPI is 1. 0.5% of the instructions miss in the cache, and the processor stalls until the miss is served: 80 ns when the home node of the block is the local node, 240 ns when it is another node. Case A: the data of the program are interleaved evenly over the four nodes. Case B: the operating system places the data so that 75% of the misses find their block in the local node. How much is the speed up of case B over case A in terms of CPI?

Show model answer

With \(T_{CLK} = 1\) ns, a local miss costs 80 clock cycles and a remote miss 240. Case A: a quarter of the blocks are homed in the local node, so the average miss penalty and the CPI are

\[ 0.25 \times 80 + 0.75 \times 240 = 200 \] \[ CPI_A = 1 + 0.005 \times 200 = 2 \]

Case B:

\[ 0.75 \times 80 + 0.25 \times 240 = 120 \] \[ CPI_B = 1 + 0.005 \times 120 = 1.6 \]

Speed up in terms of CPI:

\[ \frac{CPI_A}{CPI_B} = \frac{2}{1.6} = 1.25 \]

The same program on the same machine runs 25% faster only because of where its data are placed.

Not a past-paper exercise: it is the formula sheet's CPI with stalls (CPI = 1 + stall cycles per instruction) with the average miss latency of section 3 as the penalty, asked the way the 2025 performance exercise and the 2026 VLIW exercise ("How much is the speed up in terms of CPI?") ask. The two traps: 0.5% is 0.005, and with four nodes an even spread makes only a quarter of the misses local, not half. Lesson 33 works Hennessy & Patterson's version: 0.2% of the instructions make a remote reference of 400 cycles, and a CPI of 0.5 becomes 1.3.

(MULTIPLE ANSWERS) Which of the following statements about a distributed shared-memory (DSM, cc-NUMA) multiprocessor are true?

  • Answer 1: Any processor can access any memory location with ordinary load and store instructions. The single global address space: the hardware routes the access to the home node.
  • Answer 2: Processors on different nodes must exchange explicit messages (send/receive) to share data. That is a cluster. In a DSM a load or a store suffices.
  • Answer 3: The access time depends on whether the address belongs to the local memory module or to a remote node. Non-uniform memory access: local inside the node, remote across the network.
  • Answer 4: Each node runs its own instance of the operating system. A DSM is one machine with one OS; an OS instance per node is the mark of a cluster.
  • Answer 5: Cache coherence is typically maintained by a directory stored alongside each memory block. Snooping a network does not scale; the directory notifies only the caches that hold a copy (p. 435).
Show model answer

Answers 1, 3 and 5. A DSM has physically distributed memory, a single logically shared address space reached by loads and stores, non-uniform latency, and directory-based coherence. Answers 2 and 4 describe a distributed-memory cluster.

A multiple-answer quiz as in June 2026. The two wrong options are the cluster's features; sort each option by asking "load/store or send/receive?".

(True/False) In a distributed-memory cluster programmed with MPI, a process can read a variable of a process running on another node with an ordinary load instruction.

  • True Each node has its own private address space; the memory of another node is out of reach of loads and stores.
  • False Right: the variable must be requested and sent as a message (MPI_Send / MPI_Recv).
Show model answer

False. In a cluster every node has its own private memory and address space, and the memory of one node cannot be accessed directly by another node via loads and stores; data moves only through explicit messages, with MPI_Send and MPI_Recv.

The true/false form of June 2025. The same statement is true for a DSM; the word "cluster" decides.

Check yourself

On a machine with private address spaces, P0 and P1 both execute LD F2, 0(R1) with R1 = 0x2000. What do they load?

  • The same value, from the same memory cell That is a shared address space; here each 0x2000 is a different cell.
  • Each the contents of its own 0x2000, two different cells Same number, two locations. They hold the same value only if a message copied it.
  • P1's load faults, because 0x2000 belongs to P0 Nothing of P0 is in P1's address space: P1 has its own complete set of addresses.
  • Whatever the last MPI_Send wrote into the shared cell There is no shared cell; a receive copies the message into the receiver's own memory.

With the latencies of the widget of section 3, 80 ns local and 240 ns remote, a loop's data are interleaved over the four nodes, so 25% of its misses are local. What is the average miss latency?

  • 160 ns That is the plain mean of 80 and 240; the fractions weigh them: 0.25 × 80 + 0.75 × 240.
  • 200 ns 0.25 × 80 + 0.75 × 240 = 20 + 180 = 200 ns.
  • 120 ns That is 75% local: the two fractions are swapped.
  • 240 ns That would be every miss remote; a quarter of them are local.

Which are disadvantages of the shared-address-space model? Select all that apply.

  • Building scalable, coherent shared memory is hard Every copy of a block must agree: the coherence protocols of lessons 35 to 38.
  • Locks and barriers are needed to order the accesses Communication is implicit, so the order must be enforced explicitly.
  • Little control over where shared data sits, which hurts on NUMA Placement decides local or remote latency, and the program does not say where data goes.
  • Every transfer needs an explicit send and receive That is the cost of message passing.
  • Caches cannot be used for shared data They can, and they cut remote traffic; the price is coherence.

The three costs mirror the three strengths of message passing: simple hardware, natural synchronization, placement control.

Which of these machines is NUMA?

  • A single chip with 16 cores, private L1 and L2, a shared L3 and one memory controller One memory system for all cores: UMA, an SMP on a chip, with a banked L3 and a NoC if it is large.
  • A server with two 8-core sockets, each with its own memory A core reaches the other socket's memory only across the link between the chips: local and remote latencies differ.
  • A cluster of 16 single-core servers No shared address space at all: another node's data arrives only in messages, so there is no remote memory access to be slow.
  • A dual-core laptop chip A small SMP: uniform access to one memory.

Four processors share a bulk-synchronous step; they receive 250, 250, 250 and 400 elements, one time unit per element. When does the step end?

  • At 287.5, the average load The barrier waits for everybody, not for the average.
  • At 400 The slowest processor sets the end of the phase; the others wait at the barrier.
  • At 1150, the sum The processors work in parallel; the sum is the sequential time.
  • At 250, when most processors are done Three are done at 250, but the barrier opens only when the fourth arrives.

Why does a cluster survive the failure of one node better than a DSM?

  • Its nodes share no memory and no operating system, so a failure stays inside its node Fault isolation (p. 439): nothing in the rest of the machine depends on the dead node's memory.
  • MPI resends every lost message automatically The isolation comes from the architecture, not from a resend mechanism.
  • Commodity servers never fail They fail like any other computer; the point is how much a failure takes down.
  • In a DSM a failed node is replaced by its home node Each address has exactly one home; if that node dies, its range of the shared address space is gone for everybody.

MPI is…

  • a standardized library interface: a specification plus libraries for C, C++, Fortran and Python The notes stress it (p. 438): not a language.
  • a programming language for clusters It is called from ordinary languages; it is not one itself.
  • the network hardware of a cluster That is Ethernet or InfiniBand; MPI is the software interface on top of it.
  • a cache-coherence protocol for DSM machines Message passing needs no coherence protocol: the memories are private.

Key take-aways

What to watch and read