Experts Only! Hard Question Ahead!!!!

SunOS5.8 is a radical departure from SunOs4.X in many ways. one of the important differences is the handling of devices. Adding devices under SunOS4.x required a kernel reconfiguration, recompliation and reboot. Under SunOS5.X, this has changed with the ability to add some drivers on the fly. However, both systems still use the concept of major and minor numbers when dealing with devices.

What do major and minor numbers mean under both SunOS4.X and SunOS5.8?

Told ya it was tricky.... Any experts out there??

-Michelle

All devices in UNIX are accessed as files. Providing this abstraction requires some pretty complicated programming in the kernel. The programs are called device drivers. Once you write a device driver, you must add it to the kernel and make it available to user processes to access the device in question. In the process of incorporating the device driver into the kernel, you add the driver entry points to the device switch table. The device switch table is basically a muti-dimensional array. The major number of a device is the index into the array to access the device driver entry points. The meaning of the device minor number depends on the device driver. It can be used anyway the driver writer wants to use it. However, in most cases, it is used to differentiate between multiple instances of the same type of device.