80 likes | 218 Views
CS533 Concepts of Operating Systems Class 8. Synchronization on Multiprocessors. Questions. What is the problem with trying to acquire a lock in interrupt handling code? How can we prevent race conditions on variables that are used by interrupt handlers?
E N D
CS533 Concepts of Operating SystemsClass 8 Synchronization on Multiprocessors CS533 - Concepts of Operating Systems
Questions • What is the problem with trying to acquire a lock in interrupt handling code? • How can we prevent race conditions on variables that are used by interrupt handlers? • Is this the same as cooperative multitasking? • What if a variable is accessed in normal kernel context and in an interrupt handler? • How should we manage data accessed during deferred interrupt processing (soft-irqs)? CS533 - Concepts of Operating Systems
Questions • Why spin-wait instead of blocking? • What is the downside of spin-waiting? • Why is it bad to perform an operation that might block in a critical section protected by a spin lock? CS533 - Concepts of Operating Systems
Questions • How does a reader writer lock improve performance compared to a normal lock? • Is it necessarily a win? • How does the Linux Big Reader Lock improve read performance compared to a normal reader-writer lock? CS533 - Concepts of Operating Systems
Questions • Why is it difficult to implement a spin lock that exhibits good performance? • Why does a simple spin on test and set approach perform poorly? • Why doesn’t a spin on read approach help much? • Why isn’t it very helpful to have a solution that works well only for long critical sections? • Why might you want to distinguish and prioritize the “clear” requests over the “test and set” requests? CS533 - Concepts of Operating Systems
Questions • How can a waiting process notice that a lock has been released? • If it polls how can we avoid having all waiting processes … • poll at the same time? • poll at the same place? CS533 - Concepts of Operating Systems
Questions • In what ways does transactional memory support more concurrency than locking? • Why is high contention a problem for transactional memory? • Why is I/O a problem for transactional memory? • What is the solution to these problems? CS533 - Concepts of Operating Systems