Mod 4-Computer Memory
Mod 4-Computer Memory
Mod 4-Computer Memory
I. INTRODUCTION
The computer’s memory stores data, instructions required during the processing of
data, and output results. Storage may be required for a limited period of time,
instantly, or, for an extended period of time. Different types of memories, each having
its own unique features, are available for use in a computer. The cache memory,
registers, and RAM are fast memories and store the data and instructions temporarily
during the processing of data and instructions. The secondary memory like magnetic
disks and optical disks has large storage capacities and store the data and instructions
permanently, but are slow memory devices.
The memories are organized in the computer in a manner to achieve high levels of
performance at the minimum cost. In this lecture, we discuss different types of
memories, their characteristics and their use in the computer.
3
V. CPU REGISTERS
Registers are very high-speed storage areas located inside the CPU. After CPU gets the
data and instructions from the cache or RAM, the data and instructions are moved to the
registers for processing. Registers are manipulated directly by the control unit of CPU
during instruction execution. That is why registers are often referred to as the CPU’s
working memory. Since CPU uses registers for the processing of data, the number of
registers in a CPU and the size of each register affect the power and speed of a CPU.
The more the number of registers (ten to hundreds) and bigger the size of each register
(8 bits to 64 bits), the better it is.
4
The advantages and disadvantages of cache memory are as follows:
Advantages
The advantages of cache memory are as follows:
Cache memory is faster than main memory.
It consumes less access time as compared to main memory.
It stores the program that can be executed within a short period of time.
It stores data for temporary use.
Disadvantages
The disadvantages of cache memory are as follows:
Cache memory has limited capacity.
It is very expensive.
5
There are generally two broad subcategories of RAM:
• Static RAM (SRAM): Static RAM is the form of RAM and made with flip-flops
and used for primary storage are volatile. It retains data in latch as long as the
computer powered. SRAM is more expensive and consumes more power than
DRAM. It used as Cache Memory in a computer system. As technically, SRAM
uses more transistors as compared to DRAM. It is faster compared to DRAM due
to the latching arrangement, and they use 6 transistors per data bit as compared to
DRAM, which uses one transistor per bit.
• Dynamic Random Access Memory (DRAM): It is another form of RAM used as
Main Memory, its retains information in Capacitors for a short period (a few
milliseconds) even though the computer powered. The Data is Refreshed
Periodically to maintain in it. The DRAM is cheaper, but it can store much more
information. Moreover, it is also slower and consumes less power than SRAM.
2. ROM (Read Only Memory)
ROM is the long-term internal memory. ROM is “Non-Volatile Memory” that retains
data without the flow of electricity. ROM is an essential chip with permanently
written data or programs. It is similar to the RAM that is accessed by the CPU. ROM
comes with pre-written by the computer manufacturer to hold the instructions for
booting-up the computer.
There is generally three broad type of ROM:
• PROM (Programmable Read Only Memory): PROM stands for programmable
ROM. It can be programmed only be done once and read many. Unlike RAM,
PROMs retain their contents without the flow of electricity. PROM is also
nonvolatile memory. The significant difference between a ROM and a PROM is
that a ROM comes with pre-written by the computer manufacturer whereas
PROM manufactured as blank memory. PROM can be programmed by PROM
burner and by blowing internal fuses permanently.
• EPROM (Erasable Programmable Read Only Memory): EPROM is
pronounced ee-prom. This memory type retains its contents until it exposed to
intense ultraviolet light that clears its contents, making it possible to reprogram
the memory.
• EEPROM (Electrically Erasable Programmable Read Only Memory):
EEPROM can be burned (programmed) and erased by first electrical waves in a
millisecond. A single byte of a data or the entire contents of device can be erased.
To write or erase this memory type, you need a device called a PROM burner.
6
SECONDARY MEMORY
I. Secondary Memory
In the previous lecture, we saw that RAM is expensive and has a limited storage
capacity. Since it is a volatile memory, it cannot retain information after the computer
is powered off. Thus, in addition to primary memory, an auxiliary or secondary
memory is required by a computer. The secondary memory is also called the storage
device of computer. In this lecture, the terms secondary memory and storage device
are used interchangeably. In comparison to the primary memory, the secondary
memory stores much larger amounts of data and information (for example, an entire
software program) for extended periods of time. The data and instructions stored in
secondary memory must be fetched into RAM before processing is done by CPU.
Magnetic tape drives, magnetic disk drives, optical disk drives are the different types
of storage devices.
Data is recorded on tape in the form of blocks, where a block consists of a group of
data also called as records. Each block is read continually. There is an Inter-Record
Gap (IRG) between two blocks that provides time for the tape to be stopped and
started between records (Figure 5.3).
2. Hard Disk
A hard disk (HD) consists of one or more platters divided into concentric tracks and
sectors. It is mounted on a central spindle, like a stack. It can be read by a read/write
head that pivots across the rotating disks. The data is stored on the platters covered
with magnetic coating (Figure 5.6).
Figure 5.7 Sectors and track in magnetic disk and optical disk
Optical disks can store large amount of data, up to 25GB, in a small space.
Commonly used optical disks store 600–700 MB of data.
The access time for an optical disk ranges from 100 to 200 ms.
Examples to Optical Disk
1. CD-ROM
Originally, Compact Disk (CD) was a popular medium for storing music. Now, it is
used in computers to store data and is called Compact Disk-Read Only Memory (CD-
ROM).
CD-ROM (Figure 5.8) is an optical disk that can only be read and not written on.
CD-ROM is written on by the manufacturer of the CD-ROM using the laser light.
A CD-ROM drive reads data from the compact disk. Data is stored as pits
(depressions) and lands (flat area) on CD-ROM disk. When the laser light is focused
on the disk, the pits scatter the light (interpreted as 0) and the lands reflect the light to
a sensor (interpreted as 1).
As CD-ROM is read only, no changes can be made into the data contained in it.
Since there is no head touching the disk, but a laser light, CD-ROM does not get
worn out easily.
The storage density of CD-ROM is very high and cost is low as compared to hard
disk.
Access time of CD-ROM is less. CD-ROM drives can read data at 150Kbps. They
come in multiples of this speed like—2x, 4x, 52x, 75x, etc.
3. Blu-ray Disc
Blu-ray Disc designed to supersede DVD. Blu-ray Disc is 120 mm in diameter and
1.2 mm thick, the same size as DVD and CD. It's developed by Blu-ray Disc
Association and the read mechanism of Blu-ray Disc is 405 nm diode laser. The
Speed of Blu-ray Disc is 36 Mbit/s. The capacity of Blu-ray Disc is ~ 25 GB.
V.Flash Memory
Flash memory is a non-volatile memory chip used for storage and for transfering data
between a personal computer (PC) and digital devices. It has the ability to be
electronically reprogrammed and erased. It is often found in USB flash drives, MP3
players, digital cameras and solid-state drives.
Flash memory is a type of electronically erasable programmable read only memory
(EEPROM), but may also be a standalone memory storage device such as a USB
drives. EEPROM is a type of data memory device using an electronic device to erase
or write digital data. Flash memory is a distinct type of EEPROM, which is
programmed and erased in large blocks.