From: Robert Klemme Date: 2005-09-17T18:51:35+09:00 Subject: Re: Some interesting criticisms of rails Zed A. Shaw wrote: > I remember reading about the Dining Philosophers problem when I was > young and how it was solved with this incredibly complex logic proof > that laid out most of the rules for what we know as "thread locking". > For those of you who don't know, the Dining Philosophers is where > there's four idiots arguing about communism eating a massive bowl of > pasta and they're too stupid to ask for more than two serving forks. > So, these "philosophers" spend a lot of time fighting over the forks > and there needs to be a way to coordinate this fork "sharing". The > solution? Ah, we'll add even more complexity to the problem and > create neat things like semaphors. First of all it's five philosophers (i.e. as far as I remeber it's important that the number of resource aquisitors is odd). Then of course this just serves as an illustrating example. The problem of shared resource access is all too common in CS (for example in databases). You cannot solve it by introducing a centralized server because that creates a bottleneck which defies the purpose of parallel processing. Your waiter is not the best solution. If you're interested in more details about how for example RDBMS solve this there's a lot of resources out there to read on. I don't know why think you have to rant about real CS problems or communists. This is not an excercise to plague students but it's a real issue and an important problem which must be solved. Without real solutions your OS would likely perform much worse than it actually does. Regards robert