5 ms·
This is a poor analogy because most barber shops have line-of-sight between the barbers and waiting room. The "both asleep" issue will never arise in the real w
by degenerate 9y ago
This is a poor analogy because most barber shops have line-of-sight between the barbers and waiting room. The "both asleep" issue will never arise in the real world, and thus, the analogy doesn't help explain the problem.
- Fang_ 9y agoSurely "sleeping barber" sounds like a much more attractive problem to work on than "sleeping dentist". The point of the analogy is to assign the described traits to the discussed concept, instead of putting the concept in the world of the analogy.
- mikeash 9y agoI'd say it's more of a colorful description than an analogy. Consider the classic dining philosophers problem for a crazier example. Who eats with both hands, using different forks, and sharing forks with your neighbor? And yet being able to visualize it like that helps a lot.
- hedora 9y agoThe dining philosophers have chopsticks in all the formulations I've seen. Wikipedia disagrees with me, FWIW.
- mikeash 9y agoInteresting, never heard that variant before.
- saghm 9y agoIn my OS class in college, my professor actually took the time in the lecture to criticize the textbook for describing it with forks and spaghetti rather than the less ludicrous rice and chopsticks. OTOH, when the computer science club at my school had an event where you could go to literally act out the problem with others, they used double-ended forks (I think two forks taped together) to mitigate germ spreading.
- comex 9y agoBut a pair of chopsticks is meant to be held in one hand, and picking up food with one chopstick per hand is clumsy at best (since the sticks are at opposing angles rather than near-parallel). How about knives and meat, where the non-dominant hand’s knife is used in place of a fork? That would definitely require having one utensil in each hand. Seems a bit crude-mannered for erudite philosophers, though...
- yorwba 9y agoThe point is that chopsticks are interchangeable resources, unlike forks and knives, and you usually need two of them to eat, unlike forks. The story makes sense for me if you assume that the dining philosophers aren't going to use one chopstick per hand, but they have to pick up one to the left and one to the right before they can put two in one hand.
- taneq 9y agoChopsticks makes more sense, certainly. Although still, who shares chopsticks (much less trades individual chopsticks with other diners)?! I doubt this dinner ever actually happened. :P
- adrianN 9y agoPhilosophers do, obviously.
- deleted 9y ago[deleted]
- musage 9y agoIs this some kind of contest in missing the point?
- psyc 9y agoThis whole thread is.
- mikeash 9y agoWasn't this the whole reason DARPA created the internet in the first place?
- hedora 9y agoClearly, you've never worked with philosophers.
- musage 9y agoWhat makes a philosopher other than love of wisdom? And in your estimation are they missing the point of other philosophers, or of non-philosophers? If the latter, what's a non-philosopher?
- theandrewbailey 9y agoIf it's possible for the barber to finish and check the waiting room before the new customer traverses back to the waiting room from checking the barber, it means that the barber shop is poorly architected, and needs to be reimplemented (preferably with the latest JS framework). \s
- LeoNatan25 9y agoAnd then write a pretentious Medium blog post how that (single-threaded “concurrent”) JS framework solves all concurrency/parallelism problems of the world by using async/await.
- userbinator 9y agoSlightly better analogy of a similar but not exactly identical problem, which no doubt people have actually experienced unintentionally: you and a friend go to a store, decide to split up and buy different things. You go to where the X is, he goes to where the Y is. You tell your friend "come meet me near the X when you're done, and if I'm done I'll find you at the Y". He tells you "come meet me near the Y when you're done", and if I'm done I'll find you at the X."
- fenomas 9y agoThis is a facile complaint - the analogy isn't meant to illustrate something about barbers, it's meant to illustrate things about interprocess communication. You might as well say "actually life is not like a box of chocolates, because it cannot be purchased at candy shops and doesn't melt when you leave it on your dashboard".
- vacri 9y agoYes, any analogy will break down if you chase it to the fringes, but in this case, the central core of the analogy doesn't work. That makes it a bad analogy - you may as well just explain what's going on directly. Or spend the trivial effort to make a better one.
- erikb 9y agoAnalogies are about quick understanding, not about being real. Apparently you understood it, so it is a good example to use. Adding a virtual hallway with closed walls and doors between waiting area and working area is not a big deal.