Skip to content

Dinning Philosophers without using shared memory, for concurrent server using only socket message passing

Notifications You must be signed in to change notification settings

kishordgupta/DinningPhilosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

DinningPhilosophers

Dinning Philosophers without using shared memory, for concurrent server using only socket message passing

Logic:

Main program creating 5 process for Chopsticks . These process create Server using portid 5000 to 5004 After that Crating 5 process for Philosopher’s .

Chopsticks server bind their respective port and wait for philosophers

Every philosopher send “”ACQUIRE” message to server. If Chopstick server busy they return N else Y. If Philosopher’s got two Y from server he send DONE message to both server . which release the chopsticks and increase a counter by 1. If one of the server send N then chopsticks send ‘RELEASE’ message to another server. And wait a random time.

About

Dinning Philosophers without using shared memory, for concurrent server using only socket message passing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages