previous | start | next

Comments

Note 1: Reading and writing device or processor registers can't be done from code written in a high level language such as C.

So the code above for read_control_register() must be written directly in machine (or assembler) instructions.

Note 2: The code above is typical, but somewhat simplified device driver for the printer.

Problem: Device driver writers need help! The machine code to read and write device registers must know the addresses of those registers.

Design: The operating system can be designed to provide a service to device drivers. The OS can relieve the printer device driver of the need to know the device register addresses by providing routines for reading and writing these registers to the device driver.

In Minix, this service is provided to the device drivers in the kernel of the operating system.

Summary: The operating system can be designed to make the hardware easier to use and control even at the low level requirements of device drivers by providing these services.



previous | start | next