File Locking

Why Trust Techopedia

What Does File Locking Mean?

File locking is a data management feature that restricts other users from changing a specific file. This allows only one user or process access to this file at any given time. This is to prevent the problem of interceding updates on the same files.

Advertisements

Techopedia Explains File Locking

For example, if process A and process B open the same file, process A then changes the file and saves it. Process B, which still has the original state file, makes some changes then saves it, rendering the changes made by process A lost.

The file locking mechanism was introduced by IBM in 1963 in mainframe computers that used the OS/360. At the time, it was called “exclusive control.” This is a first-come, first-served method for file management in multiuser systems. The first process or user to access the file locks out other users from being able to access it. When the file has been updated and control has been relinquished, it becomes unlocked and available for others to access. Modern implementation of this method allows for multiple users to access the file but only the first one to access it may modify it. Some applications allow interceding updates with all the changes selectively merged later on, whether manually or automatically.

Advertisements

Related Terms

Margaret Rouse
Technology Expert
Margaret Rouse
Technology Expert

Margaret 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 IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.