Lecture 4
Lecture 4
Lecture 4
Concurrency
Control
By
Farah
Shaheen
Acknowledgement:
Department of Information Technology – The UniversityLecture slides material from
of Haripur
Stuart Russell
Resource Locking
One way to prevent concurrency problems is to lock the shared
data.
Locking ensure that the shared data can be used by one user at
one time.
When a user accesses the data, the second user to wait until the
first user finishes its work.
For example: There is an item in the database with a value of
100.
If two users try to access the item to update it.