One machine, many brains: multiprocessors, buses and topologies

After this lesson you will say what makes a machine a multiprocessor and why it is built, explain why a single bus stops scaling at a few tens of processors, and compute the total and bisection bandwidth, the diameter and the degree of the classic networks by counting their links and cutting them in half.

The notes report that commercial single-bus multiprocessors "maxed out at ≈36 processors before the bus saturated" (p. 420). Take such a machine, 36 processors on one bus, and plug in a 37th. The machine barely gets faster. Worse, every memory access of the other 36 now waits a little longer: the 37th processor has made the bus slower for everyone.

Architects answered with networks of many links. A 64-node ring has 64 links where a bus has one. Yet when half of the machine sends data to the other half, the ring is "only 2× bus" — the notes' own verdict (p. 423). Sixty-four times the wires, twice the speed.

Both puzzles have the same answer. It is a single number, and by the end of the lesson you will compute it for any network.

What makes a machine a multiprocessor

Open the task manager of a laptop under load: several cores are busy at once, each running its own program or thread. One operating system schedules them all, and each core can load any address of the one memory. That chip is a multiprocessor. A rack of a hundred web servers is not: a hundred operating systems, a hundred separate memories, messages over a network — a cluster (lesson 34).

Multiprocessor — "a computer system with tightly coupled processors, coordinated by a single operating system, and typically offering a shared memory abstraction (shared address space)" (p. 417): processors that "remain part of one coherent machine, not a loose cluster".

Its execution paradigm is MIMD (multiple instruction, multiple data): every processor runs its own instruction stream on its own data (Flynn's taxonomy, lesson 30). What it harvests is thread-level parallelism (TLP), many independent streams at once — where instruction-level parallelism overlaps the instructions of one stream (lessons 7–21) and data-level parallelism applies one instruction to many elements (lessons 30–32). Multithreading (lesson 29) shares one core among threads; a multiprocessor gives each thread a core of its own.

Why build one? The notes give four goals (p. 417). Performance: very high throughput from TLP. Scalability: performance that grows, ideally linearly, as processors are added. Reliability: redundancy lets the machine tolerate some faults. Versatility: the same idea from embedded systems to high-end servers. Behind all four is history: "the shift from single-core → multicore → manycore reflects the industry response to ILP and frequency walls" — the walls of lesson 8.

The notes sort multiprocessors by integration and scale; from left to right the machines grow and the memory spreads out.

The notes' taxonomy by integration and scale (p. 417), with the memory and the coherence style of each.
MulticoreSMPLarge-scale multiprocessor
whatseveral cores on the same chip; a manycore beyond 32 coressymmetric multiprocessor: all processors share one centralized memorydistributed shared memory (DSM): the memory is physically spread over the nodes
size, examplesIntel i7, AMD Ryzen, ARM big.LITTLEtypically ≤ 32 processorsbeyond 32 processors
memory accessuniform: one chip is a small SMPuniform: UMA, Uniform Memory Accessnon-uniform: NUMA, local fast and remote slow
coherencesnooping on small chips (p. 432)snooping protocolsdirectory-based protocols

In one sentence of the notes: "centralized memory works up to a point, beyond which distribution is necessary" (p. 417). SMP or NUMA is a scalability decision, and the coherence protocol comes with it — snooping, every cache listening to one shared medium, for small machines; directories, a table next to each memory recording who holds a copy, for large ones (lessons 35–38).

"A multicore is a SIMD machine." No: every core has its own program counter and fetches its own instructions — MIMD. SIMD lives inside a core, in its vector or packed units (lessons 30–32).

Multiprocessors are not just "more cores": they are about how processors, memory and communication are organised and coordinated (p. 417).

Ten questions every multiprocessor answers

Every machine with more than one processor answers ten questions, whether its designers meant to or not. The notes list them (pp. 418–419) under one frame: architects balance scalability — network, memory placement, coherence protocol — against programmability — shared memory or message passing — and design hardware and software together "to extract parallelism and hide communication latency".

The ten design questions of the notes (pp. 418–419), the options they list, and where this notebook answers each.
#QuestionThe optionsWhere
1How many processors?small: 2–8 cores (single bus, snooping, UMA); medium: 8–32; large: hundreds to thousands (NUMA, DSM or message passing) — chosen by the workload: servers, embedded, HPCthis lesson
2How powerful are they?a few complex out-of-order cores or many simple in-order ones, as in IBM Blue Gene: single-thread speed against throughput; performance per watt rules at large scalelesson 8
3How are they connected?a bus: cheap, simple, saturates at ≈ 36 processors; or an interconnection network: rings, meshes, crossbars, hypercubes — it sets bandwidth, latency and scalabilitysections 3–5
4How do they share data?shared memory: implicit, through loads and stores, coherence needed; message passing: explicit send and receive, simpler hardware, harder programmingbelow; lesson 34
5Where is the physical memory?centralized (UMA): uniform access, easy, a bottleneck; distributed (NUMA): scalable, non-uniform latencylesson 34
6How do they coordinate?locks, barriers, atomic operations; their cost can limit scalabilitylesson 34
7How are they programmed?multiprogramming (independent jobs), threads on shared memory, MPI processes, data-parallel / SPMD in bulk-synchronous phaseslesson 34
8How do the caches stay coherent?snooping protocols on small SMPs, directory protocols on large NUMA machineslessons 35–38
9In which order do writes become visible?memory consistency: sequential consistency (simple, slow) or relaxed models (complex, efficient)lesson 35
10How is performance evaluated?speedup against the number of processors (Amdahl, Gustafson), local against remote latency, network and memory bandwidth, performance per watt and per costsection 6

Shared memory or message passing: same power, different price

Question 4 hides a surprise. With shared memory a processor communicates by storing to an address that another one later loads from; nobody sends anything. With message passing it calls send and the other calls receive. Different worlds — yet each can be built out of the other:

The sender writes the message into a buffer in shared memory, then sets a flag. The receiver waits until the flag is set and reads the buffer. A send is a few stores, a receive a few loads.

One process owns the data. A load becomes a request message to the owner, who replies with the value; a store becomes a message carrying the new value. A load is one send and one receive.

So neither model is more powerful than the other: both are Turing complete (footnote 11, p. 418) — each can compute anything a Turing machine (an endless tape, a read/write head and a table of rules) can compute. "Choosing shared memory vs. message passing does not limit what can be computed, only how" (p. 419). The difference is practicality: performance, programmability, ease of reasoning. Shared memory is natural to program but needs coherence hardware; message passing needs simpler hardware but makes the programmer move every byte (lesson 34).

One bus for everyone — until it is full

Start with the simplest wiring, the one the notes draw first (Fig. 31, p. 422): every processor, with its cache, hangs on a single bus, and so do the main memory and the I/O system. Every cache miss of every processor becomes a transaction on it, and it carries one transaction at a time.

P0 P1 P2 P3 C0 C1 C2 C3 memory I/O bus one at a time

Before: one bus, one transfer at a time

P0 P1 P2 P3 C0 C1 C2 C3 network bank 0 bank 1 bank 2 bank 3 one memory in four banks

After: a network, several transfers at once

Fig. 1. Left: the notes' Figure 31 (p. 422) redrawn — every cache miss of every processor is a transaction on the one bus, so while memory answers C1 the requests of C0, C2 and C3 wait. Right: the same processors and the same central memory, split into four banks behind an interconnection network; two misses travel at once on different paths. Only the wiring changed: the memory did not move.

Count what that means. Suppose a processor running alone keeps the bus busy a fraction \(d\) of the time — say one miss every 100 ns, each holding the bus for 2.8 ns, so \(d = 2.8\%\), a value picked here to land on the notes' number. Two such processors keep it busy 5.6% of the time, ten 28%. A bus cannot be busier than 100%, so it carries the traffic of at most

\[ P_{\max} \approx \frac{1}{d} = \frac{1}{0.028} \approx 36 \]

processors. That is how a bus ends at the notes' "≈36 processors" (p. 420): not a law of nature, but the capacity of the bus divided by the demand of one processor.

Below the ceiling most requests find the bus free, so throughput grows almost linearly. Near it requests queue; past it each new processor brings a customer and no capacity, so throughput flattens and every access waits longer. The hardware adds a second reason (background, not in the notes): every device loads the wires electrically, so a bus built for more slots runs a slower clock.

The bus that stops helping

Throughput is counted in processors' worth: 10 means as much work as ten processors running alone. The bus curve comes from a standard queueing model (mean-value analysis) of processors that compute, miss in their cache and wait for a bus that serves one miss at a time. The network is modelled as one whose capacity grows with the machine; its only price is that every miss crosses switches and takes three bus-transfer times. \(d\) is the share of the bus one processor would use if it ran alone.

  1. Leave \(d\) at 2.8% and predict, before touching P: where does the bus curve go flat? Then drag P to 64.
    What you should see

    Near \(1/d = 35.7\) processors' worth. At P = 64 the bus delivers 35.7 — as much as 36 processors working alone — while each processor runs at 56% of its solo speed. The bus is 100% busy, and every access takes 29 times its idle-bus time.

  2. Set P = 36 and read the access time. Now add the 37th processor: what does it buy, and what does it cost?
    What you should see

    Throughput goes from 32.0 to 32.6 processors' worth — the note says the newcomer added 0.53 of a processor — while every bus access goes from 5.4 to 5.9 times the idle-bus time, for all 37 processors. That is the 37th processor making the bus slower for everyone.

  3. Find the P at which the bus becomes 80% busy. What is happening to each processor there?
    What you should see

    At P = 31. At 32 processors the bus is 83% busy, every access already takes 4 times as long as on an idle bus, and each processor runs at 92% of its solo speed; from there every newcomer buys less than the one before. This is the size where the notes' SMPs stop: "typically ≤ 32 processors".

  4. Halve the demand to 1.4% — what bigger private caches would do. Where is the ceiling now, and where do the two curves cross?
    What you should see

    The ceiling doubles to 71.4: at P = 64 the bus still delivers 60.6 and is 85% busy. Bigger caches are what let bus-based machines grow from a handful of processors to a few tens. The crossing with the network moves from about P = 28 to about P = 52; below it the bus wins, because every network access crosses switches.

The notes' cost/performance trade-off (p. 420) puts prices on the picture. Past its sweet spot the bus "plateaus regardless of added CPUs"; a network is "initially costlier (switches, links)" but keeps the performance per processor roughly constant, so it will "always win once the bus reaches its plateau". Hence small SMPs of 4–16 cores ruled desktops and servers, while large HPC systems adopted meshes, tori and fat trees.

Revisiting his SISD / SIMD / MIMD classification, Michael Flynn already warned that MIMD "multiprocessors are subjected to a saturation syndrome based on general communications lockout": past some size, processors wait for the shared path instead of computing.

The bus is not dead, though. Its weakness is also its strength: because everyone shares it, everyone hears every transaction — exactly what a snooping coherence protocol needs (lesson 35).

Network-connected multiprocessors

The alternative is an interconnection network: many point-to-point links joined by switches, so that transfers on different links proceed at once (Fig. 1, right). It takes the bus off the critical path and "can scale to many more processors" (p. 420). The notes' description of it needs a correction:

Which number tells the truth: total and bisection bandwidth

To compare networks you need numbers. Take the notes' 8-node ring (p. 423) with \(b = 1\) GB/s per link. If every node talks to a neighbour, all 8 links work at once: 8 GB/s. Now run a fire drill: the four nodes on the left each send to a partner on the right, at the same moment. Whatever routes they take, all that traffic must squeeze through the links that join the two halves — 2 of them. The network moves 2 GB/s.

0 1 2 3 4 5 6 7 8 links × b = 8 GB/s neighbours talk

Total bandwidth: count every link

0 1 2 3 4 5 6 7 2 links × b = 2 GB/s half talks to half

Bisection bandwidth: count the links the cut crosses

Fig. 2. The notes' 8-node ring (p. 423), \(b = 1\) GB/s per link. Left: when every node talks to a neighbour, all 8 links work at once — the total bandwidth, 8 GB/s. Right: when the four nodes on one side talk to the four on the other, everything must cross the two links the dashed cut severs — the bisection bandwidth, 2 GB/s.

Those two numbers are the canonical metrics of the notes (p. 421):

Total network bandwidth (best case) — the sum of the bandwidths of all links: "the maximum aggregate throughput that the network could deliver if all links were used simultaneously and were perfectly balanced".

Bisection bandwidth (worst case) — "the minimum total bandwidth of links that must be cut to split the network into two equal halves (each with half the nodes)".

\[ \text{Total BW} = M \times b \] \[ \text{Bisection BW} = \min_{\text{cuts}} \sum_{\text{crossing links}} b \]
\(M\)
number of links in the network
\(b\)
bandwidth of one link (GB/s)
cuts
every way of splitting the \(P\) nodes into two halves of \(P/2\)

Why the minimum? Because different splits cross different numbers of links: split the 8-node ring into its odd and its even nodes and all 8 links cross; split it into two arcs and only 2 do. The narrowest passage decides, so "we have to try all possible cuts and select the smallest one" (p. 421) — the notes' "any cut crosses 2 links" means a cut through the ring as drawn. The minimum is a hard limit: if each of the \(P/2\) nodes on one side sends \(m\) bytes across, the transfer takes at least

\[ t \ge \frac{(P/2)\, m}{\text{Bisection BW}} , \]

however fast the rest of the network is. Apply both definitions to the bus: it is one link, so its total bandwidth is \(b\); a cut through it severs that link, so its bisection is \(b\) as well. On a bus the best case is the worst case.

"The bisection bandwidth is half the total." No: the 64-node ring has a total of \(64b\) and a bisection of \(2b\).

Two more numbers, which the notes use ("logarithmic diameter", p. 424) but never define, complete every comparison of networks (Hennessy & Patterson, Appendix F). The diameter is the largest, over all pairs of nodes, of the number of links on the shortest path between them; every link is a hop through a switch, so the diameter measures the worst-case latency. The degree is the number of links per node, the ports of its router, so it measures cost. The 8-node ring has diameter 4 and degree 2.

Total bandwidth is the best case, neighbours talking; bisection bandwidth is the worst case, half the machine talking to the other half — and the worst case is the one that bounds global traffic.

The classic topologies, by counting and cutting

A topology is "the way processors and memories are interconnected" (p. 422): it sets how processors communicate (direct neighbours or global links), how far the system scales and what it costs in wires and switches. The notes give five classic ones, studied since the 70s–90s and still behind today's networks-on-chip and HPC interconnects. Their formulas need no memorising: each follows from two moves, count the links and cut the network in half.

Try both on the notes' Figure 32 (p. 424), a 4 × 4 mesh: four rows of 3 horizontal links and four columns of 3 vertical ones make 24 links, and a cut between the two middle columns crosses one link per row, 4 links — exactly the notes' numbers. The stepper repeats the two moves for every topology.

  1. Ring, count. Each of the \(P\) nodes has 2 links and each link has 2 ends, so counting ends counts every link twice:

    \[ M = \frac{2P}{2} = P \] \[ \text{BW}_{\text{total}} = P\,b \]
  2. Ring, cut. Split the loop into two arcs of \(P/2\) nodes. Walking round a closed loop you pass from one half to the other an even number of times, at least twice — and two arcs need exactly two cuts, wherever they fall:

    \[ \text{BW}_{\text{bisect}} = 2b \]
  3. Mesh, count. \(N = \sqrt{P}\) rows, each with \(N - 1\) horizontal links, and \(N\) columns, each with \(N - 1\) vertical links:

    \[ M = 2N(N-1) \]
  4. Mesh, cut. Cut between the two middle columns (\(N\) even): one horizontal link per row crosses, and no balanced cut crosses fewer.

    \[ \text{BW}_{\text{bisect}} = N\,b = \sqrt{P}\,b \]
  5. Hypercube, count. \(P = 2^N\) nodes, each with \(N\) links, every link counted from both ends:

    \[ M = \frac{N P}{2} \]
  6. Hypercube, cut. Cut along the top address bit: the two \((N-1)\)-cubes of the doubling (Fig. 3) fall apart, and each node loses exactly one link, the one to its twin. \(P\) nodes, two ends per link:

    \[ \text{BW}_{\text{bisect}} = \frac{P}{2}\, b = 2^{N-1}\, b \]
  7. Fully connected, count and cut. One link for every pair of nodes; and each of the \(P/2\) nodes of one half has its own link to each of the \(P/2\) nodes of the other:

    \[ M = \frac{P(P-1)}{2} \] \[ \text{BW}_{\text{bisect}} = \Big(\frac{P}{2}\Big)^2 b \]
The five classic topologies of the notes (pp. 422–424, eqs. 89–98, with the hypercube bisection corrected), two extras, and their total / bisection bandwidth in GB/s for \(P = 16\) and \(b = 1\) GB/s. The diameter and port columns are not among the notes' equations.
TopologyTotal BWBisection BWDiameterPorts per node\(P = 16\)
single bus\(b\) (89)\(b\) (90)1, shared11 / 1
ring\(P\,b\) (91)\(2b\) (92)\(P/2\)216 / 2
2-D mesh, \(N = \sqrt{P}\)\(2N(N-1)\,b\) (95)\(N\,b\) (96)\(2(N-1)\)2 to 424 / 4
hypercube, \(P = 2^N\)\((NP/2)\,b\) (97)\((P/2)\,b = 2^{N-1} b\) (98, corrected)\(N = \log_2 P\)\(N\)32 / 8
fully connected\(P(P-1)/2 \cdot b\) (93)\((P/2)^2\, b\) (94)1\(P - 1\)120 / 64
2-D torus (extra), \(N\) even\(2P\,b\)\(2N\,b\)\(N\)432 / 8
crossbar switch (extra)\(P\,b\)\((P/2)\,b\)1 switch116 / 8
The notes' verdict on each of the five (pp. 418, 422–424): what it buys and what it costs.
TopologyProCon
single buscheap, simplevery low scalability; saturates quickly
ringgood best-case parallelismworst case only 2× bus
2-D meshgood scalability; cost-effectivemultiple hops increase latency
hypercubevery good connectivity; logarithmic diameterwiring complexity grows
fully connectednon-blocking; high performancevery high cost, growing as \(P^2\)

The hypercube deserves a picture: its formula is the one the notes get wrong. An \(N\)-dimensional hypercube is built by doubling: take two copies of the \((N-1)\)-cube and join every node to its twin in the other copy — the node whose \(N\)-bit address differs only in the top bit.

010 011 110 111 000 001 100 101 top bit 0 top bit 1

Before: two 2-cubes, 4 + 4 links

010 011 110 111 000 001 100 101 4 links cross

After: join every node to its twin, 4 new links

Fig. 3. Doubling builds the hypercube. Two copies of the 2-cube (left) become a 3-cube when every node is joined to its twin, the address with the top bit flipped (right). The joining links are exactly the links a cut between the two copies severs: \(2^{N-1} = P/2\) of them. Here \(N = 3\): 12 links in all, 4 across the cut.

Cut it in half: a topology explorer

Pick a topology and a number of nodes; every link carries \(b = 1\) GB/s. The widget draws the network, counts its links, ports and diameter, and — with the cut on — splits the nodes into two halves (filled and hollow) along the cheapest balanced cut and highlights the links it severs. A mesh or a torus needs \(P = N^2\) with \(N\) even and a hypercube \(P = 2^N\): the drawing snaps to the nearest such \(P\).

  1. With the ring, predict before you move the slider: when P goes from 8 to 64, what happens to the total bandwidth and to the bisection?
    What you should see

    The total grows from 8 to 64 GB/s; the bisection stays at 2 GB/s. In the half-to-half test each of the 32 senders gets 0.06 GB/s, against 0.50 GB/s with 8 nodes. The ring owns 64 links, but global traffic squeezes through 2.

  2. Switch to the 2-D mesh and compare P = 16 with P = 64. The machine grows 4 times: by how much does the bisection grow?
    What you should see

    From 4 to 8 GB/s: twice, \(\sqrt{4}\). The cut is one column of links, and a column is only \(\sqrt{P}\) long. The total grows from 24 to 112 links, so each sender's share in the half-to-half test halves, from 0.50 to 0.25 GB/s.

  3. Hypercube, P = 16. The notes' eq. (98) gives \(2(N-1)\,b = 6\) GB/s. Count the highlighted links before you read the readout.
    What you should see

    8 links: the bisection is \(P/2 \cdot b = 8\) GB/s, and every sender of the half-to-half test gets a full 1 GB/s. At P = 64 the gap is 32 against the formula's 10. At P = 4 and 8 the two agree (2 and 4), which is why the notes' examples look right.

  4. Compare the fully connected network and the crossbar at P = 64. Which has the larger bisection, and what does each pay for it?
    What you should see

    Fully connected: 2016 links, 63 ports on every node, a bisection of 1024 GB/s. Crossbar: 64 links, one port per node, 4096 crosspoints, a bisection of 32 GB/s — the hypercube's number. Yet in the half-to-half test every crossbar sender still gets its full 1 GB/s: the crossbar is non-blocking. Most of the fully connected network's bisection only helps when every node talks to many others at once.

The fully connected network wins every bandwidth contest: diameter 1 and a bisection that grows as \(P^2\). Its price grows as \(P^2\) too — \(P(P-1)/2\) cables and \(P - 1\) ports on every node, "very high cost" (p. 423). The notes file it under another name.

P0 P1 P2 P3 6 cables, 3 ports per node

Fully connected: a cable for every pair

P0 P1 P2 P3 send P0 P1 P2 P3 receive 16 crosspoints, 1 link per node each way

Crossbar: one switch with \(P^2\) crosspoints

Fig. 4. Two non-blocking networks for \(P = 4\). Left: fully connected — a cable for every pair, \(P(P-1)/2 = 6\), and \(P - 1 = 3\) ports on every node. Right: a crossbar switch — every node has one link in (its row) and one link out (its column), and closing a crosspoint connects a row to a column; any permutation can be closed at once, here P0 → P2 and P3 → P1. The notes' "crossbar" formulas describe the left picture.

Beyond the five

Three more shapes complete the map; the notes only name two of them. The 2-D torus is the mesh plus wrap-around links joining the ends of every row and column: \(2P\) links, a bisection of \(2N\) links — twice the mesh's — and about half its diameter; three-dimensional tori connected the nodes of Cray XT and IBM Blue Gene supercomputers. A tree connects \(P\) nodes cheaply, with \(P - 1\) small switches, but has a bisection of one link, at the root; the fat tree thickens the links towards the root and recovers \(P/2\), which made it the standard fabric of HPC clusters.

1 link

Tree: everything crosses at the root

4 links

Fat tree: thicker links towards the root

Fig. 5. Background, not in the notes, which only name fat trees (pp. 420–421). Left: a binary tree joins 8 nodes with 7 switches, but all traffic between the two halves crosses the one link that the dashed cut severs beside the root: bisection \(b\). Right: a fat tree doubles the links at every level towards the root (1, 2, 4), so the same cut severs \(P/2 = 4\) links.

Why, then, do real chips use rings and meshes rather than hypercubes? A chip is flat. A ring or a mesh lies on it with short wires of equal length, and its degree stays 2 or 4 however many cores you add, while a hypercube needs ever longer wires and more router ports. So Intel's client processors link their cores with a ring, and its Xeon Scalable server chips, like Tilera's, with a 2-D mesh.

What the extra processors are worth — and the two puzzles solved

Design question 10 asked how to evaluate a multiprocessor. Two examples from Hennessy & Patterson (§5.1, not in the notes; the numbers vary between editions) show what eats the speedup even with a perfect network: the serial part of the program, and the time to reach remote data.

The serial part: Amdahl with \(P\) processors

Amdahl's law (lesson 3) with the enhancement "run on \(P\) processors" has \(S = P\). Hennessy and Patterson ask: to reach a speedup of 80 with 100 processors, what fraction of the original computation may be sequential?

  1. Amdahl's law with \(S = P\): the fraction \(F\) runs \(P\) times faster, the rest, \(1 - F\), does not.

    \[ \text{Speedup}(P) = \frac{1}{(1-F) + \dfrac{F}{P}} \]
  2. Put in the target, 80, and \(P = 100\); then turn both sides upside down:

    \[ (1-F) + \frac{F}{100} = \frac{1}{80} = 0.0125 \]
  3. Collect the terms in \(F\), since \(1 - F + 0.01F = 1 - 0.99F\):

    \[ 1 - 0.99\,F = 0.0125 \]
  4. Solve, and read the sequential fraction as what is left:

    \[ F = \frac{0.9875}{0.99} = 0.99747 \] \[ 1 - F = 0.0025 = 0.25\% \]

A quarter of a percent: one part in four hundred of the original time may stay serial, and even then the 100 processors deliver only 80. Gustafson's law, which the notes name on p. 419, looks at it the other way round: let the problem grow with the machine, and the scaled speedup is \((1 - F) + F \cdot P\), with \(F\) measured on the parallel machine.

The remote access: 0.2% of the instructions, 160% more time

The second example is a 32-processor machine with distributed memory, a 4 GHz clock and a base CPI of 0.5 when every reference hits locally. A reference to remote memory takes 100 ns and stalls the processor, and 0.2% of the instructions make one. How much faster would the machine be without remote references? With \(T_{CLK} = 1/f_{CLK} = 0.25\) ns:

\[ \frac{t_{\text{remote}}}{T_{CLK}} = \frac{100\ \text{ns}}{0.25\ \text{ns}} = 400 \] \[ CPI = 0.5 + 0.002 \times 400 = 1.3 \]
\(t_{\text{remote}}\)
time of one remote access; divided by \(T_{CLK}\) it is the stall in clock cycles
\(0.5\)
base CPI, every reference local
\(0.002\)
remote references per instruction (0.2%)

Without them the CPI would be 0.5: the machine would run \(1.3 / 0.5 = 2.6\) times faster. Two remote references in a thousand instructions add 160% to the execution time — where the data lives matters as much as the wiring, the subject of the next lesson.

The two puzzles, solved

The 37th processor. Every miss crosses the bus, and the bus is a single link: its total bandwidth and its bisection are the same \(b\). At 2.8% per processor, 36 processors nearly fill it; in the widget the 37th adds half a processor's throughput and makes every bus access slower for all 37. A faster bus only moves the wall; a network moves the limit to its bisection, which can grow with \(P\).

The ring. Its 64 links give a total of \(64b\), but the cheapest balanced cut crosses only 2 of them: a bisection of \(2b\), twice the bus's — the notes' "only 2× bus". The other 62 links help neighbours, not halves.

When half of a machine talks to the other half, only the links across the narrowest cut count: bisection bandwidth is the honest number, and a bus is simply a network whose bisection is one link.

Exam-style questions

Explain the main concepts and benefits of each one of the following:

  1. Multiprocessor (tightly coupled, MIMD)
  2. Multicore and manycore processors
  3. Symmetric multiprocessors (SMP)
  4. Large-scale distributed shared-memory multiprocessors
  5. Shared-memory and message-passing communication
  6. Single-bus interconnection
  7. Interconnection networks
  8. Bisection bandwidth
Show model answer

1. A multiprocessor is a computer system with tightly coupled processors coordinated by a single operating system, typically offering a shared address space. Each processor runs its own instruction stream on its own data (MIMD), so the machine exploits thread-level parallelism. Benefits: high throughput on many threads or processes, performance that grows with the number of processors, tolerance of some faults through redundancy, one design from embedded systems to servers. Unlike a cluster, it has one OS and one address space.

2. A multicore puts several cores on the same chip; beyond about 32 cores it is called a manycore. A multicore chip is a small SMP on a chip: private L1/L2 caches, usually a shared last-level cache, uniform access to memory, snooping coherence. Benefit: it turns the transistor budget into throughput through TLP — the industry's answer to the ILP and frequency (power) walls — instead of a wider or faster single core.

3. In an SMP (centralized shared memory) all processors share one physical memory with the same access time for everyone (UMA), usually through a bus; cache coherence is kept by snooping. Benefits: simple, symmetric view for the programmer and the OS, cheap for a few processors. Limit: the shared bus and memory saturate, so SMPs typically stay at or below about 32 processors.

4. In a distributed shared-memory (DSM) multiprocessor the memory is physically distributed among the nodes (processor + caches + local memory module) connected by an interconnection network, but forms one shared address space. Access time is non-uniform (NUMA): local is fast, remote is slower. Benefits: it scales beyond about 32 processors because memory bandwidth grows with the nodes and there is no single memory bottleneck, and it is still programmed with loads and stores. Costs: data placement matters, coherence needs directories, the network is complex.

5. With shared memory, processors communicate implicitly by loads and stores to a common address space: natural to program, but it needs coherence hardware and explicit synchronization (locks, barriers). With message passing, each processor has a private address space and communicates explicitly with send and receive: simpler hardware, explicit control of data movement, harder programming. Both models are Turing complete and each can implement the other, so the choice affects performance, programmability and cost, not what can be computed.

6. All processors, the memory and the I/O share one bus; every memory access (cache miss) is a bus transaction, one at a time. Benefits: cheap, simple, and a broadcast medium — every cache sees every transaction, which snooping coherence needs. Drawback: saturation. If each processor alone uses a fraction d of the bus, throughput grows linearly and then flattens near 1/d processors (commercial systems maxed out at about 36); beyond that, adding a processor only lengthens the queue and slows every access.

7. An interconnection network connects the nodes with many point-to-point links and switches (ring, 2-D mesh, torus, hypercube, crossbar, fat tree), so many transfers proceed in parallel and the bandwidth grows with the system. Benefits: it removes the shared bus from the critical path and scales to hundreds or thousands of processors. Costs: switches and links are expensive, and multiple hops add latency. Networks are compared by total and bisection bandwidth, diameter and node degree.

8. Bisection bandwidth is the minimum, over all cuts that split the network into two halves with equal numbers of nodes, of the total bandwidth of the links crossing the cut. It is the worst case, when half of the nodes communicate with the other half, and it bounds global traffic, while the total bandwidth (M × b, the sum of all links) is the best case for local traffic. Examples: bus b, ring 2b whatever P, 2-D mesh √P·b, hypercube (P/2)·b.

The 2026 paper asks its 8-point question in this form, "Explain the main concepts and benefits of each one of the following …", with five lines for each sub-point; multiprocessors and multicores are an item of the course's topic list. What earns the points: the defining words (tightly coupled, single OS, shared address space, MIMD; UMA and NUMA; implicit versus explicit communication; one transaction at a time; best case versus worst case) and a cost next to every benefit. Sub-point 6 is stronger with the 1/d argument than with the bare number 36.

Consider a multiprocessor with P = 16 nodes whose interconnection links each have a bandwidth b = 1 GB/s. Complete the following table, then explain which topology you would choose if the 16 processors communicate all-to-all, and why.

TopologyLinksTotal BWBisection BWDiameterPorts per node
Single bus
Ring
2-D mesh (4 × 4)
Hypercube (N = 4)
Fully connected
Show model answer
TopologyNumber of linksTotal bandwidthBisection bandwidthDiameterPorts per node
Single bus1b = 1 GB/sb = 1 GB/s1 (shared)1
RingP = 16P·b = 16 GB/s2b = 2 GB/sP/2 = 82
2-D mesh (4 × 4)2N(N − 1) = 2424 GB/sN·b = 4 GB/s2(N − 1) = 62 to 4
Hypercube (N = 4)NP/2 = 3232 GB/s(P/2)·b = 8 GB/sN = 44
Fully connectedP(P − 1)/2 = 120120 GB/s(P/2)²·b = 64 GB/s115

All-to-all traffic crosses the machine, so it is bounded by the bisection bandwidth, not by the total. The fully connected network has the largest bisection (64 GB/s) and diameter 1, but needs 120 links and 15 ports per node. The hypercube gives 8 GB/s of bisection, so every node can send across the cut at its full link speed (8 GB/s for 8 senders), with only 32 links, 4 ports per node and a diameter of 4: the usual engineering choice at this size. The mesh is cheaper but has half the bisection and diameter 6; the ring and the bus would be throttled to 2 and 1 GB/s.

An exercise in the style of the papers' tables. The two traps: the hypercube bisection (8, not the 6 of the notes' eq. 98) and confusing the total with the bisection when the question is about global traffic. Write the formula before the number in each cell — a correct formula with a slip in the arithmetic is still worth most of the cell.

A 32-processor distributed shared-memory multiprocessor runs at a clock frequency of 4 GHz. Its base CPI, when every memory reference is satisfied locally, is 0.5. A reference to remote memory takes 100 ns and stalls the processor. If 0.2% of the instructions make a remote reference, what is the CPI of the machine?

Show model answer
\[ T_{CLK} = \frac{1}{4\ \text{GHz}} = 0.25\ \text{ns} \] \[ \text{remote cost} = \frac{100}{0.25} = 400 \text{ cycles} \] \[ CPI = 0.5 + 0.002 \times 400 = 1.3 \]

Without remote references the machine would be 1.3 / 0.5 = 2.6 times faster.

The example comes from Hennessy & Patterson. The marks are in converting the 100 ns into clock cycles (400, not 100 or 0.4) and in weighting the stall by the fraction of instructions that pay it: 0.2% is 0.002, not 0.2.

You want a speedup of 80 on a multiprocessor with 100 processors. According to Amdahl's law, what is the largest fraction of the original execution time that may remain sequential? Give the answer in percent.

Show model answer
\[ 80 = \frac{1}{(1-F) + F/100} \] \[ 1 - 0.99\,F = 0.0125 \] \[ F = 0.99747, \quad 1 - F \approx 0.25\% \]

The formula sheet's Amdahl's law with S = P. The answer asked for is the sequential fraction 1 − F, not F: answering 99.75% is the classic lost point. The form F = (1 − 1/Speedup)/(1 − 1/S) from lesson 3 gives the same number in one line: 0.9875 / 0.99.

Which of the following statements about the bisection bandwidth of an interconnection network are true? (Multiple answers)

  • It is the sum of the bandwidths of all the links of the network. That is the total network bandwidth, M × b: the best case, not the worst.
  • It is the minimum bandwidth across any cut that divides the nodes into two equal halves. This is the definition: the narrowest balanced cut decides.
  • For a ring it is 2b regardless of the number of nodes. The cheapest balanced cut, into two arcs, crosses the loop exactly twice, whatever P.
  • For a single bus it equals the total network bandwidth. The bus is one link: total and bisection are both b.
  • For a √P × √P mesh it grows linearly with P. It grows as √P: the cut is one column of N = √P links.
Show model answer

Answers 2, 3 and 4. Answer 1 describes the total bandwidth; the mesh bisection is N·b = √P·b, which grows as the square root of P.

The family of statements mixes the two metrics on purpose. Check each against the ring and the bus, the two cases you can draw in a second.

A hypercube interconnects P = 64 nodes with links of bandwidth b = 1 GB/s. What is its bisection bandwidth? (Single answer)

  • 10 GB/s That is 2(N − 1)·b with N = 6, the slip of the notes' eq. (98). The cut severs one link per pair of twins.
  • 12 GB/s That is 2N·b, a formula with no derivation behind it. Count instead: the cut along the top address bit severs one link per pair of twins, 32 links.
  • 32 GB/s (P/2)·b = 2^(N−1)·b: cutting along the top address bit severs the 32 links that join the two 5-cubes.
  • 64 GB/s That would be one link per node crossing; each crossing link joins two nodes, so it is P/2, not P.
  • 192 GB/s That is the total bandwidth, N·P/2·b = 6 · 32.
Show model answer

Answer 3: N = log₂64 = 6, bisection = 2^(N−1)·b = (P/2)·b = 32 GB/s; the total is N·P/2·b = 192 GB/s.

The distractors are the notes' wrong formula (10), the total (192) and a double count (64). The quickest route is the doubling picture: a 6-cube is two 5-cubes joined by 32 links.

In a single-bus multiprocessor, each processor running alone keeps the bus busy 4% of the time. True or false: however many processors are attached, the machine cannot deliver more than the throughput of 25 such processors running alone.

  • True The bus can be busy at most 100% of the time, so it carries the traffic of at most 1 / 0.04 = 25 processors; past that, extra processors only queue.
  • False Adding processors adds demand, not bus capacity: the throughput flattens at 1/d = 25 processors' worth.
Show model answer

True. Throughput ≤ bus capacity / demand per processor = 1 / 0.04 = 25 processors' worth; near that point the bus is saturated and every further processor only lengthens the queue for the bus.

The ceiling is capacity divided by demand, the same argument that gives the notes' ≈ 36. Halve the traffic per processor (bigger caches) and the ceiling doubles.

Check yourself

A 16-node 2-D mesh (4 × 4) is replaced by a 64-node one (8 × 8) with the same links. What happens to the bisection bandwidth?

  • It doubles \(N\,b\) goes from \(4b\) to \(8b\): the cut is one column of links, \(\sqrt{P}\) long.
  • It quadruples, like the number of nodes That is roughly what the total does (24 to 112 links); the bisection grows only as \(\sqrt{P}\).
  • It stays the same That is the ring's behaviour; a mesh's cut grows with its side.
  • It halves Bandwidth never drops when links are added; what halves is each sender's share in the half-to-half test.

Which of these machines are multiprocessors in the sense of the notes?

  • An 8-core laptop chip running one operating system over one memory Tightly coupled cores, one OS, one shared address space: a multicore, an SMP on a chip.
  • A two-socket server running one Linux image, with one address space over the memories of both chips Still one OS and one shared address space — a NUMA multiprocessor (lesson 34).
  • A rack of 16 PCs, each with its own operating system, exchanging MPI messages Sixteen OS instances and sixteen private address spaces: a cluster, loosely coupled.
  • A 4-issue superscalar core running a single thread One instruction stream: instruction-level parallelism inside one processor, not MIMD.

The test is the definition: tightly coupled processors, a single OS, typically one shared address space.

Why does the bisection bandwidth of a ring stay \(2b\) however many nodes it has?

  • Split into two arcs, the loop is cut in exactly two places, and no balanced split cuts fewer A closed loop is crossed an even number of times, so at least twice, and two arcs reach that minimum for any P. Other splits, odd nodes against even ones for instance, cross more links: that is why the definition takes the minimum.
  • Each node can send on only one link at a time The formula counts links, not how nodes use them; ring nodes may use both links at once.
  • Longer rings run their links more slowly \(b\) is the same for every link; the bisection counts links across the cut.
  • A ring's bisection always equals its degree A coincidence: the 2-D torus has degree 4 and a bisection of \(2\sqrt{P}\) links.

Each processor of a bus-based SMP keeps the bus busy 5% of the time when it runs alone. Larger L2 caches halve its misses. What happens to the number of processors the bus can feed?

  • It doubles, from 20 to 40 The ceiling is \(1/d\): \(1/0.05 = 20\) becomes \(1/0.025 = 40\).
  • It stays 20, because the bus did not change The capacity did not change, but the demand did; the ceiling is their ratio.
  • It halves, to 10 Fewer misses mean less traffic per processor, so more processors fit, not fewer.
  • It becomes unlimited Every processor still uses some bus time, so the ceiling only moves.

For \(P = 64\) nodes, which network has the larger bisection bandwidth: a crossbar switch or a 6-dimensional hypercube?

  • The crossbar, \((P/2)^2\,b\), because it has \(P^2\) crosspoints \((P/2)^2\) is the fully connected network. A crossbar node has one link, so the cut severs \(P/2\) links.
  • The hypercube, because it has 192 links against the crossbar's 64 The total is larger, but only 32 of its links cross the cut.
  • Neither: both have \((P/2)\,b = 32\) GB/s Crossbar: one link per node of the far half. Hypercube: the 32 links that join the two 5-cubes.
  • The crossbar, because it is non-blocking and the hypercube is not Non-blocking concerns routing permutations without conflicts; the bisection counts links across the cut, and here the counts are equal.

Which statement about shared memory and message passing is right?

  • Each can implement the other, so they compute the same things; they differ in programming effort, hardware cost and latency Both are Turing complete: the choice limits how you compute, never what.
  • Message passing cannot express algorithms whose sharing pattern is irregular It can, at the price of more programming effort: every exchange must be written out.
  • Shared memory needs no synchronization, because the data is simply there The opposite: implicit communication makes races possible, so locks, barriers and atomic operations are needed.
  • Shared memory requires one physical memory "Shared" means one address space; it can be built over distributed memory (DSM, lesson 34).

In the remote-access example (4 GHz, base CPI 0.5, 0.2% remote references), a better network cuts the remote access time from 100 ns to 50 ns. What is the CPI now?

  • 0.9 50 ns is 200 cycles: \(0.5 + 0.002 \times 200 = 0.9\).
  • 0.65 Halving the whole CPI of 1.3 would halve the base part too, and only the remote stall got shorter.
  • 1.3 The stall per remote reference halved, so the CPI must drop.
  • 0.7 \(0.002 \times 100 = 0.2\) counts the time in nanoseconds; convert it to cycles first: 200 cycles.

Key take-aways

What to watch and read