CS FundamentalsHardIBM · Deloitte pattern
A system with 3 CPU cores uses symmetric multiprocessing (SMP), where every core runs the same copy of the OS kernel and can access any ready process. What synchronization problem does this directly introduce that a single-core scheduler does not have?
- A. None; SMP needs no extra synchronization since each core has its own cache
- B. Multiple cores can try to pick from or modify the shared ready queue (and other kernel data structures) at the same time, requiring locks or lock-free structures to avoid races
- C. SMP eliminates the need for context switches entirely
- D. SMP requires every process to be single-threaded
Correct answer: B. Multiple cores can try to pick from or modify the shared ready queue (and other kernel data structures) at the same time, requiring locks or lock-free structures to avoid races
Because every core can run kernel code against the same shared structures (ready queue, process table), SMP kernels must protect these with locks (spinlocks, since a core may busy-wait briefly for another core rather than a process on the same core), which a strictly single-core kernel simply does not need for the same structures.
More Operating Systems questions
- A real-time system has two periodic tasks: Task A with period 20 ms and execution time 5 ms, Task B with period 50 ms and execution time…
- Compare Rate Monotonic Scheduling (RMS, static priority by period) and Earliest Deadline First (EDF, dynamic priority by nearest deadline)…
- A system call interface lets a user program request a kernel service (like opening a file). What is the typical hardware-assisted…
- Copy-on-write (COW) is used after fork() to avoid copying the entire parent's address space immediately. How does it work?
- A process has a single-level page table with a 'valid/invalid' bit per entry. A memory reference to a page marked invalid causes a page…
- Memory-mapped files (via mmap) let a process treat a file's contents as part of its address space. Compared to read()/write() calls, what…