|
|
|
| United States Patent | 5613123 |
| Link to this page | http://www.wikipatents.com/5613123.html |
| Inventor(s) | Tsang; Michael H. (Renton, WA);
Crick; Andrew P. R. (Woodinville, WA) |
| Abstract | A method and system for configuring and executing device drivers in a
computer system. In a preferred embodiment, a device driver comprises a
plurality of component drivers. Each component driver performs a function
that may be used in accessing a device. The component drivers of a device
driver are ordered from a top layer to a bottom layer. When accessing a
device, the top layer component driver of the device driver is first
invoked. Each component driver performs its function and invokes the next
lower layer component driver to the bottom layer component driver, which
interacts directly with the device. An operating system dynamically
configures the device drivers at computer system startup. The operating
system invokes each of a plurality of component drivers to determine based
on device-specific information and configuration requirements of
previously included component drivers whether the component driver should
be selected to be included as a layer in a particular device driver. If
selected, the component driver stores a reference to itself in a call-down
table for the device driver and stores its configuration requirements with
the unsatisfied configuration requirements of previously included
component drivers. When accessing the device, if all configuration
requirements for the device driver have been satisfied, the operating
system first invokes the component driver referenced by the top reference
in the call-down table. Each component driver in turn invokes the
component driver referenced by the next lower reference in the call-down
table. |
|
|
|
Title Information  |
|
|
|
|
|
Drawing from US Patent 5613123 |
|
|
Method and system for configuring and executing device drivers based on
configuration requirements |
|
|
|
|
|
| Publication Date |
March 18, 1997 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Parent Case |
CROSS-REFERENCE TO RELATED APPLICATION
This application is a continuation of U.S. patent application Ser. No.
07/954,677, filed Sep. 30, 1992, now abandoned. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Title Information  |
|
|
References  |
|
|
| *references marked with an asterisk below are user-added references |
|
U.S. References |
|
|
|
|
|
|
U.S. References |
|
|
Foreign References |
|
|
|
|
|
|
Foreign References |
|
|
Other References |
|
|
|
|
|
|
Other References |
|
|
|
|
|
References  |
|
|
|
|
|
| Market Size |
|
Estimate the gross annual revenues of the relevant market
sector:
|
| | |
| |
|
|
| Market Share |
|
Estimate the percentage of the relevant market sector this invention will capture:
|
| | |
| |
|
|
| Reasonable Royalty |
|
What percentage of gross sales should the inventor or assignee be paid?
|
| | |
| |
|
|
|
Public's "Guesstimation" of Royalty Value
|
| Market Size | N/A | [No votes] | | x | Market Share | N/A | [No votes] | | x | Reasonable Royalty | N/A | [No votes] |
| | N/A | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
Market Review  |
|
|
Technical Review  |
|
|
Claims  |
|
|
We claim:
1. A method in a computer system for configuring a device driver from a
plurality of component drivers by determining whether each of the
plurality of component drivers should be included in the device driver,
the method comprising the computer-implemented steps of:
for each selected one of the plurality of component drivers,
determining configuration requirements imposed by each of the component
drivers that is already included in the device driver;
determining whether the selected component driver satisfies at least one of
the determined configuration requirements imposed by the component drivers
that are already included in the device driver; and
when the selected component driver satisfies at least one of the determined
configuration requirements, including the selected component driver in the
device driver.
2. The method of claim 1, wherein the step of determining whether the
selected component driver satisfies at least one of the determined
configuration requirements includes the step of invoking the selected
component driver and having the invoked selected component driver
determine whether the invoked selected component driver satisfies one of
the determined configuration requirements.
3. The method of claim 2 wherein the step of including the selected
component driver in the device driver includes the step of, when the
invoked selected component driver satisfies at least one of the determined
configuration requirements, the invoked selected component driver include
the invoked selected component driver in the device driver.
4. The method of claim 1,
wherein the step of including the selected component driver in the device
driver includes the step of including the selected component driver as a
layer in the device driver;
wherein a first of the component drivers that is included in the device
driver comprises a bottom layer of the device driver;
wherein each additional one of the component drivers that is included in
the device driver comprises a higher layer of the device driver; and
wherein a last of the component drivers that is included in the device
driver comprises a top layer of the device driver.
5. A method in a computer system for configuring and executing a device
driver, the device driver being configured from a plurality of component
drivers by determining whether each of the plurality of component drivers
should be included in the device driver, each of the plurality of
component drivers performing a function, the method comprising the
computer-implemented steps of:
for each selected one of the plurality of component drivers,
determining configuration requirements imposed by each of the component
drivers that is already included in the device driver;
determining whether the selected component driver satisfies at least one of
the determined configuration requirements imposed by the component drivers
that are already included in the device driver; and
when the selected component driver satisfies at least one of the determined
configuration requirements, including the selected component driver in the
device driver; and
invoking and performing the function of each component driver that is part
of the device driver.
6. The method of claim 5,
wherein the step of determining whether the selected component driver
satisfies at least one of the determined configuration requirements
includes the step of invoking the selected component driver and having the
invoked selected component driver determine whether the invoked selected
component driver satisfies at least one of the determined configuration
requirements; and
wherein the step of including the selected component driver in the device
driver includes the step of, when the invoked selected component driver
satisfies at least one of the determined configuration requirements,
having the invoked selected component driver include the invoked selected
component driver in the device driver.
7. The method of claim 5,
wherein the step of including the selected component driver in the device
driver includes the step of including the selected component driver as a
layer in the device driver;
wherein a first one of the component drivers that is included in the device
driver comprises a bottom layer of the device driver;
wherein each additional one of the component drivers that is included in
the device driver comprises a higher layer of the device driver; and
wherein a last of the component drivers that is included in the device
driver comprises a top layer of the device driver.
8. The method of claim 7, wherein each component driver included in the
device driver invokes the next lower layer component driver until the
bottom layer component driver has been invoked.
9. A computer system for configuring a device driver from a plurality of
component drivers by determining whether each selected one of the
plurality of component drivers should be included in the device driver,
the computer system comprising:
a plurality of component drivers;
a component driver selection routine for performing the following steps for
each selected component driver:
determining configuration requirements imposed by each of the component
drivers that is already included in the device driver;
determining whether the selected component driver satisfies one of the
determined configuration requirements; and
when the selected component driver satisfies at least one of the determined
configuration requirements, including the component driver in the device
driver.
10. The method of claim 1, further including the step of, for each given
component driver included in the device driver, indicating the
configuration requirements of any component driver that is already
included in the device driver that the given component driver satisfies.
11. The method of claim 1, further including the step of, for each
component driver included in the device driver, indicating any
configuration requirements that the component driver must have satisfied
by another component driver included in the device driver.
12. The method of claim 5, further including the step of, for each
component driver included in the device driver, indicating the
configuration requirements imposed by any component driver that is already
included in the device driver that the component driver satisfies.
13. The method of claim 5, further including the step of, for each
component driver included in the device driver, indicating any
configuration requirements that the component driver must have satisfied
by another component driver included in the device driver.
14. A method in a computer system for configuring a device driver from a
plurality of component drivers by determining whether each of the
plurality of component drivers should be included in the device driver,
the device driver corresponding to a device, the method comprising the
computer-implemented steps of:
determining a type of the device; and
for each selected one of the plurality of component drivers,
determining configuration requirements imposed by each of the component
drivers that is already included in the device driver and not satisfied by
any other of the component drivers that are already included in the device
driver;
determining whether the selected component driver should be included in the
device driver based on the determined type of the device and the
determined configuration requirements; and
including the selected component driver in the device driver when the
selected component driver relates to the determined type of the device or
when the selected component driver satisfies any of the determined
configuration requirements.
15. The method of claim 14,
further including the step of invoking each of the plurality of component
drivers;
wherein the step of determining configuration requirements includes the
step of having the invoked selected component driver determine
configuration requirements imposed by each of the component drivers that
is already included in the device driver and not satisfied by any other of
the component drivers that are already included in the device driver;
wherein the step of determining whether the selected component driver
should be included in the device driver includes the step of having the
invoked selected component driver determine whether the invoked selected
component driver should be included in the device driver based on the
determined type of the device and the determined configuration
requirements; and
wherein the step of including the selected component driver in the device
driver includes the step of having the invoked selected component driver
include the invoked component driver in the device driver when the invoked
selected component driver relates to the determined type of the device or
when the invoked selected component driver satisfies any of the determined
configuration requirements.
16. The method of claim 14, further including the step of, for each given
one of the component drivers that is included in the device driver,
indicating the configuration requirements of any of the component drivers
that are already included in the device driver that the given component
driver satisfies.
17. The method of claim 14, further including the step of, for each given
one of the component drivers that is included in the device driver,
indicating any configuration requirements that the given component driver
must have satisfied by another one of the component drivers that is
included in the device driver.
18. The method of claim 14,
wherein the step of including the component driver in the device driver
includes the step of including the component driver as a layer in the
device driver;
wherein a first of the component drivers that is included in the device
driver comprises a bottom layer of the device driver;
wherein each additional of the component drivers that is included in the
device driver comprises a higher layer of the device driver; and
wherein a last of the component drivers that is included in the device
driver comprises a top layer of the device driver.
19. The method of claim 18, further including the steps of, for each given
one of the component drivers that is included in the device driver,
indicating the configuration requirements of ones of the component drivers,
that are at lower layers of the device driver than the given component
driver, that the given component driver satisfies; and
indicating any configuration requirements that the given component driver
must have satisfied by ones of the component drivers that are at higher
layers of the device driver than the given component driver.
20. A method in a computer system for executing a device driver, the device
driver being configured from a plurality of component drivers, the
component drivers imposing configuration requirements, each of the
plurality of component drivers performing a function, at least one
component driver being included in the device driver, the method
comprising the computer-implemented steps of:
determining whether the configuration requirements imposed by each
component driver included in the device driver have been satisfied; and
when the configuration requirements have been satisfied, invoking and
performing the function of each of the component drivers that is included
in the device driver.
21. A method in a computer system for executing a device driver, the device
driver being configured from a plurality of component drivers, the
component drivers imposing configuration requirements, each of the
plurality of component drivers performing a function, at least two
component drivers being part of the device driver, the component drivers
comprising layers in the device driver, a first of the component drivers
that is included in the device driver comprising a bottom layer, each
additional one of the component drivers that is included in the device
driver comprising a higher layer, and a last of the component drivers that
is included in the device driver comprising a top layer, the method
comprising the computer-implemented steps of:
determining whether the configuration requirements imposed by each of the
component drivers that is included in the device driver have been
satisfied; and
when the configuration requirements have been satisfied, for each given one
of component drivers that is included in the device driver starting with
the component driver at the top layer of the device driver,
invoking the given component driver; and
performing the function of the given component driver.
22. The method of claim 21 wherein each of the component drivers that is
included in the device driver invokes one of the component drivers at a
next lower layer in the device driver until the component driver at the
bottom layer of the device driver has been invoked.
23. A method in a computer system for configuring and executing a device
driver, the device driver being configured from a plurality of component
drivers by determining whether each of the plurality of component drivers
should be included in the device driver, each of the plurality of
component drivers performing a function, the device driver corresponding
to a device, the method comprising the computer-implemented steps of:
determining a type of the device;
for each selected one of the plurality of component drivers,
determining configuration requirements imposed by each of the component
drivers that is already included in the device driver and not satisfied by
any other of the component drivers that are already included in the device
driver;
determining whether the selected component driver should be included in the
device driver based on the determined type of the device and the
determined configuration requirements; and
including the selected component driver in the device driver when the
selected component driver relates to the determined type of the device or
when the selected component driver satisfies any of the determined
configuration requirements;
determining whether the configuration requirements imposed by each of the
component drivers that is included in the device driver have been
satisfied; and
when the configuration requirements have been satisfied, invoking and
performing the function of each of the component drivers that is included
in the device driver.
24. The method of claim 23,
further including the step of invoking each selected one of the plurality
of component drivers to determine whether the selected component driver
should be included in the device driver;
wherein the step of determining configuration requirements includes the
step of having the invoked selected component driver determine
configuration requirements imposed by each of the component drivers that
is already included in the device driver and not satisfied by any other
ones of the component drivers that are already included in the device
driver;
wherein the step of determining whether the selected component driver
should be included in the device driver includes the step of having the
invoked selected component driver determine whether the invoked component
selected driver should be included in the device driver based on the
determined type of the device and the determined configuration
requirements; and
wherein the step of including the selected component driver part of the
device driver includes the step of having the invoked selected component
driver include the invoked selected component driver in the device driver
when the invoked selected component driver relates to the determined type
of the device or when the invoked selected component driver satisfies any
of the determined configuration requirements.
25. The method of claim 23, further including the step of, for each given
one of the component drivers that is included in the device driver,
indicating the configuration requirements imposed by any of the component
drivers that are already included in the device driver that the given
component driver satisfies.
26. The method of claim 23, further including the step of, for each given
one of the component drivers that is included in the device driver,
indicating any configuration requirements that the given component driver
must have satisfied by another of the component drivers that is included
in the device driver.
27. The method of claim 23,
wherein the step of making the selected component driver part of the device
driver includes the step of including the selected component driver as a
layer in the device driver;
wherein a first of the component drivers that is included in the device
driver comprises a bottom layer of the device driver;
wherein each additional one of the component drivers that is included in
the device driver comprises a higher layer of the device driver; and
wherein a last of the component drivers that is included in the device
driver comprises a top layer of the device driver.
28. The method of claim 27, further including the steps of, for each given
one of the component drivers that is included in the device driver,
indicating the configuration requirements of ones of the component drivers,
at layers of the device driver that are lower than the layer of the given
component driver, that the component driver satisfies; and
indicating any configuration requirements that the given component driver
must have satisfied by component drivers at layers in the device driver
that are higher than the layer of the given component driver.
29. The method of claim 27 wherein the step of, for each given one of the
component drivers that are included in the device driver, invoking the
component driver includes the step of, for each given one of the component
drivers that is included in the device drivers, starting with the
component driver at the top layer of the device driver, invoking the given
component driver.
30. The method of claim 29 wherein each component driver included in the
device driver invokes the component driver at the next lower layer of the
device driver until the component driver at the bottom layer has been
invoked.
31. A computer system comprising:
a device;
a device driver for the device;
a plurality of component drivers tier possible incorporation into the
device driver; and
a component driver selection routine for determining whether each selected
one of the component drivers should be made part of the device driver,
said routine performing the steps of:
determining the type of the device;
determining configuration requirements imposed by each of the component
drivers that is already included in the device driver and not satisfied by
any other of the component drivers that are already included in the device
driver;
determining whether the selected component driver should be included in the
device driver based on the determined type of the device and the
determined configuration requirements; and
including the selected component driver in the device driver when the
selected component driver relates to the determined type of the device or
when the selected component driver satisfies any of the determined
configuration requirements.
32. The computer system of claim 31, further comprising a device driver
configuration routine for invoking each of the plurality of component
drivers so that each invoked component driver can execute the component
driver selection routine.
33. A computer system for executing a device driver, the device driver
being configured from a plurality of component drivers, the component
drivers imposing configuration requirements, each of the plurality of
component drivers performing a function, the system comprising:
at least one of the component drivers being included in the device driver
for performing the component driver function; and
an input-output system for:
determining whether the configuration requirements imposed by each of the
component drivers that is included in the device driver have been
satisfied; and
when the configuration requirements have been satisfied, for each given one
of the component drivers that is included in the device driver, invoking
the given component driver.
34. A method in a computer system for configuring a computer module from a
plurality of component routines by determining whether each of the
plurality of component routines should be included in the computer module,
the method comprising the computer-implemented steps of:
for each selected one of the plurality of component routines,
determining configuration requirements imposed by each of the component
routines that is already included in the computer module;
determining whether the selected component routine satisfies a determined
configuration requirement; and
when the selected component routine satisfies one of the determined
configuration requirements, including the component routine in the
computer module.
35. The method of claim 34 wherein the step of determining whether the
selected component routine satisfies one of the determined configuration
requirements includes the step of invoking the selected component routine
and having the invoked selected component routine determine whether the
invoked selected component routine satisfies one of the determined
configuration requirements.
36. The method of claim 35 wherein the step of including the component
routine in the computer module includes the step of, when the invoked
selected component routine satisfies one of the determined configuration
requirements, having the invoked selected component routine include the
invoked selected component routine in the computer module.
37. The method of claim 34,
wherein the step of including the selected component routine in the
computer module includes the step of including the selected component
routine as a layer in the computer module;
wherein a first of the component routines that is included in the computer
module comprises a bottom layer of the computer module;
wherein each additional one of the component routines that is included in
the computer module comprises a higher layer of the computer module; and
wherein a last of the component routines that is included in the computer
module comprises a top layer of the computer module.
38. A method in a computer system for configuring and executing a computer
program, the computer program being configured from a plurality of
component programs by determining whether each of the plurality of
component programs should be included in the computer program, each of the
plurality of component programs performing a function, the method
comprising the computer-implemented steps of:
for each selected one of the plurality of component programs,
determining configuration requirements imposed by each of the component
programs that is already included in the computer program;
determining whether the selected component program satisfies any of the
determined configuration requirements; and
when the selected component program satisfies at least one of the
determined configuration requirements, including the selected component
program in the computer program; and
invoking and performing the function of each selected component program
that are included in the computer program.
39. The method of claim 38,
wherein the step of determining whether the selected component program
satisfies one of the determined configuration requirements includes the
step of invoking the selected component program and having the invoked
selected component program determine whether the invoked selected
component program satisfies at least one of the determined configuration
requirements; and
wherein the step of including the selected component program in the
computer program includes the step of, when the invoked selected component
program satisfies one of the determined configuration requirements, having
the invoked selected component program include the invoked selected
component program in the computer program.
40. The method of claim 38,
wherein the step of including the selected component program in the
computer program includes the step of including the selected component
program as a layer in the computer program;
wherein a first of the component programs that is included in the computer
program comprises a bottom layer of the computer program;
wherein each additional one of the component programs that is included in
the computer program comprises a higher layer of the computer program; and
wherein a last of the component programs that is included in the computer
program comprises a top layer of the computer program.
41. A computer system for configuring a computer module from a plurality of
component routines by determining whether each of the plurality of
component routines should be included in the computer module, the computer
system comprising:
a plurality of component routines;
a component routine selector for performing the following steps for each of
selected one of the component routines:
determining configuration requirements imposed by each of the component
routines that is already included in the computer module;
determining whether the selected component routine satisfies at least one
of the determined configuration requirements; and
when the selected component routine satisfies one of the determined
configuration requirements, including the selected component routine in
the computer module. |
|
|
|
|
Claims  |
|
|
Description  |
|
|
TECHNICAL FIELD
The present invention relates generally to the field of device drivers and,
more particularly, to a method and system for configuring and executing
device drivers.
BACKGROUND OF THE INVENTION
A computer system typically is connected to various peripheral devices,
which may include disk drives, tape drives, printers, and modems. The
computer system has an operating system that provides an interface between
an application program and these devices. The operating system receives
from the application program a request to access one of the devices and
translates this request into a request that will be understandable by that
device. The operating system sends the translated request to the device
and typically informs the application program when the requested access is
complete.
The portion of the operating system that translates a request to access a
device and controls communications with that device is typically referred
to as a device driver. For example, an application program may request the
operating system to read a file stored on a disk drive. The operating
system would invoke a device driver provided for the disk drive and send
the device driver this read request. The disk device driver would
translate the read request by determining the actual disk location at
which the file is stored, and would send the read request to the disk
drive. The disk drive would then service the read request by reading the
disk at the determined actual disk location, and then inform the device
driver upon completion. The device driver would then inform the
application program that the request has been serviced.
FIG. 1 is a block diagram illustrating the prior art use of a device driver
in a computer system. The computer system comprises a computer 100 and a
plurality of devices 113, 114, 115. The computer 100 includes a memory
loaded with various application programs 101 and an operating system 102.
The application programs 101 request services of the devices through the
operating system 102. The operating system 102 receives such a request and
invokes an appropriate device driver 103, 104, 105 to service the request.
The device driver 103, 104, 105 then translates the request and sends it
to the device 113, 114, 115, respectively. It should be noted that,
although a device driver can correspond to any number of devices, only one
device for each device driver is shown for simplicity of explanation.
Prior device drivers typically have been developed by the manufacturer of
each corresponding device. The developer of the operating system typically
publishes a specification of the interface between the operating system
and a device driver. The manufacturer of the device then develops the
device driver necessary to communicate with its corresponding device using
this specification. The manufacturer then distributes the device driver to
its customers.
After developing the device driver, the manufacturer of the device will
often add various features to the device driver to enhance the
marketability of the device. For example, a manufacturer of a disk drive
may provide a device driver with data compression, data encryption, or
disk caching options. Unfortunately, as more options are added to the
device driver, the device driver becomes more complex. As the complexity
of a device driver increases, the more difficult it becomes for a
manufacturer to modify and test the device driver. For example, the
addition of data compression, data encryption or disk caching typically
requires changes to be made throughout the device driver code in order to
accommodate these options.
An additional problem is that the complexity of distributing device drivers
increases when the device manufacturer integrates third party software
into its device driver. For example, if a third party develops a
particularly efficient data compression program, the third party developer
may sell the program to various device manufacturers. Each manufacturer
would then integrate the data compression program into its own device
driver. Once the integration is complete, each manufacturer would then
distribute its new device driver directly to its customers or indirectly
through the operating system developer when a new version of the operating
system is released.
SUMMARY OF THE INVENTION
It is an object of the present invention to provide a method and system in
which a device driver is dynamically configured.
It is another object of the present invention to provide a method and
system for organizing a device driver into layers of component drivers,
each of which imposes configuration requirements during configuration of
the device driver.
It is another object of the present invention to provide a method and
system for configuring a device driver based on configuration requirements
of component drivers which compose the device driver.
It is another object of the present invention to provide a method and
system in which a device driver can be configured to include new features
without the need for the device manufacturer to integrate the new
features.
It is another object of the present invention to provide a method and
system in which new features developed by third parties can be dynamically
configured into a device driver.
It is another object of the present invention to provide a method and
system for configuring a device driver based on configuration requirements
of new features provided.
It is another object of the present invention to provide a method and
system wherein access to a device is allowed only when all configuration
requirements of the device driver have been satisfied.
These and other objects, which will become apparent as the invention is
more fully described below, are obtained by a method and system for
configuring a device driver described as follows. In a preferred
embodiment, the device driver is organized in layers of component drivers
that each perform a function (e.g., disk caching) used in accessing a
device. When accessing a device, a top layer component driver of the
device driver is first invoked. Each component driver performs its
function and potentially invokes a next lower layer component driver down
to a bottom layer component driver.
A device driver is configured by first selecting a component driver to be
included as the bottom layer and continuing to select higher level
component drivers until the top layer component driver is included. In a
preferred embodiment, at computer startup or restart, the operating system
invokes each component driver to determine whether to select the component
driver to be included as a layer in the device driver. Each component
driver is or is not selected according to existing device-specific
information based on characteristics of the device and, in some cases,
based on configuration requirements of component drivers previously
included as lower layers. Each selected component driver indicates those
configuration requirements that it satisfies, and indicates any
configuration requirements to be imposed on component drivers yet to be
included as higher layers.
When a component driver is selected, it stores a reference to itself in a
call-down table for the device driver. The call-down table stores the
order in which the selected component drivers are invoked. When accessing
a device, the operating system first invokes the component driver
identified by the top reference in the call-down table for that device.
Each component driver in turn potentially invokes the component driver
identified by the next lower reference in the call-down table. The
component drivers identified in the call-down table are typically only
invoked to perform the device access if all configuration requirements
have been met in configuring the device driver.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram illustrating the prior art use of a device driver
in a computer system.
FIG. 2 is a block diagram illustrating components of the present invention.
FIG. 3 is a block diagram showing a sample disk drive device driver.
FIG. 4 is a block diagram illustrating the data structures that support the
selection and configuring of component drivers.
FIG. 5 is a flow diagram of the request routine performed by the
Input/Output System in the present invention.
FIG. 6 is a flow diagram of the execution of a sample component driver.
FIG. 7 is a block diagram illustrating how the driver configuration routine
is performed by the Input/Output System in the present invention.
FIG. 8 is a block diagram showing a call-down table entry in the call-down
table and a device-type entry in the device control block.
FIG. 9 is a flow diagram of a device driver configuration routine.
FIG. 10 is a flow diagram of a component driver selection routine.
FIGS. 11A and 11B are block diagrams illustrating sample configurations of
various device drivers.
FIGS. 12A and 12B are block diagrams showing the contents of the call-down
table corresponding to different configurations of a device driver.
DETAILED DESCRIPTION OF THE INVENTION
The present invention configures a device driver by selecting appropriate
component drivers to be included as layers in the device driver. During
configuration, starting with a bottom layer and continuing to a top layer,
each component driver is selected or not selected based on device-specific
information and potentially based on configuration requirements of
previously included lower layer component drivers.
Each selected component driver indicates configuration requirements that
must be satisfied by higher layers. Each component driver also indicates
lower layers' configuration requirements that it satisfies. When an
application program requests access to a device, the selected component
drivers are invoked to perform the device access only if all of these
configuration requirements have been satisfied.
As an example, a component driver that requires physical disk addressing
(e.g. sector number) would indicate a configuration requirement
corresponding to the physical disk addressing. If a selected component
driver satisfies the physical disk addressing configuration requirement,
then it would indicate that the requirement has been satisfied. If no
component drivers so indicate during configuration of the device driver,
the configuration requirement for physical disk addressing remains
unsatisfied and access to the device related to the resulting device
driver will not be granted to an application program.
FIG. 2 is a block diagram illustrating components of a computer system
having device drivers configured during startup or restart in accordance
with the present invention. As a result of this configuration, the
computer system in FIG. 2 functions as follows. An application program 200
formulates Input/Output (I/O) requests and passes the requests to the
operating system 201 through an application program interface 202. The
application program interface 202 provides the application program 200
with access to the operating system 201. It should be noted that
application programming interfaces are well known in the computer field,
and are specific to the operating system associated therewith. When the
application program interface 202 receives an I/O request, it invokes the
input-output system (IOS), passing it the request.
The input-output system determines which device driver 204, 205 can service
the request depending on which device 208, 209 is identified in the
request. Device driver 204 comprises component drivers 210 and 211 through
212, and device driver 205 comprises component drivers 220 and 221 through
222. Within the device drivers, the component drivers 210 and 220 are the
top layers and component drivers 212 and 222 are the bottom layers. Upon
receiving the I/O request, if all configuration requirements have been
satisfied in configuring the device driver for the requested device, the
component drivers in the device driver are invoked and passed the I/O
request. Initially, the input-output system invokes the top layer
component driver, passing it the request. The top layer component driver
performs component driver specific functions and invokes when appropriate
the next lower layer component driver, passing it the request. The next
lower layer component driver performs its own component driver specific
functions and invokes when appropriate the next lower layer component
driver, passing it the request, and so on. Finally, the bottom layer
component driver interacts with the peripheral device, typically through a
device adapter (not shown). Device adapters are well known in the computer
field for interfacing between a computer system and a peripheral device.
FIG. 3 is a block diagram showing a sample disk drive device driver that is
configured by the present invention. The disk drive device driver would be
configured by the present invention as, for example, the device driver 204
if the device 208 were a disk drive. The disk drive device driver is
implemented to perform synchronous I/O includes as component drivers which
satisfy the configuration requirements of the disk drive, a data
encryption component driver 301, a data compression component driver 302,
and a disk component driver 303. The data encryption component driver
encrypts or decrypts data and passes requests to the data compression
component driver. The data compression component driver 302 works in an
analogous manner to the data encryption component driver. That is, the
data compression component driver compresses or decompresses data and
passes the request along to the disk component driver. The disk component
driver controls the reading and writing of the data to the disk drive
through a disk drive adapter.
Upon receiving a write request to access the disk drive, for example, the
IOS invokes the data encryption component driver, passing it the request
to write data.
When requested to write data, the data encryption component driver encrypts
the data and then invokes the data compression component driver, passing
it the write request along with the encrypted data. The data compression
component driver compresses the encrypted data and then invokes the disk
component driver, passing it the write request along width the compressed
data. In the case of the write request, the disk component driver 303
controls the disk drive to write the data to the disk. Upon completion,
the component drivers each return control to the next higher layer
component driver, and the top layer component driver returns to the IOS.
FIGS. 4, 5 and 6 illustrate the operation of the present invention once
each device driver is configured to include the selected component
drivers. Although configuration of device drivers will be described
presently in detail with reference to FIGS. 7, 9, 11A and 11B, FIGS. 4, 5
and 6 and the discussion thereof are directed to execution of device
drivers to process I/O requests, and based on the assumption that the
device drivers have already been configure | | |