Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method for Controlling the Number of Storage Locks in an OS/2 Device Driver

IP.com Disclosure Number: IPCOM000109208D
Original Publication Date: 1992-Aug-01
Included in the Prior Art Database: 2005-Mar-23
Document File: 3 page(s) / 106K

Publishing Venue

IBM

Related People

Johnson, SH: AUTHOR

Abstract

Disclosed is a method for controlling the number of storage locks that must be managed by an OS/2* device driver. A device driver that must manage a linked list of external buffers is required to lock the buffers in storage to prevent them from being relocated or swapped out of storage by the OS/2 operating system. A simplistic approach to this would be merely to execute the system Lock Device Helper routine for each pointer; unfortunately, when large numbers of pointers are present, this creates a problem with the management of lock handles. This article defines a method of limiting the number of storage locks that are executed by locking only those areas (i.e., storage selectors) that are not already covered by another lock.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 94% of the total text.

Method for Controlling the Number of Storage Locks in an OS/2 Device Driver

       Disclosed is a method for controlling the number of
storage locks that must be managed by an OS/2* device driver.  A
device driver that must manage a linked list of external buffers is
required to lock the buffers in storage to prevent them from being
relocated or swapped out of storage by the OS/2 operating system.  A
simplistic approach to this would be merely to execute the system
Lock Device Helper routine for each pointer; unfortunately, when
large numbers of pointers are present, this creates a problem with
the management of lock handles.  This article defines a method of
limiting the number of storage locks that are executed by locking
only those areas (i.e., storage selectors) that are not already
covered by another lock.

      The heart of this method is to define areas of storage by their
usage, not by their location.  This way, a single storage selector
can be used to point to an area of storage that contains a large
number of different data buffers, structures, etc.  All pointers that
use a particular storage selector must be inspected to see whether or
not a lock is necessary.  If a lock has already been executed against
that selector, the only action needed is to update the usage flag for
that selector.  Otherwise, the operating system must be called to
establish the initial storage lock.

      For an example of how locks and their usages are established,
s...