Question: I need help about semaphore implementation for operating systems lesson. Consider a bank where there are N workers and assume that any number of customers

I need help about semaphore implementation for operating systems lesson.
Consider a bank where there are N workers and assume that any number of customers may exit at a time. A worker waits for a customer and then provides service. If no worker is free, then a customer should wait. After completing service to a customer, the worker process should update wrk. Similarly, each customer should update cstmr as soon as it arrives. Using two semaphore variables wakr and cstmr, synchronize workers and customer processes. Do not forget to initialize semaphore variables appropriately. Semaphore cstmr = wrkr Worker process: do{ Customer process: do{ Provide service; get service; } while (true); }while (true)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
