|
|
In DDI versions before version 8,
as well as SCO OpenServer 5 and most other UNIX operating systems,
the device number is the dev_t
data type
formed by concatenating the major and minor numbers; see
``Major and minor numbers''.
The device number is used by the operating system
to identify the particular driver and device
that is being accessed.
Older DDI versions use a 32-bit dev_t
value,
split between a 14-bit major number
and an 18-bit minor number.
SCO OpenServer 5 uses a 16-bit r_dev
value,
split between a 8-bit major number
and an 8-bit minor number.
Minor numbers reflect the selected instance of a device plus an arbitrary amount of driver-specific information about modes or subcomponents of the device, so the 32-bit device number may be inadequate for large configurations. For example, if a driver uses 512 minor numbers per device, the 18-bit minor number means that no more than 512 devices for that driver can be supported on a system; the limit for the 8-bit minor number is even smaller.
To get around these limits,
DDI 8 does not use the dev_t
data type
to identify the device.
Instead, the resource manager key
identifies the selected device instance
(taking the place of the relative major number
and whatever part of the minor number
the driver uses to select a device instance).
The channel number
replaces the per-device portion of the minor number,
to hold driver-specific information
such as channel types, sub-component addresses, and modes.
See
``Resource manager database'',
``Device instance'',
and
``Channel number''.
For the SVR5 release, the file system sees major and minor numbers and displays them in ls displays and returns from the stat system call, although in reality there are no major or minor numbers used in the kernel. Instead, the device number is an abstraction that allows the operating system to provide correct instance and channel information to the drivers.
The idmknod utility creates these apparent major and minor numbers by mapping the channel number and device instance into the existing device number infrastructure:
This allows increased device support through multiple major numbers without actually exposing the drivers to those major numbers.
The SVR5 filesystem limits the device number to 32 bits. Future releases of SVR5 may include changes to the I/O infrastructure that completely replace device numbers with the instance and channel abstractions. This would enable scaling to very large numbers of devices.