[CSE]  Advanced Operating Systems 
 COMP9242 2002/S2 
UNSW

PRINTER Printer-Friendly Version
Administration               
- Notices
- Course Intro
- Consultations
# On-line Survey (closed)
- Survey Results
 
Work
- Lectures
- Milestone 0
- Project Admin
- Project Spec
- Project FAQ
- Exam
 
Documentation
- ASysT Lab
- L4 source browser
- Sulima ISA Simulator
R4x00 ISA Summary 
MIPS R4700 ReferenceMIPS R4000 User Manual 
- Network Driver
- GT64111
 
Related Info
- Aurema OS Prize
- OS Hall of Fame
 
History
- 2000
- 1999
- 1998
 
Staff
- Gernot Heiser (LiC)

 
Valid HTML 4.0!
next up previous
Next: Effects of Memory Architecture Up: 10-smp Previous: Dangers of Locking: Priority

Subsections

Locking: Performance Considerations


  • 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.

Illustrative example

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.

Result for 4-CPU system

lock-PS96-f16

Summary of 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 up previous
Next: Effects of Memory Architecture Up: 10-smp Previous: Dangers of Locking: Priority
Gernot Heiser 2002-10-11