How many philosophers may eat simultaneously in the Dining Philosophers problem with 5 philosophers? A. 3 B. 4 C. 2 D. 1 E. 5 code example
Example: dining philosophers problem in os
process P[i]
while true do
{ THINK;
PICKUP(CHOPSTICK[i], CHOPSTICK[i+1 mod 5]);
EAT;
PUTDOWN(CHOPSTICK[i], CHOPSTICK[i+1 mod 5])
}