Revision Notes - 16 Computer memory
Revision Notes - 16 Computer memory
Science
Computer
memory
teachcomputerscience.co
m
1
.
Revision notes
teachcomputerscience.co
m
Introduction
Memory is the space where data and programs are stored. Data
in memory is accessed through instructions from the CPU.
Memory in a computer system is classified into primary and
secondary memory. In this article, types of memory and their
specific functions are explained.
Primary memory
The various primary memories available in a CPU are listed
below in order of its closeness to CPU:
i. Registers
ii. Cache
iii. RAM
iv. Virtual Memory
The access time of data in a memory type depends on its
closeness to the CPU. But, the closer the memory type, the more
expensive it is. The following figure illustrates the four types of
primary memories.
Cache
RAM
Slowest, largest and
Virtual Memory (in Hard disk)
least expensive memory
Figure 2: RAM
teachcomputerscience.co
m
Read only memory (ROM)
Read Only Memory (ROM) is a permanent memory that is used to
store the instructions that are executed once the computer is
switched ON. This set of instructions is called a boot process.
This is responsible for initialising the hardware and operating
system soon after the power is switched ON. The contents of
ROM are not erased even when the power is switched off. The
contents of ROM can only be read and cannot be changed.
ROM is made by interconnecting several transistors. As ROM
remembers its contents even when power is switched off, it falls
under the category of non-volatile memory. Types of ROM are:
PROM (programmable read-only memory)
PROM is manufactured as blank ROM. These chips are
inexpensive and programmed by the programmer for different
applications. The contents cannot be changed once
programmed.
EPROM (erasable programmable read-only memory)
The contents of EPROM are erased in exposure to ultraviolet
light. So, EPROM can be reprogrammed.
EEPROM (electrically erasable programmable read-only memory)
EEPROM can be easily updated by the programmer. EEPROM is
widely used in PCs and smartphones where the developer
updates applications.
teachcomputerscience.co
m
Flash memory
Flash memory is a type of ROM. It is programmed by applying
slightly large electric current that forces an electron through a
barrier as shown in the figure below.
Electrons
trapped in Electrons
this layer forced
through
Charge barrier
applied
teachcomputerscience.co
m
Virtual memory
When a computer has too many processes running at the same
time and the capacity of RAM is not enough, a section of the hard
drive is allocated for storing temporary data. This section of hard
disk is called virtual memory. A part of the storage drive is
available as RAM temporarily. This management of memory is
performed by the operating system. A virtual memory scheme is
illustrated in the following figure. A part of the RAM that is
currently not in use is transferred to the hard disk and a part of
hard disk that is currently required by RAM is transferred to RAM.
This process of transferring data between RAM and the hard disk
is slow and may affect the performance of the computer.
Hard disk
Virtual
RAM
memory
Paging /
Swapping
teachcomputerscience.co
m
2
.
Activity
teachcomputerscience.co
m
Activity-1
Duration: 10 minutes
Is? Stores?
RAM
ROM
teachcomputerscience.co
m
3
.
End of topic
questions
teachcomputerscience.co
m
End of topic questions
1. Why are some data copied to cache memory?
2. What is the difference between the basic operation of RAM
and ROM?
3. What is the difference between SRAM and DRAM?
4. What does RAM contain?
5. What does ROM contain?
6. What are the different types of ROM? Explain in detail how
each one of them works.
7. What is virtual memory? What are its contents?
8. What is paging?
teachcomputerscience.co
m