Shared read lock

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 as SQL, 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.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Lock (computer science) — In computer science, a lock is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution. Locks are one way of enforcing concurrency control policies. Contents 1 Types 2… …   Wikipedia

  • Lock-free and wait-free algorithms — In contrast to algorithms that protect access to shared data with locks, lock free and wait free algorithms are specially designed to allow multiple threads to read and write shared data concurrently without corrupting it. Lock free refers to the …   Wikipedia

  • Readers–writer lock — In computer science, a readers writer or shared exclusive lock (also known as the multiple readers / single writer lock[1] or the multi reader lock,[2] or by typographical variants such as readers/writers lock) is a synchronization primitive that …   Wikipedia

  • Distributed lock manager — A distributed lock manager (DLM) provides distributed software applications with a means to synchronize their accesses to shared resources. DLMs have been used as the foundation for several successful clustered file systems, in which the machines …   Wikipedia

  • Readers-writer lock — In computer science, a readers writer lock (also known by the name multi reader lock , or by typographical variants such as readers/writers lock) is a synchronization primitive that solves one of the readers writers problems. A readers writer… …   Wikipedia

  • Two-phase locking — This article is about concurrency control. For commit consensus within a distributed transaction, see Two phase commit protocol. In databases and transaction processing two phase locking, (2PL) is a concurrency control method that guarantees… …   Wikipedia

  • Commitment ordering — In concurrency control of databases, transaction processing (transaction management), and related applications, Commitment ordering (or Commit ordering; CO; (Raz 1990, 1992, 1994, 2009)) is a class of interoperable Serializability techniques …   Wikipedia

  • Strict two-phase locking — In computer science, strict two phase locking (Strict 2PL) is a locking method used in concurrent systems.The two rules of Strict 2PL are:# If a transaction T wants to read/write an object, it must request a shared/exclusive lock on the object. # …   Wikipedia

  • Sperrverfahren — (Datenbanken) werden in Datenbanksystemen eingesetzt, um die Forderung der Isolation des ACID Prinzips bei Transaktionen zu erfüllen. Alle Sperrverfahren, auch Sperrprotokolle genannt, fallen in die Kategorie der pessimistischen… …   Deutsch Wikipedia

  • Enterprise JavaBean — Simple EJB2 Architecture Enterprise JavaBeans (EJB) is a managed, server side component architecture for modular construction of enterprise applications. The EJB specification is one of several Java APIs in the Java EE specification. EJB is a… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”