Problem of drinking philosophers

Job ID: 35751682

Budget: $10 – $20 USD

I need to write a code in a short time that solves the problem of drinking philosophers in a diffuse way/parallel computing (using MPI).
https://pl.wikipedia.org/wiki/Problem_ucztujących_filozofów
At the round table sits F philosophers who alternately drink and think (as much as they can). In the middle of the table is B bottles (B<F), each available to any philosopher. The philosopher spontaneously feels desire. To quench the thirst, the philosopher needs exclusive access to one of the B bottles (they drink "from the thread"). Write a program for the philosopher's trial to ensure that there is no starvation ("drying up") of any of the philosophers. Bottles should be treated as shared passive resources.
Related categories: C Programming Parallel Processing