Question: Suppose that two threads A and B have access to the shared variable account , which has the initial value of 1 0 0 ;
Suppose that two threads A and B have access to the shared variable account which
has the initial value of ; Now, thread A is going to make a deposit and perform: account
account while thread B is going to do a withdraw: account account
What are the possible values of the variable after running the two threads without having
a synchronization mechanism for the critical section?
Use semaphore to address the critical section problem
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
