Accessing hard disk

2020-06-28 15:54发布

问题:

How does the CPU manage to address the distant memory locations on a several hundred giga bytes of hard disk with registers and data bus of 32 bits only.

回答1:

RAM is directly mapped into the processor's address/data bus. Hard drives are not. They interface to a disk controller (IDE, SATA, SCSI, etc). The disk controller copies data to/from RAM in smaller blocks where the CPU works with it.

There are various addressing schemes for Hard-disks as well, such as LBA, CHS etc, which themselves run into limitations from time to time.

Hence, the processor only needs to access the caches and RAM as the HDD itself is too slow for it. The 32 bit CPU can access just 4 GB of memory at a time, which is the limit on the size of physical memory on these systems. Hence, the sequence is

HDD-->RAM-->Caches-->Processor

Read this and this.