Definition

lock

A lock is a mechanism for controlling access to something. In programming, locks are often used so that multiple programs or threads of a program can share a resource - for example, access to a file for updating it - on a one-at-a-time basis. Typically, a lock is of temporary duration and when the resource is no longer required, it is freed for locking and use by the next sharer in a queue.

From a system point-of-view, locking is a method of synchronizing potentially concurrent uses of a database or other common resource. An operating system may enforce locking or some other mechanism in order to ensure that actions occur in the right sequence (when they don't, the situtation is known as a race condition). An operating system must also provide for means to ensure that two programs do not become dependent on each other for the release of a lock, a situation known as a deadlock in which the programs are essentially halted. In some systems, a mutex is a named object that provides a lock for a given resource.

This was last updated in August 2005
Posted by: Margaret Rouse

Email Alerts

Register now to receive Search400.com-related news, tips and more, delivered to your inbox.
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

More News and Tutorials

  • Fast track to iSeries learning resources

    Here's a fast reference to all of our learning resources on Search400.com. You can find information on autonomic computing, backup and recovery, career resources, and more.

  • Authenticate use of Web applications via user profiles

    One technique you can use to authenticate users to the HTTP server is to request and validate an OS/400 user profile and password. In most cases, however, you'll want to use this method only if the Web application user population is limited to people in your company who already have OS/400 user profiles.

  • Easy code copying -- without CODE400

    Try this method of copying code to make your life a little easier.

Do you have something to add to this definition? Let us know.

Send your comments to techterms@whatis.com

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: