Browse Prior Art Database

Fast Lock

IP.com Disclosure Number: IPCOM000034728D
Original Publication Date: 1989-Apr-01
Included in the Prior Art Database: 2005-Jan-27
Document File: 6 page(s) / 145K

Publishing Venue

IBM

Related People

Kirkman, RK: AUTHOR

Abstract

In a multi-processing environment, simutaneous use of a system resource can be synchronized by a process-oriented locking mechanism. However, when the resource is not likely to be shared among processes, and a process' use of it is such that it must repeatedly lock and unlock the resource, significant processing overhead is introduced. "Fast Lock" is a mechanism which eliminates the repeated locking and unlocking while there is no possible contention for it but, when contention is possible, uses the system's locking mechanism without appreciably adding to the overhead. (Image Omitted) Before using a resource, a process must first "Open" the resource to establish its intent to use it.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 6

Fast Lock

In a multi-processing environment, simutaneous use of a system resource can be synchronized by a process-oriented locking mechanism. However, when the resource is not likely to be shared among processes, and a process' use of it is such that it must repeatedly lock and unlock the resource, significant processing overhead is introduced. "Fast Lock" is a mechanism which eliminates the repeated locking and unlocking while there is no possible contention for it but, when contention is possible, uses the system's locking mechanism without appreciably adding to the overhead.

(Image Omitted)

Before using a resource, a process must first "Open" the resource to establish its intent to use it. While the resource is Opened it may be used to repeatedly, and each usage must be surrounded by "Acquire" and "Release" operations which synchronize the use of the resource when there is contention for it, and simply allow the use of the resource when there is no contention. (See Fig.
1).

Counter - Contains the number of processes currently

intending to use the resource.

Counter Save - A save area for the counter during Open

and Close processing.

Lock Flag - A flag indicating that some process is

currently using the resource, having acquired it in a

non-contention environment.

(Image Omitted)

Process State - An indicator of a given process' state

relative to the resource.

Contention Lock - A lock used to make the transition

from a non- contention to a contention environment.

Transition Lock - A lock used to make the transition

from a non- contention to a contention environment.

Open/Close Lock - A lock used to make the transition

from a non- contention to a contention environment.

Function Descriptions

Open - The Open function is used by a process to

establish intent to use the resource. It increments

the count of processes that currently have the resource

opened. The Open/Close Lock is used to make the

incrementing of the Counter and the updating of the

Process State appear as an atomic operation.

Contention is possible when the Counter value is larger

than 1. See Fig. 2 for the Open function logic flow.

(Image Omitted)

1

Page 2 of 6

Acquire - The Acquire function is used by a process to

get permission to use the resource. If there is a

conflict for the resource, the process waits for its

turn. While there is no contention, there is nothing

involved in acquiring the resource other than what may

be later needed to make the transition from the

non-contention to a contention environment.

1. The Lock Flag is set each time the resource is

acquired (it is reset when the resource is

released).

2. The Transition Lock is locked the first time

the resource is acquired. (It is reset when the

resource is closed, or when contention is later

detected during an Acquire or Release function).

If after the above non-contention processing there is

now contention for the resource, the Acquire function

performs the following contention processing, both to

"undo...