What To Do While Waiting?
Blocking
OS or RT system deschedule waiting threads
Allows processor to do other things but high overhead
Spinning
Waiting threads keep testing location until it changes value
Lower overhead but keeps processor busy and can cause bus traffic
Spinning better when
Scheduling overhead is larger than expected wait time
Processor not needed for other tasks
Hybrid methods: Spin a while, then block
Previous slide
Next slide
Back to first slide
View graphic version