2019329621182-刘辰萱-homework-5 Version 0 |
|
👤 Author: by rootfreanjacn 2021-12-25 22:44:21 |
An example of data inconsistency that can occur because of a race condition is what can happen with a shared bank account. Dad adds money to an account and Student withdraws from the account. When either accesses the account, they execute a critical section consisting of three steps.
Read account balance
Update the balance
Write the new balance to the account
The solution:When one user performs operations on an account, another user is prohibited from performing operations
Please login to reply. Login