Live data from Hacker News

Linus Torvalds on semaphores (1999)

yarchive.net

51–60 of 112 posts

Re: Linus Torvalds on semaphores (1999)

#51

Earlier quoted context omitted.

Technically, you're right. Today, any junior employee that made a joke like that would be crucified and practically blacklisted from the industry. What you should be thinking, however, is not "why does Linus get away with saying things like that?" but rather "why do I consider it normal for someone's livelihood to be permanently destroyed over a stupid joke?"

What do you think an appropriate response is?

How about public shaming instead of the destruction of a career?

Re: Linus Torvalds on semaphores (1999)

#52

Earlier quoted context omitted.

Technically, you're right. Today, any junior employee that made a joke like that would be crucified and practically blacklisted from the industry. What you should be thinking, however, is not "why does Linus get away with saying things like that?" but rather "why do I consider it normal for someone's livelihood to be permanently destroyed over a stupid joke?"

What do you think an appropriate response is?

I think if people would stop pretending to be offended by ridiculous things, the problem would solve itself and we wouldn't need to have a "response" in the first place.

Re: Linus Torvalds on semaphores (1999)

#53

"Dijkstra was probably a bit heavy on drugs or something (I think the official explanation is that P and V are the first letters in some Dutch words, but I personally find the drug overdose story much more believable)." Quotes like this are why I always read what Linus has to say, regardless of whether the subject is relevant to my life in the slightest. Edit: Yes people, those Dutch words exist! I get it! I'm sure L…

> However, the point Linus was making (in a humorous way) was that like most computer scientists / mathematicians, Dijkstra was overly fond of obscure, single-letter names, which nobody ever intuitively understands. If he was making this point, I find it ironic, considering that the purpose of the post is to explain the distinction between two obscure, poorly-named technical words, which nobody ever intuitively under…

Hi, I'm nobody. You use spinlock to spin in place until you can get the lock. You wait at semaphores. Seems very intuitive to me.

Re: Linus Torvalds on semaphores (1999)

#54

Earlier quoted context omitted.

Technically, you're right. Today, any junior employee that made a joke like that would be crucified and practically blacklisted from the industry. What you should be thinking, however, is not "why does Linus get away with saying things like that?" but rather "why do I consider it normal for someone's livelihood to be permanently destroyed over a stupid joke?"

What do you think an appropriate response is?

[deleted]

Re: Linus Torvalds on semaphores (1999)

#55

"Dijkstra was probably a bit heavy on drugs or something (I think the official explanation is that P and V are the first letters in some Dutch words, but I personally find the drug overdose story much more believable)." Quotes like this are why I always read what Linus has to say, regardless of whether the subject is relevant to my life in the slightest. Edit: Yes people, those Dutch words exist! I get it! I'm sure L…

> "Dijkstra was probably a bit heavy on drugs or something (I think the official explanation is that P and V are the first letters in some Dutch words, but I personally find the drug overdose story much more believable)." I personally have made remarks that were WAY more potentially offensive than that, verbally, with friends. But, accusing Dijkstra of being a drug user, on the Linux kernel mailing list, from a @tran…

Dijkstra was Dutch and lived in the Netherlands, where drug policies are either nonexistent or loosely enforced. So perhaps it's less offensive than it seems on the surface.

Re: Linus Torvalds on semaphores (1999)

#56
post #36

Ah, semaphores. I recall in my operating systems course we had to implement some simple concurrency patterns using semaphores as an exercise -- for instance synchronize a group of processes so that idle processes gather into groups of N, and when a group is ready, N-1 threads of the group does TaskX(), and 1 thread does TaskY(), and when they're done, they go back to the pool. Then we implemented the same using usual…

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

Re: Linus Torvalds on semaphores (1999)

#57
Semaphores are basically unused in the kernel these days, abandoned in favor of mutexes. I really recommend reading kernel/locking/mutex.c. You can learn a lot about the details of low-level synchronization, and it's also just a really impressive piece of ruthlessly-optimised code. Tricks like reading the lock's 'owner' field without any sort of synchronization, to decide whether to spin on the lock or to sleep.

Re: Linus Torvalds on semaphores (1999)

#58
post #28
post #17

Earlier quoted context omitted.

From what I've heard, the P comes from "Probeer" (to "try"), and the V from "verhoog" (increase). This makes more sense to me.

That's Dijkstra's later terminology. In EWD35 he introduced the operations as "passering" and "vrijgave". Then in EWD51 he uses "verhogen" and the neologism "prolagen" ("probeer te verlagen"). In EWD74 he switches to "proberen". These documents are available from the Dijkstra archive: http://www.cs.utexas.edu/users/EWD/welcome.html

[deleted]

Re: Linus Torvalds on semaphores (1999)

#59

Earlier quoted context omitted.

Technically, you're right. Today, any junior employee that made a joke like that would be crucified and practically blacklisted from the industry. What you should be thinking, however, is not "why does Linus get away with saying things like that?" but rather "why do I consider it normal for someone's livelihood to be permanently destroyed over a stupid joke?"

What do you think an appropriate response is?

Nothing because it's quite obviously a joke.

Re: Linus Torvalds on semaphores (1999)

#60

Semaphores are basically unused in the kernel these days, abandoned in favor of mutexes. I really recommend reading kernel/locking/mutex.c. You can learn a lot about the details of low-level synchronization, and it's also just a really impressive piece of ruthlessly-optimised code. Tricks like reading the lock's 'owner' field without any sort of synchronization, to decide whether to spin on the lock or to sleep.

For the sake of completeness: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....
Post reply on HN