I am in an intro to OS class and we are learning about mutual exclusion and semaphores. One classical problem we learned about was the dining philosophers problem. My professor touched on the different cases using simple semaphores (i.e asking the last philosopher to grab the right fork before the left while the others grab right first) however, these still violates the concurrency requirement.
He explained that these types of problems begin to show the importance of advanced synchronization and how we need more but he didn't go into details because that subject belongs to the actual Operating Systems course.
I am curious as to how you could implement AND semaphores to solve the dining philosophers problem. I did some research and could not find any great resources showing implementations using AND or monitors.
Could someone go into some detail or point me to an article/textbook that does?