1 / 7

CS533 Concepts of Operating Systems Class 8

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?

jag
Télécharger la présentation

CS533 Concepts of Operating Systems Class 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS533 Concepts of Operating SystemsClass 8 Synchronization on Multiprocessors CS533 - Concepts of Operating Systems

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

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

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

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

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

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

More Related