Understanding Modern Computer Memory - A Primer

Modern computers have Random Access Memory (RAM), which is utilized in machine code and data storage. RAM is used alongside the CPU and hard disks in order to store and retrieve information. Utilizing the CPU, RAM, and disks has performance trade-offs. In a modern computer at the time of writing, we have the following generic, rounded timings for some common operations in computers:

Data Storage Type

Timing

L1 (Processor Cache) Reference

1 ns

L2 (Processor Cache) Reference

4 ns

Main Memory Reference

100 ns

SSD Random Read

16 μs

7200 RPM HDD Disk Seek

2 ms

 

As you'll notice from the table, the different storage types have wildly differing timings for different portions of a modern computer's architecture. New computers have KBs of L1 cache, MBs of L2 cache, GBs of main memory, and TBs of SSD/HDD. As we recognize that these different types of data storage vary significantly in terms of cost and performance, we need to learn how to use each of them effectively in order to write performant code. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.148.210