Browse Prior Art Database

Support of a Dynamically Managed Device Switch Table on a UNIX Operating System

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

Publishing Venue

IBM

Related People

Coley, ML: AUTHOR [+2]

Abstract

A mechanism is required to dynamically add, remove or query device driver entries in a dynamically managed device switch table. This article describes such a mechanism.

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

Support of a Dynamically Managed Device Switch Table on a UNIX Operating System

       A mechanism is required to dynamically add, remove or
query device driver entries in a dynamically managed device switch
table. This article describes such a mechanism.

      Traditional UNIX* operating systems provided statically
built-in device drivers specified by the processing of a master and
system file at operating system Make time.  This required that a new
kernel be built whenever a device driver was to be added or deleted
and that the system be rebooted using the new kernel.  This
rebuilding of the kernel whenever device support changed is not user
friendly nor is it easy to handle from a maintenance standpoint.  The
dynamic device driver switch table described in this article is a
fundamental part of the AIX** capability to dynamically add or remove
device drivers from an operating kernel without the kernel being
rebuilt or the system re-booted.

      Described is a mechanism that is used to manage a dynamically
extendible device driver switch table.  A set of new kernel services
were introduced to the AIX kernel to manage this device switch table.
A devswadd service is provided to allow a device driver's
configuration routine the capability to add the device driver to the
device switch table.

      A devswdel service is provided to allow a device drivers
termination routine to remove its entry from the device switch table
prior to the device driver being unloaded from the kernel.  A
devswqry service is provided to query entries in the device switch
table. This service returns the state of the device switch table
entry for a given major number.  It can return Not Used, or
information about the type of device driver that is using the device
switch entry, such as block Device, Character Device, MPX device, TTY
device, Console device, etc.  It will also indicate if the device
driver using that entry has any current users (has a device in the
open state).  This device switch query operation is used by the
filesystem to provide the correct device driver semantics for file
system operations.

      An internal devsw_init kernel function is provided to
initialize the dynamic device switch table during kernel
initialization.  The AIX kernel has a small number of static or
built-in device drivers that are needed to get the dynamic
configuration of the system started.  A static device switch table is
defined for this purpose and is built at kernel link edit time.
During kernel runtime initialization, the devsw_init routine is
called and allocates a dynamic device switch table from unpinned
kernel memory. It uses a configurable option to determine the maximum
size of the dynamic table. It then copies the entries from the static
device switch table into the new dynamic one, pinning the used
entries in memory so they will not page fault when accessed.

      The devswadd kernel service is used by device driver
configurat...