Symmetric vs Asymmetric Multiprocessing (SMP vs AMP)
SMP vs AMP explained — shared kernel access vs a master-slave processor model — with a clear interview-ready comparison.
Expected Interview Answer
Symmetric multiprocessing (SMP) has every CPU core run the same copy of the OS kernel and share equal access to memory and I/O, while asymmetric multiprocessing (AMP) designates one master processor to run the OS and manage scheduling while other processors act as dedicated workers that only execute assigned tasks.
In SMP, every processor can execute kernel code, service interrupts, and run any ready process, so the OS must protect shared kernel data structures with locks to avoid races between cores executing the kernel simultaneously; this is the model used by virtually all modern desktop, server, and mobile CPUs. In AMP, only the master processor makes scheduling decisions and touches OS data structures, while slave processors simply execute whatever work the master hands them, which sidesteps kernel-locking complexity entirely but makes the master processor a bottleneck and a single point of failure. SMP scales better with core count because any core can pick up any ready task, while AMP is simpler to implement and is still common in embedded and real-time systems where a dedicated processor handles a specific function like signal processing. The tradeoff is symmetry and flexibility with locking overhead (SMP) versus simplicity with centralized-bottleneck risk (AMP).
- Explains why modern general-purpose OSes overwhelmingly choose SMP
- Clarifies why AMP still appears in embedded and real-time designs
- Highlights kernel-locking overhead as the real cost of symmetry
- Connects directly to load balancing and NUMA follow-up questions
AI Mentor Explanation
Symmetric multiprocessing is like a team where any player can captain the side on a given day, bowl, field, or bat, with shared responsibility for tactical calls — coordination overhead exists because decisions need agreement, but any player can step into any role. Asymmetric multiprocessing is like a team with one fixed captain who makes every tactical decision while the rest strictly execute instructions and never decide strategy themselves. The SMP team is more flexible but needs more communication; the AMP team is simpler to run but the captain becomes the bottleneck if injured or overloaded.
Step-by-Step Explanation
Step 1
SMP: identical kernel copies
Every core runs the same OS kernel image and can service interrupts, run any process, or execute kernel code.
Step 2
SMP: locking shared state
Because multiple cores can touch kernel data structures concurrently, the kernel must serialize access with locks or per-core structures.
Step 3
AMP: master-slave split
One master processor runs the OS and makes all scheduling decisions; slave processors only execute the work assigned to them.
Step 4
AMP: bottleneck and simplicity tradeoff
The master avoids kernel-locking complexity but becomes a single point of scheduling failure and a throughput ceiling.
What Interviewer Expects
- A precise definition distinguishing “same kernel on every core” (SMP) from “one master, dedicated slaves” (AMP)
- Awareness that SMP needs kernel locking, AMP does not
- Knowledge that virtually all modern general-purpose OSes are SMP
- A real or plausible example of where AMP is still used (embedded/real-time)
Common Mistakes
- Confusing AMP with simply having heterogeneous CPU cores (big.LITTLE is not the same distinction)
- Claiming SMP means cores never need locks
- Saying AMP is obsolete rather than still used in embedded/real-time contexts
- Not mentioning the master-processor bottleneck as the core AMP tradeoff
Best Answer (HR Friendly)
“Symmetric multiprocessing means every CPU core is treated equally — any core can run the operating system and any task, which is how basically every modern computer works. Asymmetric multiprocessing instead has one core act as the boss making all the decisions while the other cores just do the work they are told, which is simpler to build but means that one boss core can become a bottleneck.”
Code Example
typedef struct { volatile int locked; } spinlock_t;
void spin_lock(spinlock_t *lock) {
while (__sync_lock_test_and_set(&lock->locked, 1)) {
/* busy-wait: another core currently holds the kernel structure */
}
}
void spin_unlock(spinlock_t *lock) {
__sync_lock_release(&lock->locked);
}
/* Any core may call this — SMP requires protecting the shared ready queue */
spinlock_t ready_queue_lock;
void enqueue_task(struct task *t, struct queue *ready_queue) {
spin_lock(&ready_queue_lock);
queue_push(ready_queue, t);
spin_unlock(&ready_queue_lock);
}Follow-up Questions
- Why does SMP require kernel-level locking that AMP avoids?
- What happens to system throughput if the master processor in an AMP system fails?
- Is big.LITTLE heterogeneous computing the same thing as AMP? Why or why not?
- How does SMP relate to load balancing across cores?
MCQ Practice
1. In symmetric multiprocessing (SMP), which statement is true?
SMP treats all processors equally — each can run the kernel, service interrupts, and execute any ready task.
2. What is the main risk of the asymmetric multiprocessing (AMP) model?
Since only the master processor makes scheduling decisions, it can become a throughput ceiling and a single point of failure.
3. Why does SMP require synchronization primitives like spinlocks in the kernel?
Since any core can execute kernel code in SMP, shared structures like the ready queue need locking to prevent races.
Flash Cards
What is symmetric multiprocessing (SMP)? — Every CPU core runs the same kernel and can execute any ready task; used by virtually all modern OSes.
What is asymmetric multiprocessing (AMP)? — One master processor runs the OS and schedules work; other processors only execute assigned tasks.
Main cost of SMP? — Kernel locking overhead to protect shared data structures accessed by multiple cores.
Main risk of AMP? — The master processor becomes a bottleneck and single point of failure.