Download presentation
Presentation is loading. Please wait.
1
Dining Philosophers (Diners) Problem
7/1/2018 Dining Philosophers (Diners) Problem definition Chandy and Misra solution extension to drinking philosophers
2
Definition extension to mutual exclusion arbitrary topology
7/1/2018 Definition extension to mutual exclusion arbitrary topology each philosopher (process) proceeds through the following cycle thinking (out of the CS) may remain indefinitely hungry (requesting the CS) eating (executing the CS) has to finish within finite time solution properties safety – no two neighbors eat at the same time liveness – each hungry philosopher eventually eats can a DMX solution be used to solve the diners problem? If yes, would this solution be efficient?
3
Chandy-Misra[84] (Hygenic) Solution Setup
7/1/2018 Chandy-Misra[84] (Hygenic) Solution Setup each pair of diners share a fork fork is clean before eating, fork is dirty during and after diner cleans the fork only before giving it to neighbor edge between diners u and v is oriented from u to v (u has higher priority) if u holds clean fork v holds dirty fork, fork is in transition from v to u initially, thus oriented graph is acyclic, all forks are dirty
4
Chandy-Misra[84] (Hygenic) Solution Details
7/1/2018 Chandy-Misra[84] (Hygenic) Solution Details if diner does not have fork – it sends request to the neighbor process gives up dirty forks and holds clean diner can only wait for higher priority neighbor Gets forks my sending a request for the fork – request for fork per CS request only sent once between a pair of procs notice after eating, diner is a source (all his forks are dirty) graph remains acyclic throughout operation acyclic graph has a sink (lowest priority diner), that diner is guaranteed to eat
5
Extension to Drinking Philosophers
7/1/2018 Extension to Drinking Philosophers definition arbitrary topology each pair of drinking philosophers share a bottle philosopher alternates between being tranquil, thirsty and drinking philosopher may be tranquil indefinitely but drinks only for finite amount of time philosopher may request to drink from an arbitrary subset of adjacent bottles properties two neighbors cannot drink from the same bottle at the same time each thirsty philosopher eventually drinks relation to the other problems can a solution to diners be used to solve the drinking philosophers problem? Can a DMX solution? If yes, are they going to be efficient?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.