Practice question · Multiple choice
A CPU running at 3 GHz executes an instruction in well under a nanosecond and waits around 100 nanoseconds for main memory. What does that ratio mean in practice?
Hints
- Convert the wait into instructions: how many could have run in 100 ns?
- Ask which of two algorithms wins, fewer operations scattered in memory, or more operations run sequentially.
Show the answer
B. That memory access patterns matter more than operation counts
Why
A hundred nanoseconds is roughly 300 instructions the processor could have executed instead, so a miss dwarfs the arithmetic. That is why an array often beats a linked list with the same big-O, and why memory layout is a first-order performance concern rather than a detail.
Practise Processor, Memory, and Buses
The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Processor, Memory, and Buses
- Registers hold only a handful of values while main memory holds billions. Why does the CPU keep so tiny a…
- Storing instructions and data in one memory is what makes a stored-program computer able to treat a program…
- Order the steps by which the CPU reads one byte out of main memory.
- Select every statement that is true of registers but NOT true of main memory.