- Shared read lock
Information systems store structured information in a
Database . A database is created, accessed, and manipulated via a Database management system (DBMS ). DBMS theory and practice is an important subdicipline of computer science. Many databases are used to share data among a number of concurrent users. The classic example is an airline reservation system. When multiple users share a database, the DBMS must decide which user can make modifications at any given time. The basic approach it to create a lock when a user accesses data, and release the lock when the user is no longer accessing the data.The simplest and most primitive form of lock is a database-level lock: Only one user at a time can access database. A database-level lock is unacceptable when many users must access the data concurrently as in an airplane reservation system, so more sophisticated locking protocols have been developed.
DBMSs have evolved since the inception of the computer age. Today, the prevalent model for database access is the
relational model . In this model, the data is organized in "tables." Within each table, each set of data is a "row." There is a standard language, known asSQL , to access a relational database.A shared read lock is a lock on the row and/or chunk of data that still allows the access of concurrent reads. The lock occurs in order to ensure that the read transaction is isolated from any changes that are going on during the read cycle.
For a shared read lock to be upgraded to a write, a file must be closed and read again with a write lock. Write locks forbid concurrent reading, unless they are restricted to particular records or byte ranges in a file that are "not" being read. That prevents a process from reading data that "will" become stale.
In the appearance of concurrency, users can be advised that their copy of a file cannot be written.
ee also
CPU Cache
Wikimedia Foundation. 2010.