Why can't CPUs get data directly from Hard drives?

Status
Not open for further replies.

indicium

Distinguished
Nov 24, 2009
14
0
18,510
So what I learned is that CPU have to get data like this:

HDD->RAM->CPU

And that the CPU has cache memory to store some data, same with the RAM and HDD.

The cache memory of the CPU is really fast but small.The RAM memory is fast but not as a fast as the CPU and is bigger than the CPU. And the HDD is the slowest of them all but is the biggest.

Correct me if I'm wrong >.<!

So why can't the CPU get data straight from the HDD?

 
There is no direct physical data connection between the CPU and the HDDs.
300px-Motherboard_diagram.svg.png

The CPU connects to the motherboard though the front side bus (or Hyper Transport or QPI depending on the motherboard).
The Northbridge chips handles IO duties between the CPU and RAM.
The Southbridge chip handles IO duties with HDDs.
 

indicium

Distinguished
Nov 24, 2009
14
0
18,510
So how come if the CPU wants to get something it doesn't have, why does it go through RAM first then HDD?
Why couldn't it just go to the HDD since it's connected to the motherboard :eek:?
 

4745454b

Titan
Moderator
I was going to say close, but its worse then you think seeing as the HDD data has to go through the SB and then the NB.

As I understand it, a CPU needs X from the HDD. A request is sent to the drive through all the buses. It then makes the return trip from the drive to the SB, NB, and then gets loaded into the ram. (I don't know enough about DMA to understand how this changes things.) The NB just folded into the CPU itself. If you look at the link WR2 provided the CPU now (or in the case of AMD will soon) handles all memory and GPU duties. In time, the SB might get folded into the CPU as well.
 
It might be more accurate to say that the Northbridge Memory Controller was just moved onto the CPU die.
intel-core-i7-block-diagram-small.jpg


It's still going to perform much the same way as before - just using QPI (Intel) and Hyper Transport (AMD) instead of FSB.
11369-x58blockdiagram.gif
 

werxen

Distinguished
Sep 26, 2008
1,331
0
19,310


Bingo. HDD is the slowest part in any modern computer hands down.
 

sarwar_r87

Distinguished
Mar 28, 2008
837
0
19,060
data deed from a HD is slow, like mentioned., so the CPU would have to sit idle once in a while if it tried to get data from HD directly. and as COU has small cache, it is not possible load the data on cache 1st. pointless. so the data is stored in RAM and then to CPU. as RAM is faster than HDD, it can keep the CPU relatively more busy. hence this route is always chosen :)
 

randomizer

Champion
Moderator
As mentioned by others, HDDs are slow. Obviously the data still needs to be read from it at some point, whether directly by the CPU or to be loaded into RAM - you can't avoid this. Where the difference would be most noticeable is if the CPU required access to this data more than once. The CPU caches can only hold a small amount of data, so the rest will need to be stored in RAM or read from the HDD again. It is much better to (possibly) increase the time to read data from the HDD initially and allow subsequent reads of the same data to be made from RAM than to have a slightly faster initial read but have the HDD tearing itself apart reading the same data over and over while the CPU sips coffee in Starbucks while waiting for something to do.
 

NITROGEnarcosis

Distinguished
Sep 18, 2008
78
0
18,640
Before DMA ( direct memory access ) become the norm the CPU did directly access the hard drive. This was horribly inefficient due to the cpu sitting asking the HD are you ready yet over and over while the HD slowly read the data. With DMA the CPU tells the HD read this much and put it in ram. Then the cpu is free to do any other task that is not dependent on that data. When the HD has read the requested data it sends the cpu and interrupt and the cpu then resumes doing what need to be done to the data. This has huge impacts on systems that run more than one process ( any semi modern OS aka anything new that DOS ), if you want to see the performance difference set your hard drives to polled I/O in device manager. You will cry and restart using DMA.
 
Mar 10, 2019
1
0
10
It's because of the following reasons:
  1. Lack of control hardware: A hard drive/SSD cannot be accessed easily like many other memories(RAM,ROM,etc.). They need various control commands which are used specifically for them. Thus, incorporating such complex logic in the processor makes it tricky and difficult and is thus avoided.
  2. Speed of data : The data speed (incoming/outgoing) from the hard drive is very slow. The CPU clock is not synchronised with the data speed of the hard drive and thus cannot be incorporated directly.
  3. Word length : Hard drive is accessed by serial data but CPU accesses data in parallel fashion.
Due to these reasons, hard drive cannot be directly accessed by CPU. And thus a separate module/controller is built-in for hard drive. Normally, today the module is incorporated in the southbridge chipset. That module contains control logic specifically designed for hard drive.
 
Status
Not open for further replies.