Waste less time on Facebook — follow Brilliant.
×
Back to all chapters

Computer Memory

How memory actually works, layer by layer.

Retrieving Data from a Computer

         

There are various devices that can store data on a computer. For example, hard disk drives (HDD), solid state drives (SSD), random access memory (RAM) modules, optical disks and drives, etc. We will go over key characteristics that are important from the software’s point of view. (We will not cover how each device is made or works.)

CDs, DVDs, and Blu-rays are optical disks that can hold \(700 \text{MB} - 50 \text{ GB}\) of data, and are often used to distribute music, movies, and game software. ROM disks such as DVD-ROM are read-only and the stored data cannot be changed or overwritten. Rewritable disks such as DVD-RAM disks are read-write and the stored data can be changed or overwritten.

Assume that there is a video game software distributed on DVD-ROM disks. From the following, what is NOT correct regarding the typical use of optical disks when distributing video game software?

HDDs are spinning magnetic disks that can hold up to a few TB of data. They are often used as the main storage on computers to hold files and folders. The data access speed is fast for sequential accesses and becomes slower for random access. Sequential access is reading or writing from a continuous chunk of data. Random access is reading or writing from different places on the disk.

Given an HDD where the sequential access speed is \(100 \text{ MB/s}\), which has an overhead of 10 ms when accessing a different place (random access overhead), and assuming that files are placed randomly within the drive and each file is stored continuously without any fragmentation, which of the following is correct regarding the speed of (A) and (B)?

  • (A) read 200 files, \(50 \text{ kB}\) each (\(10 \text{ MB}\) total)
  • (B) read 20 files, \(500 \text{ kB}\) each (\(10 \text{ MB}\) total)

RAM is a semiconductor module that stores data within an integrated circuit that can hold up to a few GB of data. RAM is typically about 100 times faster than HDDs, and about 100 times more expensive for the same amount of data capacity. RAM does not have a significant speed decrease on random access. RAM is a volatile memory which can only hold data when power is provided, and will lose data when power is removed. Devices like HDDs and DVDs are non-volatile since they can hold data when power is removed.

From the following, what is NOT correct regarding volatility of devices?

Considering characteristics such as data capacity, access speed, volatility, read-only or read-write, the modern computer architecture uses HDDs or SSDs to store permanent data, and RAM for intermediate data. Programs will load files from the HDD or SSD to RAM, use RAM to calculate, and store necessary data in files on the HDD or SSD. RAM is accessed frequently from programs, and therefore it is called the “main memory”. In practical programming environments, when we use the word “memory”, we often mean RAM.

Given RAM and HDD where the access speed is 10 GB/s and 100 MB/s respectively, we want to read a 3MB file 25 times. Ignoring random access overhead, which answer is correct regarding the speed of (A) and (B)?

  • (A) load the file from the HDD to RAM once, and read from RAM 25 times.
  • (B) read directly from the HDD 25 times.
×

Problem Loading...

Note Loading...

Set Loading...