What Does Lock Mean?

A lock is a mechanism used to synchronize different processing threads, with set limits to avoid unlimited accessibility of a certain resource within a computing environment. It is a method meant to arrange access by applying simultaneous control policies.


Locks are typically advisory, which means that a thread works collaboratively with other threads to acquire the lock before it is given accessibility to the data it queries. Mandatory locks are also applied by some systems, where an exception occurs as a result of unauthorized access to a source in a locked status.

Also known as locking.

Techopedia Explains Lock

A lock has a simple form called a semaphore, where there is no solid difference between a shared, read only mode and an exclusive read/write mode. Shared mode has many forms including exclusive, intend-to-exclude and intend-to-upgrade. These forms are implemented in many computing systems.

There is also another method of classifying locks, which depends on the lock technique used to avoid accessing the unintended thread. A common locking technique blocks the execution of a thread entirely until the thread acquires the lock, while a spinlock tells the thread to freeze access attempts until it acquires the lock.


Related Terms

Latest Cybersecurity Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…