Consider the thirsty person problem given below: To drink, a thirsty person must have three things; water, ice and a glass. There are three thirsty people, each having a different one (and only one) of the three required items. A fourth person, a server has unlimited supply of all three items. If nobody is drinking, the server places two of the three items (chosen at random) onto table. Thirsty person who can make a drink from those two items will pick them up and drink a glass of ice water. When done, thirsty person will notify the server and the process will repeat. Write a process that will control the thirsty person and the server using semaphores.
#Sales Offer!| Get upto 25% Off: