5.9Device drivers
A device driver is a software layer that makes a hardware device respond to a
The TOE supports many different I/O devices, such as disk drives, tape drives, and network adapters. Each of these hardware devices can have its own methods of handling data.
The device driver subsystem provides a layer of abstraction to other kernel subsystems, so they can interact with hardware devices without being cognizant of their internal workings. Each supported hardware device has a device driver that is loaded into the kernel during system initialization. The device driver subsystem provides access to these supported hardware devices from user space through special device files in the /dev directory. Valid operations on the
Other kernel subsystems, such as File, I/O, and the Networking subsystems, have direct access to these device driver functions because the device driver is loaded into the kernel space at system initialization time. The File, I/O, and Networking subsystems interact with these device driver functions to drive the hardware device.
For example, when a file is to be written to a hard drive, data blocks corresponding to the file are queued in the buffer cache of the File and I/O subsystem. From there, the File and I/O subsystem invokes the function to flush the data to the desired device. The device driver corresponding to that device then takes that data and invokes the
Device drivers provide a generic interface to the rest of the kernel consisting of device methods for the start- up of a device (open method), shutdown of a device (release method), flushing contents of internal buffers (flush method), reading data from the device (read method), writing data to the device (write method), and performing
SLES running on System p and System z supports virtual devices. From the perspective of SLES, these devices are treated no differently than other devices. That is, the SLES kernel thinks that it is directly controlling devices. However, the z/VM on System z map these virtual devices to real devices, allowing SLES access to devices supported by z/VM when running on System z. The following subsections briefly describe this virtualization of I/O, followed by brief descriptions of device drivers for character and block devices.
5.9.1I/O virtualization on System z
SLES runs on System z as a guest of the z/VM operating system. The z/VM operating system can provide each end user with an individual working environment known as virtual machine. Virtual machines communicate with the outside world through virtual devices. The Control Program transparently handles mapping of virtual to real devices and resources.
5.9.1.1Interpretive-execution facility
The
The interpreted machine is viewed as a virtual system called the guest. The term host refers to the real machine and to the control program, which both manages
152