Browse Prior Art Database

Poll and Select Function for Cascaded Device Drivers on a UNIX Operating System

IP.com Disclosure Number: IPCOM000107549D
Original Publication Date: 1992-Mar-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 2 page(s) / 120K

Publishing Venue

IBM

Related People

Coley, ML: AUTHOR [+2]

Abstract

Described is a method that allows a device driver cascading (one driver calling another) to other device drivers the capability to pass along a select or poll event request to other device drivers that it is using and have their events reported as its own.

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

Poll and Select Function for Cascaded Device Drivers on a UNIX Operating System

       Described is a method that allows a device driver
cascading (one driver calling another) to other device drivers the
capability to pass along a select or poll event request to other
device drivers that it is using and have their events reported as its
own.

      Traditional UNIX* operating systems do not provide for
cascading of device drivers.  Device driver cascading is where one
device driver can open and utilize one or more other device drivers
to perform its function.  This capability is provided on  AIX** v3
and widely used.  For example, it is used when the LVM (logical
volume manager) device driver opens and utilizes the SCSI disk device
driver.  It is also used when the SCSI disk device driver opens and
utilizes the SCSI bus driver.  For device drivers utilizing the
cascading effect, a method is required to be able to pass along a
poll or select request for event notification.  It is also useful for
the device driver passing along the event request, to "stay in the
loop" and receive notification that a device driver lower in the
cascaded driver chain has notified the kernel of an event.

      This cascaded poll/select mechanism extends the
high-performance poll/select functionality provided in AIXv3.  Since
the device identifier is used by the kernel to associate a set of
requested events with a device and a process, support for cascading
device drivers is required. A new kernel service fp_select was
provided to enable an upper device driver's select routine to hand a
select/poll request to one or more other device drivers to handle.
These drivers can, in turn, call the fp_select service to continue to
pass the request down to the supporting device drivers that can
handle notification of the requested event. The fp_select service
requires that the caller have the target device driver open and have
its associated file pointer.  The fp_select service requires the
requested events parameter (usually from the original requested
events received by the original driver) and an optional notify
routine function pointer.  When the fp_select routine is called by a
device driver to pass the request to another driver, the kernel adds
a new event control block to the per process control block chain and
hashes it into the device event hash table using the target device
drivers device identifier (devno+chan).  A new field was added to the
event control block called the event correlator.  This correlator is
normally assigned a unique value in each event control block.
However, when fp_select is used to cascade device drivers, the
correlator for the target device driver is copied from the correlator
in the event control block anchored in the proc structure.  This, in
fact, relates the cascaded device driver event request with its
parent event...