Favorite content:
Why is register faster than memory?
Favorite content:
Http://www.ruanyifeng.com/blog/2013/10/register.html
To learn two points:
1: In contrast, registers are inside the CPU, which of course reads faster.
2:
Registers work in a very simple way, with only two steps: (1) Find the relevant bits, (2) read the bits.
The way memory works is much more complicated:
(1) A pointer to the data is found. (The pointer may be stored in the register, so this step includes the full work of the Register.) )
(2) Send the pointer to the Memory management Unit (MMU), which translates the virtual memory address into the actual physical address by the MMU.
(3) Send the physical address to the memory controller and the memory controller to find out which memory slot (bank) the address is on.
(4) Determine which memory block (chunk) the data is on, and read the data from that block.
(5) The data is sent back to the memory controller, then sent back to the CPU, and then started to use.
The workflow of memory is a lot more than the register. Each step creates a delay, which accumulates to make the memory much slower than the register.
Description: 1/22 content reprinted from: http://www.ruanyifeng.com/blog/2013/10/register.html
Operating System Principles Section