Question: Two users A and B wants to access the banking system. The initial account balance is 10$ and is visible to both users A
Two users A and B wants to access the banking system. The initial account balance is 10$ and is visible to both users A and B. Both users wants to access the same account, simultaneously. User A wants to deposit 10$ to the initial balance and user B wants to withdraw 10$. The final balance should be 10 dollars. You are required to solve this process synchronization problem using the semaphores solution. Write down the entry and exit source codes for avoiding the race condition problem. [2 marks]
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
To solve this process synchronization problem using semaphores in a programming language like Python ... View full answer
Get step-by-step solutions from verified subject matter experts
