2

From wikipedia, http://en.wikipedia.org/wiki/Spurious_wakeup : "making condition wakeup completely predictable might substantially slow all condition variable operations"

Why is this, why would making the condition wakeup predictable slow condition variable operations ?

k_l
  • 189
  • 1
  • 3
  • possible duplicate of [Do spurious wakeups actually happen?](http://stackoverflow.com/questions/1050592/do-spurious-wakeups-actually-happen) – Dave May 16 '15 at 16:16
  • 1
    I don't think it's a duplicate of "Do spurious wakes actually happen", The question here is different. – k_l May 16 '15 at 17:20
  • The question I suggested asks both if they actually happen and what can cause them. The second part is why I marked this as a duplicate. Also the accepted answer gives a good explanation (IMO), and if you're not happy with that there's even a link in the comments to another related question! – Dave May 16 '15 at 17:22
  • There's nothing wrong with duplicate questions on this site (as long as they're not so obvious that the poster should have found them easily). This was an interesting question, and I've learned something from the answer, but it still seems to be a duplicate to my eyes. If you think the duplicate doesn't answer your question it's best if you clarify to explain why it is different - what more you want to know. – Dave May 16 '15 at 17:27
  • Are you referring to the part " This makes it necessary to establish a "contract" that waiting thread can be notified without a reason. To be precise, there would be a reason - scheduler blackout - but since thread is designed (for a good reason) to be oblivious to scheduler internal implementation details, this reason is likely better to present as "spurious". " It definitely makes sense as an argument, I was looking into more detail, there must had been other paradigms proposed when spurious wake was adopted, what happened to these, why they would lead specifically to a slowdown etc – k_l May 16 '15 at 17:37
  • 1
    Essentially, they are allowed becasue some OS kernel synchro primitives do not work correctly. – Martin James May 17 '15 at 09:03

0 Answers0