1 / 7

Class Discussion

Class Discussion. Questions. Why does concurrency make it much more difficult to reason about the correctness of programs (compared to sequential execution)? Why not just have sequential programming? Is concurrency becoming more or less relevant?. Questions.

noellej
Download Presentation

Class Discussion

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. Class Discussion CS510 – Concurrent Systems

  2. Questions Why does concurrency make it much more difficult to reason about the correctness of programs (compared to sequential execution)? Why not just have sequential programming? Is concurrency becoming more or less relevant?

  3. Questions • Why spin-wait instead of blocking? • What is the downside of spin-waiting? • Can you hold on to the CPU while waiting without causing contention for other resources? • If so, how do you know when to proceed? CS510 – Concurrent Systems

  4. Questions • Is efficiency harder than correctness for spin locks? • Which aspects of efficiency are important here? • Is it important to optimize for the high-contention case? • Why might you want to prioritize the “clear” requests over the “test and set” requests? CS510 – Concurrent Systems

  5. Questions • What is the key idea behind “test and test and set”? • Why doesn’t it solve the problem in practice? • Why isn’t it very helpful to have a solution that works well only for long critical sections? CS510 – Concurrent 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? CS510 – Concurrent Systems

  7. Questions • If we use a shared counter … • How can we update it? • If we use a queue mechanism … • how can we implement the enqueue and dequeue operations? • If we use a ticketing mechanism … • Does the hardware provide an atomic read and increment? • If not, how can we implement it? • How do we implement the signaling (ticket update) on different processor architectures? CS510 – Concurrent Systems

More Related