How to start coding the "Dining Philosophers" simulation?
Posted
by
GrizzlyGuru
on Stack Overflow
See other posts from Stack Overflow
or by GrizzlyGuru
Published on 2008-09-06T18:26:18Z
Indexed on
2012/09/14
21:38 UTC
Read the original article
Hit count: 188
I'm not a beginner at C# but I really need to increase my understanding, so I've picked a classic deadlock problem to code to help teach myself some of the more advanced concepts of C#. The Dining Philosophers Problem seems like a good one, but I need a little help to get started. I know I need to approach the "diners" as objects, but to simulate the random delays between eating, should I look to threading with each diner in a separate thread? Do I need some kind of "master" to monitor all the actions? Any general design concept advice is welcome, but I'd like to do the grunt programming as an exercise. Thanks!
© Stack Overflow or respective owner