0% found this document useful (0 votes)
4 views

Role of Computer Memory

The document discusses the roles of different types of computer memory, specifically RAM, ROM, and Cache. It explains the characteristics of non-volatile memory (ROM) and volatile memory (RAM), detailing their functions, types, and uses in computing systems. Additionally, it highlights the importance of RAM in executing tasks and the various types of RAM, including SRAM, DRAM, and SDRAM, along with their specific features.

Uploaded by

nelsonrweyemamu7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Role of Computer Memory

The document discusses the roles of different types of computer memory, specifically RAM, ROM, and Cache. It explains the characteristics of non-volatile memory (ROM) and volatile memory (RAM), detailing their functions, types, and uses in computing systems. Additionally, it highlights the importance of RAM in executing tasks and the various types of RAM, including SRAM, DRAM, and SDRAM, along with their specific features.

Uploaded by

nelsonrweyemamu7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Role of Computer Memory (RAM, ROM and Cache)

SEMICONDUCTOR MEMORY (PRIMARY)


Semiconductor memory is a digital electronic semiconductor device used for digital data storage, it
refers to MOS memory, where data is stored within metal–oxide–semiconductor (MOS) memory cells on
a silicon integrated circuit memory chip

1. Non-volatile (ROM):
It is the type of memory in which data or information is not wipe-out inside the memory even power is
removed. ROM is the most common example of non-volatile memory.
ROM stands for read-only memory, is a storage tool that saves information lastingly. We can only read
the programs and information kept on it but cannot rewrite it.

What is ROM?

ROM, which stands for read only memory, is a memory device or storage medium that stores
information permanently. It is also the primary memory unit of a computer along with the random
access memory (RAM). It is called read only memory as we can only read the programs and data stored
on it but cannot write on it. It is restricted to reading words that are permanently stored within the unit.

The manufacturer of ROM fills the programs into the ROM at the time of manufacturing the ROM. After
this, the content of the ROM can't be altered, which means you can't reprogram, rewrite, or erase its
content later. However, there are some types of ROM where you can modify the data.

ROM contains special internal electronic fuses that can be programmed for a specific interconnection
pattern (information). The binary information stored in the chip is specified by the designer and then
embedded in the unit at the time of manufacturing to form the required interconnection pattern
(information). Once the pattern (information) is established, it stays within the unit even when the

Page 1 of 13
power is turned off. So, it is a non-volatile memory as it holds the information even when the power is
turned off, or you shut down your computer.

The information is added to a RAM in the form of bits by a process known as programming the ROM as
bits are stored in the hardware configuration of the device. So, ROM is a Programmable Logic Device
(PLD).

A simple example of ROM is the cartridge used in video game consoles that allows the system to run
many games. The data which is stored permanently on personal computers and other electronic devices
like smartphones, tablets, TV, AC, etc. is also an example of ROM.
For example, when you start your computer, the screen does not appear instantly. It takes time to
appear as there are startup instructions stored in ROM which are required to start the computer during
the booting process. The work of the booting process is to start the computer. It loads the operating
system into the main memory (RAM) installed on your computer. The BIOS program, which is also
present in the computer memory (ROM) is used by the microprocessor of the computer to start the
computer during the booting process. It allows you to open the computer and connects the computer
with the operating system.

ROM is also used to store Firmware, which is a software program which remains attached to the
hardware or programmed on a hardware device like a keyboard, hard drive, video cards, etc. It is stored
in the flash ROM of a hardware device. It provides instructions to the device to communicate and
interact with other devices.

Types of Read-Only Memory (ROM):

i) Masked Read Only Memory (MROM):


It is the oldest type of read only memory (ROM). It has become obsolete so it is not used
anywhere in today's world. It is a hardware memory device in which programs and instructions
are stored at the time of manufacturing by the manufacturer. So it is programmed during the
manufacturing process and can't be modified, reprogrammed, or erased later.
The MROM chips are made of integrated circuits. Chips send a current through a particular
input-output pathway determined by the location of fuses among the rows and columns on the
chip. The current has to pass along a fuse-enabled path, so it can return only via the output the
manufacturer chooses. This is the reason the rewriting and any other modification is not
impossible in this memory.

ii) Programmable Read Only Memory (PROM):


PROM is a blank version of ROM. It is manufactured as blank memory and programmed after
manufacturing. We can say that it is kept blank at the time of manufacturing. You can purchase
and then program it once using a special tool called a programmer.
In the chip, the current travels through all possible pathways. The programmer can choose one
particular path for the current by burning unwanted fuses by sending a high voltage through
them. The user has the opportunity to program it or to add data and instructions as per his
requirement. Due to this reason, it is also known as the user-programmed ROM as a user can
program it.

Page 2 of 13
To write data onto a PROM chip; a device called PROM programmer or PROM burner is used.
The process or programming a PROM is known as burning the PROM. Once it is programmed,
the data cannot be modified later, so it is also called as one-time programmable device.

Uses: It is used in cell phones, video game consoles, medical devices, RFID tags, and more.

iii) Erasable and Programmable Read Only Memory (EPROM):


EPROM is a type of ROM that can be reprogramed and erased many times. The method to erase
the data is very different; it comes with a quartz window through which a specific frequency of
ultraviolet light is passed for around 40 minutes to erase the data. So, it retains its content until
it is exposed to the ultraviolet light. You need a special device called a PROM programmer or
PROM burner to reprogram the EPROM.

Uses: It is used in some micro-controllers to store program, e.g., some versions of Intel 8048 and the
Freescale 68HC11.

iv) Electrically Erasable and Programmable Read Only Memory (EEPROM):


ROM is a type of read only memory that can be erased and reprogrammed repeatedly, up to
10000 times. It is also known as Flash EEPROM as it is similar to flash memory. It is erased and
reprogrammed electrically without using ultraviolet light. Access time is between 45 and 200
nanoseconds.
The data in this memory is written or erased one byte at a time; byte per byte, whereas, in flash
memory data is written and erased in blocks. So, it is faster than EEPROM. It is used for storing a
small amount of data in computer and electronic systems and devices such as circuit boards.

Uses: The BIOS of a computer is stored in this memory.

v) FLASH ROM:
It is an advanced version of EEPROM. It stores information in an arrangement or array of
memory cells made from floating-gate transistors. The advantage of using this memory is that
you can delete or write blocks of data around 512 bytes at a particular time. Whereas, in
EEPROM, you can delete or write only 1 byte of data at a time. So, this memory is faster than
EEPROM.
It can be reprogrammed without removing it from the computer. Its access time is very high,
around 45 to 90 nanoseconds. It is also highly durable as it can bear high temperature and
intense pressure.

Uses: It is used for storage and transferring data between a personal computer and digital devices. It is
used in USB flash drives, MP3 players, digital cameras, modems and solid-state drives (SSDs). The BIOS
of many modern computers are stored on a flash memory chip, called flash BIOS.

Advantages of ROM
• It is non-volatile, meaning data which was set by the manufacture will function as expected
when device is turned on.
• Due to them being static, they don’t need a refreshing time.
• In comparison to RAM, the circuitry is simpler.
• Data can be stored permanently.

Page 3 of 13
Disadvantages of ROM: (with most use cases of ROM)
• ROM is a read only memory unit, so it can’t be modified.
• If any changes are required, it’s not possible.

2. Volatile (RAM):

Random Access Memory (RAM)


A RAM is also called Main memory
RAM is the temporary working storage for data and programs that are being accessed by the CPU. RAM
is the necessary component of a computing system because without it computers can’t execute even
simple tasks.

Computer memory is the storage space in the computer, where data is to be processed and instructions
required for processing are stored.

Your computer can access RAM memory much faster than data on a hard disk, SSD, or other long-term
storage device.

It is a read/write memory which stores data until the machine is working. As soon as the machine is
switched off, data is erased.

RAM is volatile that mean all data stored in it will be lost when we switch off the computer or if there is
a power failure.

Memory Structure
Memories consist of a number of cells (or locations) each of which can store a piece of information.
Each cell has a unique number called memory address, by which programs can refer to it.
A memory address is called a pointer because you can think of it as pointing to a specific spot in
memory.
If a memory has n cells, they will have addresses 0 to n − 1.
All cells in a memory contain the same number of bits.
If a cell consists of k bits, it can hold any one of 2k different bit combinations

RAM is considered "random access" because you can access any memory cell directly if you know the
row and column that intersect at that cell.

In contrast, serial access memory (SAM) stores data as a series of memory cells that can only be
accessed sequentially (like a cassette tape). If the data is not in the current location, each memory cell is
checked until the needed data is found. SAM works very well for memory buffers, where the data is
normally stored in the order in which it will be used (for instance, the texture buffer memory on a video
card). RAM data, on the other hand, can be accessed in any order.

RAM is basically your computer's short-term memory. Similar to a microprocessor, a memory chip is
an integrated circuit (IC) made of millions of transistors and capacitors. In the most common form of
computer memory, dynamic random access memory (DRAM), a transistor and a capacitor are paired to
create a memory cell, which represents a single bit of data. The capacitor holds the bit of information —

Page 4 of 13
a 0 or a 1. The transistor acts as a switch that lets the control circuitry on the memory chip read the
capacitor or change its state.

A capacitor is like a small bucket that can store electrons. To store a 1 in the memory cell, the bucket is
filled with electrons. To store a 0, it is emptied. The problem with the capacitor's bucket is that it has a
leak. In a matter of a few milliseconds a full bucket becomes empty. Therefore, for dynamic memory to
work, either the CPU or the memory controller has to come along and recharge all of the capacitors
holding a 1 before they discharge. To do this, the memory controller reads the memory and then writes
it right back. This refresh operation happens automatically thousands of times per second.

The capacitor in a dynamic RAM memory cell is like a leaky bucket. It needs to be refreshed periodically
or it will discharge to 0. This refresh operation is where dynamic RAM gets its name. Dynamic RAM has
to be dynamically refreshed all of the time or it forgets what it is holding. The downside of all this
refreshing is that it takes time and slows down the memory.

Memory Cells and DRAM


Memory is made up of bits arranged in a two-dimensional grid.
In the figure below, red cells represent 1s and white cells represent 0s. A column is selected and then
rows are charged to write data into the specific column.

Memory cells are etched onto a silicon wafer in an array of columns (bitlines) and rows (wordlines). The
intersection of a bitline and wordline constitutes the address of the memory cell.
DRAM works by sending a charge through the appropriate column (CAS) to activate the transistor at
each bit in the column. When writing, the row lines contain the state the capacitor should take on.
When reading, the sense-amplifier determines the level of charge in the capacitor. If it is more than 50
percent, it reads it as a 1; otherwise it reads it as a 0. The counter tracks the refresh sequence based on
which rows have been accessed in what order. The length of time necessary to do all this is so short that
it is expressed in nanoseconds (billionths of a second). A memory chip rating of 70ns means that it takes
70 nanoseconds to completely read and recharge each cell.
Memory cells alone would be worthless without some way to get information in and out of them. So,
the memory cells have a whole support infrastructure of other specialized circuits. These circuits
perform functions such as:
• Identifying each row and column (row address select and column address select)
• Keeping track of the refresh sequence (counter)
• Reading and restoring the signal from a cell (sense amplifier)
• Telling a cell whether it should take a charge or not (write enable)

Page 5 of 13
Other functions of the memory controller include a series of tasks that include identifying the type,
speed and amount of memory and checking for errors.
Types of RAM
There are different types of RAM that can be used by a computer.

Unlike ROM, RAM is volatile memory, which means that the contents are erased every time the
computer is powered off.

Note: ROM is nonvolatile which means that the contents are not erased when the computer is powered
off.

Adding more RAM in a computer enhances the system performance. For instance, more RAM increases
the memory capacity of the computer to hold and process programs and files. With less RAM, a
computer must swap data between RAM and the much slower hard drive. The maximum amount of
RAM that can be installed is limited by the motherboard.

The information inside the volatile memory is saved until the system is capable of, but once the system
is switched off the data inside the volatile memory is erased automatically. RAM and Cache Memory are
some common examples of volatile memory.
RAM, which stands for Random Access Memory is a volatile memory because the data lost when the
power is switched off.

Types of Random-Access Memory (RAM):

1. SRAM stands for Static Random-Access Memory which needs a steady power stream to operate.
Because of the Steady power, SRAM doesn’t require to be ‘refreshed’ to recognize the data
existing saved. Therefore, SRAM is called ‘static’, no change (refreshing) is needed to maintain
data intact. Although, SRAM is a volatile memory, which indicates that all the data that had
remained saved becomes erased once the power is switched off.

2. DRAM stands for Dynamic Random-Access Memory which needs a periodical ‘refresh’ of power
to operate. The capacitors that collect data in DRAM slowly loose energy; no energy determines
the data becomes erased. Therefore, DRAM is called ‘dynamic’ constant change (refreshing) is
required to maintain data intact. DRAM is also a volatile memory, which indicates that all the
saved data becomes erased once the power is switched off.

3. SDRAM stands for Synchronous Dynamic RAM. SDRAM is a division of DRAM that works in sync
with the CPU clock, which indicates that it waits for the clock signal before returning to the data
input (e.g. user interface). By variation, DRAM is asynchronous, which indicates it returns quickly
to data input. But the advantage of synchronous operation is that a CPU can process overlapping
instructions in parallel, also known as ‘pipelining’, the capacity to accept (read) a new instruction
before the early instruction has been completely resolved (write).

Types of SDRAM:

i) SDR SDRAM stands for Single Data Rate Synchronous Dynamic RAM. The ‘single data rate’
shows how the memory processes one read, and one write instruction per clock cycle.

Page 6 of 13
ii) DDR SDRAM stands for Double Data Rate Synchronous Dynamic RAM, is capable of
processing two reads and two write instructions per clock cycle (hence the ‘double’). . DDR
SDRAM works in the same way as SDR SDRAM, only twice as fast.
iii) DDR2 SDRAM is the evolutionary rise to DDR SDRAM. While the same double data rate
(processing two read and two write instructions per clock cycle), DDR2 SDRAM is more
active because it can work at higher clock speeds.
iv) DDR3 SDRAM enhances production over DDR2 SDRAM through advanced signal processing
(reliability), have greater memory capacity, have lower power loss (1.5 V) and have higher
standard clock speeds (up to 800 MHz)

v) RDRAM Stands for Rambus dynamic random-access memory, which was developed for high-
bandwidth applications. RDRAM is known as a narrow channel system because data is
transferred only to 2 bytes (16 bits) at a time. This might seem small, but those 2 bytes
move very fast! RDRAM transfers data at up to 800 MHz. The Rambus data bus is 16 bits
wide, as opposed to the more typical 32 or 64 bits wide. Additionally, Rambus' memory
sends data more often. It reads data on both the rising and falling edges of the clock signal

DRAM Modules

Page 7 of 13
A memory module or RAM (random-access memory) stick is a printed circuit board on which memory
integrated circuits are mounted. Memory modules allow easy installation and replacement in electronic
systems, especially computers.

Early computers had RAM installed on the motherboard as individual chips. The individual memory
chips, called dual inline package (DIP) chips, were difficult to install and often became loose. To solve
this problem, designers soldered the memory chips to a circuit board to create a memory module which
would then be placed into a memory slot on the motherboard.

• DIP 16-pin (DRAM chip, usually pre-fast page mode DRAM (FPRAM))

• SIPP 30-pin (usually FPRAM)

• SIMM 30-pin (usually FPRAM)

• SIMM 72-pin (often extended data out DRAM (EDO DRAM)

• DIMM 168-pin (SDRAM)

• DIMM 184-pin (DDR SDRAM)

• RIMM 184-pin (RDRAM)

• DIMM 240-pin (DDR2 SDRAM and DDR3 SDRAM)

Page 8 of 13
I. SIMM stands for single In-line Memory Module, contains up to 8 -9 RAM chips (8 in Macs
and 9 in PCs where the 9th chip is used for equality checking). Another significant part is the
bus width, which for SIMMS is 32 bits.
II. DIMM stands for Dual In-line Memory Module, with the addition in the data bus width,
DIMMs started to substitute SIMMs as the dominant type of memory module. The diversity
within a SIMM and a DIMM is that a DIMM has separate electrical contacts on each side of
the module, while the contacts on a SIMM are on both sides are redundant. Standard
SIMMs also has a 32-bit data bus, while standard DIMMs have a 64-bit data bus
III. RIMM stands for the Rambus In-line Memory Module, which is the same as a DIMM but is
associated with RIMMs because of their corporation and proprietary slot required.

Common SO-DIMM DRAM modules:


• 72-pin (32-bit)

• 144-pin (64-bit) used for SO-DIMM SDRAM

• 200-pin (72-bit) used for SO-DIMM DDR SDRAM and SO-DIMM DDR2 SDRAM

• 204-pin (64-bit) used for SO-DIMM DDR3 SDRAM

• 260-pin used for SO-DIMM DDR4 SDRAM


• 262-pin used for SO-DIMM DDR5 SDRAM

Page 9 of 13
Virtual Memory
Virtual memory is a feature of an operating system that uses hardware and software to compensate for
shortages of physical memory. It transfers pages of data from random access memory (RAM) to disk
storage.

How does virtual memory work?


Virtual memory works through a temporary process, known as swapping, that combines RAM and with
space on the hard disk. On a PC, RAM is the physical memory is where operating system data, running
programs and open documents are held. When RAM runs low, virtual memory can move data from the
RAM to a space called a paging file. This process allows for RAM to be freed up so that a computer can
complete the task.

What is a swap file (swap space or page file)?


A swap file is a system file that creates temporary storage space on a solid-state drive or hard disk when
the system runs low on memory. The file swaps a section of RAM storage from an idle program and
frees up memory for other programs.
By using a swap file, the computer can use more memory than is physically installed. In other words, it
can run more programs than it could run with just the limited resources of the installed RAM.
Swap files are not stored in physical RAM, which is why they are a type of virtual memory. Having a
swap file allows a computer's operating system (OS) to pretend that it has more RAM than it actually
does. The least recently used files or programs in RAM can be "swapped out" to the hard disk until
they're needed later, allowing new files or programs to be "swapped in" to RAM.
The implementation of swap files varies with the OS, which takes care of creating and using a swap file
as required. It also releases the drive space when it is no longer required by a program.
A swap file is also known as a page file, swap space or paging file. It is hidden on the system by default.

Benefits of using virtual memory.


The advantages to using virtual memory include:
• It can handle twice as many addresses as main memory.
• It enables more applications to be used at once.

Page 10 of 13
• It frees applications from managing shared memory and saves users from having to add memory
modules when RAM space runs out.
• It has increased speed when only a segment of a program is needed for execution.
• It has increased security because of memory isolation.
• It enables multiple larger applications to run simultaneously.
• Allocating memory is relatively inexpensive.
• It does not need external fragmentation.
• CPU use is effective for managing logical partition workloads.
• Data can be moved automatically.
• Pages in the original process can be shared during a fork system call operation that creates a
copy of itself.

Random Access Memory vs Read-Only memory


RAM ROM

Random Access Memory. Read Only Memory.

Volatile memory. Nonvolatile memory.

If the system is turned off, the information it carries will still be


If the system is turned off, the
on the memory, meaning that the system can retrieve it again
information will be deleted.
when the system is switched on.

Requires power to store data. Doesn’t require power to store data.

RAM is a temporary storage unit to ROM is used to store BIOS/Firmware/software, programs and
store files. instructions which don’t change.

Chips often range from 1 to 256 GB. Chips often range from 4 to 8 MB.

Available in two primary sizes. They can vary in size.

Temporary memory. Permanent memory.

Cache Memory (Static RAM)


Static RAM uses a completely different technology. In static RAM, a form of flip-flop holds each bit of
memory. A flip-flop for a memory cell takes four or six transistors along with some wiring, but never has
to be refreshed. This makes static RAM significantly faster than dynamic RAM. However, because it has
more parts, a static memory cell takes up a lot more space on a chip than a dynamic memory cell.
Therefore, you get less memory per chip, and that increases its price.
Static RAM is fast and expensive, and dynamic RAM is less expensive and slower. So static RAM is used
to create the CPU's speed-sensitive cache, while dynamic RAM forms the larger system RAM space.

Page 11 of 13
Cache Memory is a special very high-speed memory. It is used to speed up and synchronize with high-
speed CPU. Cache memory is costlier than main memory or disk memory but more economical than CPU
registers.
Cache memory is an extremely fast memory type that acts as a buffer between RAM and the CPU.
It holds frequently requested data and instructions so that they are immediately available to the CPU
when needed.

Cache holds a copy of only the most frequently used information or program codes stored in the main
memory. The smaller capacity of the cache reduces the time required to locate data within it and
provide it to the CPU for processing.

When a computer’s CPU accesses its internal memory, it first checks to see if the information it needs is
stored in the cache. If it is, the cache returns the data to the CPU. If the information is not in the cache,
the CPU retrieves it from the main memory. Disk cache memory operates similarly, but the cache is used
to hold data that have recently been written on, or retrieved from, a magnetic disk or other external
storage device.

There are various different independent caches in a CPU, which store instructions and data.

Types of cache memory


Cache memory is fast and expensive. Traditionally, it is categorized as "levels" that describe its closeness
and accessibility to the microprocessor. There are three general cache levels:

L1 cache, or primary cache, is extremely fast but relatively small, and is usually embedded in the
processor chip as CPU cache.
It is a type of memory in which data is stored and accepted that are immediately stored in CPU.
Most commonly used register is accumulator, Program counter, address register etc.

L2 cache, or secondary cache, is often more larger in capacity size than L1.
L2 cache may be embedded on the CPU, or it can be on a separate chip or coprocessor and have a high-
speed alternative system bus connecting the cache and CPU.
It is the fastest memory which has faster access time where data is temporarily stored for faster access.
That way it doesn't get slowed by traffic on the main system bus.

Level 3 (L3) cache is specialized memory developed to improve the performance of L1 and L2. L1 or L2
can be significantly faster than L3, though L3 is usually double the speed of DRAM. With multicore
processors, each core can have dedicated L1 and L2 cache, but they can share an L3 cache. If an L3 cache
references an instruction, it is usually elevated to a higher level of cache.
In the past, L1, L2 and L3 caches have been created using combined processor and motherboard
components. Recently, the trend has been toward consolidating all three levels of memory caching on
the CPU itself. That's why the primary means for increasing cache size has begun to shift from the

Page 12 of 13
acquisition of a specific motherboard with different chipsets and bus architectures to buying a CPU with
the right amount of integrated L1, L2 and L3 cache.
Contrary to popular belief, implementing flash or more dynamic RAM (DRAM) on a system won't
increase cache memory. This can be confusing since the terms memory caching (hard disk buffering)
and cache memory are often used interchangeably. Memory caching, using DRAM or flash to buffer disk
reads, is meant to improve storage I/O by caching data that is frequently referenced in a buffer ahead of
slower magnetic disk or tape. Cache memory, on the other hand, provides read buffering for the CPU.

Cache Performance: When the processor needs to read or write a location in main memory, it first
checks for a corresponding entry in the cache.
• Cache hit - If the processor finds that the memory location is in the cache, a cache hit has
occurred and data is read from the cache.
• Cache miss - If the processor does not find the memory location in the cache, a cache miss has
occurred.
For a cache miss, the cache allocates a new entry and copies in data from main memory, then
the request is fulfilled from the contents of the cache.
The performance of cache memory is frequently measured in terms of a quantity called Hit ratio.

Hit ratio = hit / (hit + miss) = no. of hits/total accesses

Page 13 of 13

You might also like