A bunch of philosophers (in this case 5 of them) are eating spaghetti. They also think a lot. When they are thinking they do not eat. In order to eat, a philosopher must use both forks. What algorithm will solve this problem and allow them to eat? |
Multi-threaded, concurrent programming is a complicated and big topic. There are whole books on concurrent programming, and we could have an entire class on the subject. For this course, you should just get the basics and be able to use 2 or more threads in your programs as needed.