Live data from Hacker News

Linus Torvalds on semaphores (1999)

yarchive.net

41–50 of 112 posts

Re: Linus Torvalds on semaphores (1999)

#41

"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 @transmeta address?

That's grounds for termination in many companies, even if you don't get lawyers involved. I think he's only able to get away with it because he's Linus.

Re: Linus Torvalds on semaphores (1999)

#42

"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…

I'd argue 'false drama' is the real culprit. A bit like your comment is adding to this thread.

Re: Linus Torvalds on semaphores (1999)

#43
post #22

Earlier quoted context omitted.

That seems the correct one : https://cs.nyu.edu/~yap/classes/os/resources/origin_of_PV.ht...

You're referring to https://cs.nyu.edu/~yap/classes/os/resources/EWD74.pdf while 'passering' and 'vrijgave' are already mentioned in http://www.cs.utexas.edu/users/EWD/ewd00xx/EWD35.PDF

Ah thank you. Fun read.

Re: Linus Torvalds on semaphores (1999)

#44

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

Re: Linus Torvalds on semaphores (1999)

#45
post #27
post #10

Here's Dijkstra's original paper on P and V (in Dutch), from about 1963. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD00xx/EW... Here is a implementation of P and V, the original counted semaphore primitives, from 1972. http://www.fourmilab.ch/documents/univac/fang/ This is UNIVAC 1108 assembly code. Along with P and V is the code for bounded buffers, with the operations "PUT" and "GET". Bounded buffers are w…

> This stuff was all well understood four decades ago. Much of it was forgotten outside the mainframe world, because threads and multiprocessors didn't make it to microprocessors for several more decades. Here's an important distinction to make: this stuff was well understood in theory , but the practice is a bit different. Semaphores are a neat theoretical concept but not a very good practical parallel programming p…

Using two semaphores to implement a bounded buffer has the advantage that writers and readers don't interfere with eachother until the queue is either empty or full. Of course, that might be the only good use of semaphores, and a direct implementation can be better then one using standard semaphores.

Semaphores can be implemented in a way that doesn't require a spinlock in the fast path. Still not as fast as you can make a mutex, but a lot better than the pseudocode given in many classes (which is almost always wrong, too.)

Re: Linus Torvalds on semaphores (1999)

#46

"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…

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?"

Re: Linus Torvalds on semaphores (1999)

#47
The possible future improvement that Linus mentions here:

  For example, the per-VM memory management semaphore could very usefully
  be a blocking read-write lock, but without heavy thread contention a
  mutex semaphore is basically equivalent.
has actually come to pass: the mm_struct is now protected by struct rw_semaphore mmap_sem.

Re: Linus Torvalds on semaphores (1999)

#48

Earlier quoted context omitted.

> "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…

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?

Re: Linus Torvalds on semaphores (1999)

#49

it's surprising that Linus answers peacefully and pedagogically ! and thus it's a nice read to refresh the definition of semaphores, spinlocks and mutexes. Maybe you can edit the title and add a little [199] :-)

it's surprising that Linus answers peacefully and pedagogically !

No, it's not. Quit taking blogs at face value.

Post reply on HN