Computer Memory

Primary Memory

The CPU accesses primary memory during operations. Primary memory is volatile, which means unsaved memory will not be kept after the computer is shut down. (Dale & John)

The followings are examples of primary memory which are arranged from the closest to the farthest from CPU.

  • Registers
  • Cache
  • RAM
  • Virtual Memory
Register

learn detailed information from CPU, ALU, CU, and Registers

Cache Memory

Cache memory is a type of small, high-speed, store memory inside CPU and store data which will be frequently reused by CPU. It is quicker for CPU to access Cache memory than access RAM to get data since Cache memory is closer to CPU. CU will check cache memory first automatically before searching data in RAM. When a CPU is able to fetch desired data from the cache memory, it is called a Cache hit; otherwise, it is called a Cache miss, and CPU has to get data from RAM.

There are three types of cache memory: Level 1 (L1), Level 2 (L2), and Level 3 (L3). L1 is usually inside CPU, an it is the smallest and fastest type of cache memory. Its size is range from 8 KB to 64 KB. L2 and L3 is larger than L1 and located usually outside CPU. Sometimes, L2 is inside CPU with L1. It takes more time for CPU to access L2 and L3 than L1. The more L2 and L3 available within a computer, the quicker the computer can operate. (Dale & John)

The following graph shows that cache memory is a high-speed memory. And the smaller a memory storage device’s size, the faster its speed.

屏幕快照 2016-10-11 下午8.01.13.pngRelationship between speed and size
Random Access Memory (RAM)

RAM contains all the instructions and data a computer has operated since opened. RAM is volatile, which means the unsaved data will lose if the power is shut down. RAM can quickly access to CPU. The value stored in RAM is changeable, which means we can not only read information from RAM, but also write data to RAM. RAM has dynamic data inside. RAM and ROM connected with CPU through buses. It is better if RAM has some free place, otherwise, the computer will go slow. DRAM is dynamic RAM. SRAM is static RAM. DRAM is faster than SRAM.

Virtual Memory

Virtual memory is the illusion that there is no restriction on program size since the entire process do not need to be in memory at the same time.

Secondary Storage

Secondary storage is non-volatile. Information is secondary storage can be copied but can not be changed.

Read Only Memory (ROM)

In addition to RAM, there is a second type of memory called ROM. Information in ROM are stored in BOIS (Basic Input Output System), which can boot(direct) the operating system of computers when computers start-up. ROM is static. The information is ROM is written during its creation by computer engineers, as long as a ROM is produced, information inside it cannot be changed or rewritten anymore. ROM is non-volatile, which means that we will not lose any information if the computer is shut down. ROM contained data for a computer to start up with its non-volatility.

Difference between ROM, RAM, and Cache

屏幕快照 2016-10-11 下午8.46.43.pngSummarized by the author Iris with the reference of David's blog post.

Cache Memory: fast, small, volatile

Works Cited

Hensley, Sydney. “Intel’s Most Advanced, –Most Powerful 32 Bit Processor”. Slideplayer.com. N.p., 2015. Web. 11 Oct. 2016.

Dale, Nell and John Lewis. Computer Science Illuminated. Print.

留下评论