Skip to main content

Chapter 8 · Watch, then practise

Multiprocessors

Reason about parallel speedup and the coordination required when processors share data.

3 questions · 3 with related videos. Matches are based on playlist titles; broader background matches are labeled.

What to study

  • Thread-level parallelism
  • Shared memory
  • Cache coherence
  • Amdahl’s law

Chapter playlists

Choose a playlist

Amdahl's Law in COA: Basics, Proof, and CPU Performance Explained

Engineering Funda · 9:28

Choose a video · 2 lectures

Pairs Amdahl’s speedup limit with the chapter’s multiprocessor-system introduction.

1. Work on multiple cores

Why does adding a second core not automatically halve a program’s execution time?

The program must expose independent work that can run on separate cores. Serial work, synchronization and contention remain. Shared memory enables communication, but access to shared state needs coordination. For example, two cores could process separate image regions before combining their results.

Cache Coherence Problem & Cache Coherency Protocols

Neso Academy · 11:58

Supplementary cache-coherence lesson for copies of shared data in separate caches.

2. Shared cached data

Two cores cache the same location. What problem arises when one writes it?

The other core may retain an obsolete copy. A coherence protocol coordinates copies, for example invalidating other cached copies before a write becomes visible. Coherence does not by itself make a multi-instruction operation such as incrementing a shared counter atomic.

Amdahl's Law in COA: Basics, Proof, and CPU Performance Explained

Engineering Funda · 9:28

Explains Amdahl’s law; apply it to the question’s 75% parallel fraction and four cores below.

3. Amdahl’s law

If 75% of execution is perfectly parallelizable, what speedup can four cores provide?

Ignoring overhead, speedup = 1 / [(1 − 0.75) + 0.75/4] = 16/7 ≈ 2.29. Even infinitely many cores cannot exceed 1/0.25 = 4 for this fixed workload. The serial quarter imposes that ceiling.

References