News for hackers. Stuff that matters.
Re:Linus Torvalds on semaphores (1999) by exDM69 on Wednesday December 17, 2014 @08:23AM (#8762181)
> Linus says that almost all practical uses of semaphores is when they are just used as mutexes, and rightly so -- implementing concurrency patterns based only on semaphores is a total pain.

Semaphores are not very good in practical programming but they're still valuable as a mental model and reasoning about algorithms.

It is a lot easier to prove by induction that an algorithm implemented with semaphores works than it is to deal with mutexes and conditions in a formal proof.

So semaphores are very useful in theoretical work, mutexes and conditions are more useful in practice.

There are no comments on this comment yet.