Question: 1. Consider five philosopher processes numbered 0 Ihrough 4 who spend their lives thinking ana eating Between each pair of philosophers is a fork. The
1. Consider five philosopher processes numbered 0 Ihrough 4 who spend their lives thinking ana eating Between each pair of philosophers is a fork. The forks are also numbered 0 through 4 so that for between philosophers i-1 and i (all arithmetic on forks and philosopher numbers is moaulo 5 so fork o between philosopher 4 and 0). When o philosopher thinks, he does not interact with his colieogues. From time to time, a philosopher gets hungry and tries to pick up the two forks that are closed to him. A philosopher may pick up only one fork at a time. Obviously, he cannot pick up a fork that is aiready in the hand of his neighbour. When a hungry philosopher is finished, he puts down both of his forks and starts thinking again. This dining-philosophers' problem is considered a classic synchronisation probiem the various solutions of ailocating resources (forks) among several processes (philosophers) in a deo and starvation-free manner Discuss dlock
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
