0
$\begingroup$

Everyone knows that the speed of the CPU is many times faster than the speed of RAM, whereas in this case the processor executes two read or write commands in memory running in a row? As I assume, due to the high clock frequency of the CPU, there will be some delay between such commands, because the generation of the next clock signal is faster than the memory access time and data movement over the bus. If I'm wrong, please explain how the CPU works in such situations.

$\endgroup$

1 Answer 1

0
$\begingroup$

When you read data from RAM, it takes time for the memory chip to locate and read the data, and then more time to send it to the processor. So there is no “delay” when you read different data, it just takes time.

Actually multiple reads can be faster. Consider a memory chip with a 64 bit data bus and a processor with 512 bit cache lines. The processor decides to read a complete cache line at location x. Instead of “read from address x, read from address x+8 byte” it says “read from address x, read from the next address, read from the next address…”. That means the memory chip only locates the data once, and moves data from deep inside the chip to the data output only once, saving lots of time. And transmitting eight bytes of data has overhead to establish a connection to the processor, that is done once instead of eight times. So multiple reads from consecutive addresses will be somewhere between faster and a lot faster.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.