Hardware Platform Overview

  • Memory is storage space that the processor can directly access. In order to speed up memory access, computer systems usually provide some caches (Cache), which are usually managed by hardware.
  • An I/O device consists of an I/O controller and a physical device, and the processor manages the physical device through the I/O controller. The I/O controller is mainly composed of control and status registers (CSR) and data registers. The processor obtains the device status by reading the CSR, controls the device action by writing the CSR, and exchanges data by reading and writing data registers. The kernel typically abstracts an I/O device into a set of registers, and assigns a register an I/O address. The processor accesses I/O registers through I/O addresses.
  • Many device registers in modern computer systems can be mapped into the physical address space. At this point, each device register has a physical memory address. I/O in this way is called memory-mapped I/O. It is convenient to use but consumes physical memory addresses.
  • Usually, the external memory is abstracted into an array of data blocks, and each data block has a serial number. The processor can randomly read and write any data block in the external memory through the serial number. The operation of external memory is usually in block units, so it is also called external memory as a block device. Correspondingly, other I/O devices are called character devices.
  • The bus is responsible for connecting processors, memory, and I/O controllers. Commonly used buses are ISA, PCI, PCI-E, AGP, ATA, SCSI, etc. The bus is also responsible for detecting and enumerating the devices attached to it.
zh_CNZH-CN