Defining block devices
There are two major ways that the kernel exchanges data with external devices. One method is to exchange one character at a time with the device. Devices addressed through such methods are known as character devices. Character devices are addressed using a stream of sequential data. They can be accessed by programs to perform input and output operations one character at a time. Due to the absence of random access methods, managing character devices is simpler for the kernel. Devices such as keyboards, text-based consoles, and serial ports are all examples of character devices.
Communicating through one character at a time is acceptable when the volume of data is low, such as when using serial ports or keyboards. A keyboard can only accept one character at a time, so the use of a character interface makes sense. But this approach becomes untenable when transferring large volumes of data. When writing to physical disks, we expect them to be able to address more...