[an error occurred while processing this directive]
School of Computer Science & Engineering
University of New South Wales
Advanced Operating Systems
COMP9242 2002/S2
Next: Effects of Memory Architecture
Up: 10-smp
Previous: Dangers of Locking: Priority
Subsections
- Small lock granularity
- decreases lock contention,
- increases potential parallelism.
- Also increased scope for stuffing up.
- Even with careful design hard to avoid bottlenecks (``convoys'').
- Important to measure lock contention.
- Instrument lock ops to keep stats.
Windows-NT Kernel dispatcher
lock[PS96].
- DEC people investigated performance problems of Microsoft's SQL
server running on Alphas under NT.
- No access to source code.
- Used tool to patch executable code (OS and apps).
- Instrumented code logged change of control flow to memory buffer.
- Reconstructed instruction trace from log.
- Visualised results.
- Second box shows convoy effect on KiDispatcherLock.
- Lock held for 200-900 cycles.
- Partially due to interrupts being enabled during critical section.
- Disk interrupt serviced while holding lock.
- Lock held for about 45% of total time.
- 16% of time spent spinning.
- This one lock limits OS scalability to about 6 CPUs!
- Shows the necessity of keeping critical sections short.
Next: Effects of Memory Architecture
Up: 10-smp
Previous: Dangers of Locking: Priority
Gernot Heiser
2002-10-11
[an error occurred while processing this directive]