Computer Memory

30 minutes Intermediate 58 Questions
Topic Overview

6. Computer Memory RAM, ROM, Cache Memory, Virtual Memory, Secondary Storage Devices,

Complete Topic Overview

6. Computer Memory


Introduction to Computer Memory


Computer memory refers to the storage space inside a computer where data, instructions, and programs are stored so that the processor can access them when needed.

Memory plays a critical role in the functioning of a computer because the CPU can only process data that is available in memory. When a program is executed, it is first loaded into memory, and then the CPU performs operations on that data.

Computer memory is generally divided into two main categories:

  • Primary Memory (Main Memory)
  • Secondary Memory (Secondary Storage)

Primary memory is directly accessed by the CPU, while secondary storage is used for long-term data storage.


RAM (Random Access Memory)


Definition

Random Access Memory (RAM) is a type of primary memory used to store data and programs that are currently being used by the computer.

It is called random access because any memory location can be accessed directly without going through other memory locations.


Characteristics of RAM

Volatile Memory

RAM is volatile, which means the data stored in RAM is lost when the computer is turned off.

Fast Access Speed

RAM provides very fast access to data compared to secondary storage devices such as hard drives.

Temporary Storage

It stores data temporarily while programs are running.

Direct CPU Access

The CPU directly reads from and writes to RAM during processing.


Types of RAM

Dynamic RAM (DRAM)

DRAM stores each bit of data in a capacitor and needs to be refreshed constantly to maintain the stored information.

Characteristics:

  • Slower than SRAM
  • Cheaper
  • Used as main system memory

Static RAM (SRAM)

SRAM stores data using flip-flop circuits, which means it does not need constant refreshing.

Characteristics:

  • Faster than DRAM
  • More expensive
  • Used mainly in cache memory

Importance of RAM

RAM significantly affects a computer’s performance because:

  • It determines how many programs can run simultaneously.
  • It affects the speed of program execution.
  • Larger RAM allows smoother multitasking.

ROM (Read Only Memory)


Definition

Read Only Memory (ROM) is a type of non-volatile memory used to store permanent instructions required for starting and operating the computer.

Unlike RAM, data in ROM remains stored even when the computer is powered off.

ROM typically stores firmware, which is software permanently embedded in hardware devices.


Characteristics of ROM

Non-Volatile Memory

Data is not lost when power is turned off.

Permanent Storage

Information is written once and rarely changed.

Used for Booting

ROM contains instructions required to start the computer system.


Types of ROM

PROM (Programmable Read Only Memory)

PROM is a type of ROM that can be programmed once after manufacturing.

Once programmed, the data cannot be changed.

EPROM (Erasable Programmable ROM)

EPROM can be erased using ultraviolet light and then reprogrammed again.

EEPROM (Electrically Erasable Programmable ROM)

EEPROM can be erased and rewritten using electrical signals without removing it from the computer.

Modern computers commonly use EEPROM or Flash memory.


Cache Memory


Definition

Cache memory is a very small but extremely fast memory located close to or inside the CPU.

It is used to store frequently accessed data and instructions so that the CPU can retrieve them quickly.


Purpose of Cache Memory

Cache memory improves system performance by reducing the time needed for the CPU to access data from the main memory.

Instead of repeatedly accessing RAM, the CPU first checks whether the required data is available in the cache.

If the data is found in cache memory, it can be accessed much faster.


Characteristics of Cache Memory

Very High Speed

Cache memory is faster than both RAM and secondary storage.

Small Size

Cache memory is much smaller compared to main memory.

Expensive

Because of its speed, cache memory is more expensive to manufacture.


Levels of Cache Memory

L1 Cache

  • Located inside the CPU
  • Smallest but fastest cache

L2 Cache

  • Larger than L1
  • Slightly slower

L3 Cache

  • Shared between CPU cores
  • Larger but slower than L1 and L2

Virtual Memory


Definition

Virtual memory is a memory management technique that allows a computer to use part of the secondary storage as if it were RAM.

It enables the system to run programs that require more memory than the physically available RAM.


How Virtual Memory Works

When RAM becomes full, the operating system temporarily transfers some data from RAM to a section of the hard disk called the paging file or swap space.

When that data is needed again, it is moved back into RAM.

This process is known as paging.


Advantages of Virtual Memory

Allows Running Large Programs

Programs larger than the available RAM can still run.

Improves Multitasking

Multiple programs can run simultaneously.

Efficient Memory Management

The operating system can manage memory resources more effectively.


Disadvantages of Virtual Memory

Slower Performance

Since hard drives are much slower than RAM, accessing data from virtual memory reduces system speed.

Increased Disk Usage

Frequent swapping between RAM and disk may affect performance.


Secondary Storage Devices


Definition

Secondary storage devices are used to store data permanently in a computer system.

Unlike RAM, data stored in secondary storage remains even when the computer is turned off.

These devices are used for storing:

  • Operating systems
  • Software applications
  • Documents
  • Multimedia files

Characteristics of Secondary Storage

Non-Volatile

Data is preserved without power.

Large Storage Capacity

Secondary storage can store large amounts of data.

Slower than Primary Memory

Access speed is slower compared to RAM.


Types of Secondary Storage Devices

Hard Disk Drive (HDD)

A Hard Disk Drive stores data on magnetic disks called platters.

Characteristics:

  • Large storage capacity
  • Mechanical moving parts
  • Slower than SSD

Solid State Drive (SSD)

A Solid State Drive stores data using flash memory chips instead of moving parts.

Characteristics:

  • Faster than HDD
  • More durable
  • Lower power consumption

Optical Storage Devices

Optical devices store data using laser technology.

Examples include:

  • CD (Compact Disc)
  • DVD (Digital Versatile Disc)
  • Blu-ray Disc

These devices are commonly used for media distribution and data backup.

USB Flash Drive

A USB flash drive is a portable storage device that uses flash memory and connects to a computer via a USB port.

Characteristics:

  • Small and portable
  • Rewritable
  • Commonly used for data transfer

Memory Cards

Memory cards are small storage devices commonly used in:

  • Smartphones
  • Digital cameras
  • Tablets

Examples include:

  • SD cards
  • MicroSD cards

Computer memory is a crucial component of a computer system because it enables the storage and retrieval of data required for processing. Different types of memory such as RAM, ROM, cache memory, virtual memory, and secondary storage devices work together to ensure that the computer system operates efficiently and can store both temporary and permanent information.

21
Which cache level is shared between CPU cores?
Hard 3 Marks
Think about which cache level provides a common resource for multiple cores.
A L1 cache
B L2 cache
C L3 cache
D All cache levels are shared
22
Why is cache memory more expensive than RAM?
Medium 2 Marks
Speed comes at a price — what makes cache so fast also makes it costly.
A Because it uses optical technology
B Because it is imported from other countries
C Because of its very high speed which requires expensive manufacturing
D Because it has a larger storage capacity
23
What is virtual memory?
Medium 2 Marks
Virtual memory tricks the system into thinking there is more RAM than physically exists.
A A type of RAM installed on the motherboard
B A memory management technique that uses part of secondary storage as if it were RAM
C The fastest type of cache memory
D Another name for ROM
24
How does virtual memory work?
Medium 2 Marks
Think about the OS moving data back and forth between RAM and hard disk.
A It increases the physical size of RAM chips
B When RAM is full the OS transfers some data to a hard disk section called the paging file and retrieves it when needed
C It permanently compresses RAM data to create more space
D It adds extra RAM from the network
25
What is the term for the process of moving data between RAM and the hard disk in virtual memory?
Medium 2 Marks
The name comes from the paging file — what do you call this swapping process?
A Defragmentation
B Formatting
C Paging
D Compiling
26
What is a paging file?
Medium 2 Marks
Where exactly on the hard disk does the OS store temporarily swapped-out RAM data?
A A file that stores antivirus definitions
B A section of the hard disk used as virtual memory by the operating system
C A type of ROM used for booting
D A compressed backup of RAM contents
27
What is an advantage of virtual memory?
Easy 1 Mark
What is the main problem virtual memory solves?
A It makes the hard disk faster than RAM
B It allows programs larger than physical RAM to run
C It permanently increases the size of RAM
D It removes the need for secondary storage
28
What is a disadvantage of virtual memory?
Medium 2 Marks
What happens to speed when the CPU must access data from a slow hard disk instead of fast RAM?
A It increases the cost of RAM
B It permanently deletes data from the hard disk
C It reduces system speed because hard drives are much slower than RAM
D It prevents multitasking entirely
29
What is the main purpose of secondary storage devices?
Easy 1 Mark
What type of storage keeps your files safe even after shutdown?
A To process data at high speed
B To store data permanently even when the computer is turned off
C To act as virtual memory for the CPU
D To speed up the CPU clock
30
Which of the following is a characteristic of secondary storage?
Easy 1 Mark
Think about how a hard drive compares to RAM in terms of speed and permanence.
A Volatile — data lost when power is off
B Directly accessed by CPU at very high speed
C Non-volatile with large storage capacity but slower than primary memory
D Stores only temporary data during processing
31
What is a Hard Disk Drive (HDD)?
Easy 1 Mark
HDD uses spinning magnetic disks and a moving read/write head.
A A storage device that uses flash memory chips with no moving parts
B A storage device that uses laser technology to read data
C A storage device that stores data on magnetic platters with mechanical moving parts
D A portable storage device connected via USB
32
What is a Solid State Drive (SSD)?
Easy 1 Mark
No moving parts means faster access and greater durability.
A A storage device using spinning magnetic platters
B A storage device using laser technology to read optical discs
C A storage device using flash memory chips with no moving parts
D A portable storage device connected via Bluetooth
33
Which is faster: HDD or SSD?
Easy 1 Mark
Moving parts create delays — which drive has no moving parts?
A HDD because it has larger storage
B Both are equally fast
C HDD because it uses magnetic technology
D SSD because it has no moving parts and uses flash memory
34
What technology do optical storage devices use to read and write data?
Easy 1 Mark
Think about how a CD player reads a disc.
A Magnetic fields
B Electrical signals
C Laser technology
D Flash memory chips
35
Which of the following is an example of an optical storage device?
Easy 1 Mark
Which option is read using a laser beam?
A USB flash drive
B SSD
C DVD (Digital Versatile Disc)
D SD card
36
What is a USB flash drive?
Easy 1 Mark
Think about the small stick you plug into a USB port to transfer files.
A A large magnetic disk drive for desktop computers
B A portable storage device using flash memory connected via USB port
C An optical disc that uses laser technology
D A type of RAM used for temporary storage
37
Which of the following is commonly used in smartphones and digital cameras for storage?
Easy 1 Mark
Think about the tiny card slot in a smartphone or camera.
A Hard Disk Drive (HDD)
B DVD discs
C Memory cards such as SD and MicroSD cards
D USB flash drives
38
Which secondary storage device has NO mechanical moving parts and is most durable?
Medium 2 Marks
Moving parts can break — which storage device eliminates this problem?
A HDD
B CD-ROM
C SSD
D DVD
39
Which type of memory is the fastest?
Medium 2 Marks
Which memory is closest to the CPU and specifically designed for speed?
A RAM
B ROM
C Hard Disk Drive
D Cache memory
40
Arrange the following from fastest to slowest: RAM Cache Secondary Storage
Hard 3 Marks
Speed decreases as distance from the CPU increases.
A Cache then Secondary Storage then RAM
B RAM then Cache then Secondary Storage
C Secondary Storage then RAM then Cache
D Cache then RAM then Secondary Storage
Question Palette
0/58 Answered
Showing 21 - 40 of 58
Instructions:
  • Click on an option to select your answer
  • Use the hint button if you need help
  • Track your progress with the question palette
  • Submit your answers to see results
Difficulty Distribution
Easy 10
Medium 8
Hard 2