Course contentsShow
← Computer Science
Lesson 1262 of 2,87229. CPU SchedulingFree lesson

Multiprocessor Architecture Fundamentals

Understanding shared memory vs distributed memory systems and how multiple CPUs interact with cache hierarchies.

Multiprocessor Architecture Fundamentals

You'll learn: How multiple CPUs are organized and how they share or distribute memory in modern computer systems.

When you move from a single processor to multiple processors working together, the architecture changes dramatically. The biggest question is: How do these CPUs access data? There are two fundamental approaches.

Shared Memory Systems

In a shared memory architecture, all CPUs connect to the same physical memory space. Imagine a conference room where everyone shares one whiteboard—any processor can read or write any memory location. This simplifies programming because all CPUs see the same data.

The cache challenge: Each CPU typically has its own cache for speed. But if CPU 1 updates a value in its cache, CPU 2's cache might still have the old value! This is called the cache coherence problem. Special hardware protocols (like MESI) keep caches synchronized, but this adds complexity and overhead.

Distributed Memory Systems

In a distributed memory architecture, each CPU has its own private memory. Think of separate offices—each processor owns its data locally. CPUs communicate by explicitly sending messages over a network or interconnect.

Trade-off: No cache coherence headaches, but programmers must explicitly coordinate data sharing. This scales better to many processors but requires different programming techniques.

Cache Hierarchy Interactions

In multiprocessor systems, the cache hierarchy often looks like: private L1 and L2 caches per CPU, then either a shared L3 cache (shared memory) or no shared cache at all (distributed memory). Accessing another CPU's cached data can be 10-100× slower than accessing your own cache.

Key Takeaway: Multiprocessor systems use either shared memory (all CPUs access common memory with cache coherence complexity) or distributed memory (each CPU has private memory with explicit communication), and understanding cache interactions is critical for scheduling decisions.