Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Computer

Memory &
Storage
Prepared by
Risala Tasin Khan
PROFESSOR
IIT, JU
• The memory in a computer system is of three
fundamental types:
1. Internal Processor Memory: This memory is placed
in the CPU or is attached to a special fast bus.
Internal memory usually includes cache memory
and special registers, both of which can be directly
accessed by the processor. This memory is used to
store temporary storage of data and instructions on
which the CPU is currently working. Processor
memory is the fasted among all the memory but is
Memory also the most expensive.
2. Primary Memory: Random Access Memory (RAM)
Hierarchy and Read Only Memory(ROM) fall in the category of
the primary memory, also known as main memory.
3. Secondary Memory: Also known as auxiliary
memory, secondary memory provides backup
storage for instructions and data. The most
commonly used secondary memory is Hard Disk.
Secondary memory can be used as virtual memory
when the capacity of the main memory is
surpassed. It is to be noted that unlike processor
memory and main memory, secondary memory is
not directly accessible by the processor.
Memory Hierarchy
low high
Intern
al
proces
ci ty sor
a pa
e c Memo

co
ag

st
o r e d ry
t
S
spe
ss
A cc e Primary Memory

Secondary memory
slow
• Static RAM (SRAM): the word ‘static’ indicates that
Types of the memory retains its contents as long as power
remains applied. SRAM does not need to be
RAM ‘refreshed’ (pulse of current through all the memory
cell) periodically. SRAM is very fast but much more
expensive than DRAM.
• Dynamic RAM (DRAM): it is named so because it is
unstable. The data moves in and out of the memory
repeatedly for as long as power is available.
Electricity always has to be flowing through the chip
to keep refreshing the memory. Unlike SRAM, DRAM
must be continually refreshed in order to maintain
the data. This is done by placing the memory on a
refreshed circuit that rewrites the data several
hundred times per second. DRAM is used for most
systems because it is cheap and small.
• ROM is a non-volatile memory where start up
ROM instructions are stored.
• The non-volatile memory not only performs read
operations but restrict themselves to be altered
and, therefore making it much safer and secure than
RAM.
• ROM is used not only in the computer but also in
other electronic items like washing machine and
microwave oven.
• Generally, designers program ROM chips at the time
of manufacturing circuits. Burning appropriate
electronic fuses to form patterns of binary
information does programming.
• ROM can have information written into it only one
time. No electric current is required for the
information to remain stored.
• Masked ROM: The very fast ROMs were hard-wired devices
Types of that contained a pre-programmed set of data or instructions.
These kind of ROMs are known as masked ROM. The contents

ROM
of such ROMs have to be specified before chip production.
• Programmable ROM: These ROMs can be programmed. Blank
PROM chips can be bought and coded by anyone with a special
tool such as PROM-programmers. However, once a PROM is
programmed, its contents can never be changed. The
information stored in PROM is non-volatile but they are more
fragile than other ROMs as a jolt of static electricity can easily
cause fuses in the PROM to burn out, changing essential bit
patterns from 1 to 0. But blank PROM is cheap.
• Erasable Programmable ROM: An EPROM is programmed in
exactly the same manner as a PROM.But unlike PROM, EPROM
can be erased and reprogrammed repeatedly. It can be erased
by simply exposing the device to a strong source of ultraviolate
light for a certain amount of time. An EPROM eraser is not
selective; it will erase the entire EPROM. Though EPROM is
more expensive but its ability to reprogram makes it an
essential part of the software development and testing process.
• Electrically Erasable Programmable ROM: This type
Types of of ROM can be erased by an electrical charge and
then written to by using slightly higher-than-normal
ROM voltage. EEPROM can be erased one byte at a time.
Hence, the process of reprogramming is flexible but
(Cont.) slow. As these chips can be changed without
opening a casing, they are often used to store
programmable instructions in devices like printers.
• Flash ROM: is also called flash BIOS or flash
memory, is a type of constantly powered non-
volatile memory that can be erased and re-
programmed in blocks. Flash memory is often used
to hold control code such as the BIOS in a personal
computer. The flash memory can be re-written in
block (rather than byte) sizes, making it easy to
update. Flash memory is used in digital cellular
phones, digital cameras and other devices.
1. The computer is switched on
RAM, ROM 2. Computer loads data from ROM and checks whether
all the major components like processor and hard disk
and CPU are functioning properly
3. Computer loads BIOS from ROM to determine the
Interaction machine’s fundamental configuration and
environment. The information stored in BIOS
determine what peripherals the system can support
4. Computer loads operating system from the secondary
storage into RAM.
5. When any application is opened, it is loaded into RAM
and any file that is opened for use in that application is
also loaded into RAM
6. After processing, when the user saves the file and
closes the respective application, the file is written to
the specified secondary storage device. After that, the
file(s) and the application are ‘flushed out’ from the
RAM.
Types of Secondary Storage Devices
There are two methods of accessing data from the secondary storage devices:
1. Sequential: Sequential access means the computer system must search the
storage device from the beginning until it finds the desired information.
The most common sequential access storage device is magnetic tape
2. Direct: Direct access, also known as random access, means that the
computer can go directly to the information that the user wants. The most
common direct access storage are magnetic and optical disks.
Advantage of Magnetic Tapes

1. Magnetic tapes hold high data recording density, resulting in low cost per bit of
storage.
2. They have virtually unlimited storage capacity as many tapes and cartridges can be
used to store very large amount of data
3. These tapes are easily transportable because they are compact in size, lightweight
and removable. Due to these properties, they are also easy to handle and store
4. Tapes represents a very cheap mode of offline data storage and simple software
programs can handle tape data.
1. Since tapes are sequential in nature, they are not
Disadvantages suitable in situations where data access is required
of Magnetic in random order. Moreover, data transmission in
magnetic tapes is slow as compared to the
Tapes magnetic disk
2. Magnetic tapes should be kept in a dust free
environment and away from corrosive gases and
chemicals as they can cause tape-reading errors.
3. Since magnetic tapes use parity bit to check the
data, the data on such devices are difficult to
recover, even if a minor bit error occurs.
4. Magnetic tapes are not flexible as compared to
other media types when file updating requires
record insertion or deletion.
Bits of data (0’s and 1’s) are stored on
circular magnetic platters called disks.

A disk rotates rapidly (& never stops).


Magnetic
Disks A disk head reads and writes bits of
data as they pass under the head.

Often, several platters are organized


into a disk pack (or disk drive).

CENG 351 13
Magnetic Hard Disk Mechanism

• It is worth taking a
look at how magnetic
disks work.
– After all they are
the place where
the databases are
stored!
Looking at a surface
Disk sector

tracks

sector

Surface of disk showing tracks and sectors

CENG 351 15
• Read-write head
Magnetic – Positioned very close to the platter surface (almost
touching it)
Disks •
– Reads or writes magnetically encoded information.
Surface of platter divided into circular tracks
– Over 50K-100K tracks per platter on typical hard
disks
• Each track is divided into sectors.
– A sector is the smallest unit of data that can be
read or written.
– Sector size typically 512 bytes
– Typical sectors per track: 500 (on inner tracks) to
1000 (on outer tracks)
• To read/write a sector
– disk arm swings to position head on right track
– platter spins continually; data is read/written as
sector passes under head
CENG 351

• Disks are marked (tracks and sectors) on both


surfaces,therefore they are also known as double-
sided disk
• Each side of a platter of a disk has a read/write
head, which moves across the platter to access
different tracks.
• The read-write heads of all the tracks are
mounted on a single assemble called a disk arm
Organization and move together.
• The disk platters mounted on a spindle and the
of Disks heads mounted on a disk arm are together
known as head-disk assemblies.
• Each sector is uniquely assigned a disk address
before a disk drive can access a piece of data.
• The disk address comprises sector number, track
number and surface number.
• The track sectors are grouped into a collection
known as cluster.

17
CENG 351

• Typically, two or more platters are stacked on top of


Organization each other with a common spindle, which turns the
of Disks •
whole assembly.
There is gap between the platters, making room for
magnetic read/write head.
• This concept of stacking the disk where the set of all
tracks are in the same relative position on the
platter is known as cylinder.
• Since the heads on all the platters move together,
when the head on one platter is on the ith track, the
heads on all the other platters are also on the ith
track of their respective platters.

18
Components of a Disk
Spindle
Tracks
Disk head
 The platters spin (say, 90/120rps).
 The arm assembly is moved in or out Sector
to position a head on a desired track.
Tracks under heads make a cylinder
(imaginary!).

Platters
Arm movement
 Only one head reads/writes
at any one time.

Arm assembly
Block size is a multiple
of sector size (which is often fixed).

CENG 351 19
CENG 351

• The process of accessing data comprises three


Accessing steps:
1. Seek:
Data from • As soon as the disk unit receives the
Magnetic read/write command, the
read/write heads are positioned on
Disk the specific track on the disk platter.
• The time taken in doing so is known
as seek time.
• It is the average time required to
move the heads from one track to
some other desired track on the
disk.
• Seek times of modern disks may
range between 6-15 millisecond

20
Cont…

2. Rotate:
– Once the heads are positioned on the desired track, the head of the specific
platter is activated.
– Since the disk is rotated constantly, the head has to wait for the required sector
or cluster to come under it.
– This delay is known as rotational delay time or latency of the disk.
– The average rotational latencies ranges from 4.2 to 6.7 ms.
3. Data Transfer:
– After waiting for the desired data location, the read/write head
transfers the data to or from the disk to primary memory.
– The rate at which the data is read from or written to the disk is known
as data transfer rate.
– It is measured in kilobits per second (kbps).
– The data transfer rate depends upon the rotational speed of the disk.
– If the disk has a rotational speed of 6000 rpm, having 125 sectors and
512 bytes/sector, the data transfer rate per revolution will be
125*512=64000 bytes.
– Hence, the total transfer rate per second will be
64000*6000/60=6,400,000 bytes/second or 6.4 MB/sec.
The combined time (seek, rotation and data transfer) time is
known as the access time of the magnetic disk.
Advantages of Magnetic Disk
1. Magnetic disks follow direct access mode for reading or writing onto the data files, thereby
making an ideal device for accessing frequently accessed data.
2. Magnetic disk are used both as online and offline storage of data. Such as hard disk is used
as an online storage whereas floppy and zip disks are used as offline storage.
3. Magnetic disks are easily movable from one place to another because of their small size.
4. The data transfer rate is much higher than magnetic tape.
5. Due to low cost and high data recording densities, cost per bit in magnetic disks is minimum
6. The storage capacity of these disks is virtually unlimited as numbers of such disks can be
added to store data
7. Magnetic disks are less prone to the corruption of data as they can withstand the
temperature and humidity change in a much better way as compared to magnetic tapes.
1. Magnetic disks must be stored in a dust-free
Disadvantages environment in order to protect them from
of Magnetic crashing down.
2. Magnetic disks are not ideal devices to use in
Disks scenarios where the file access required is of
sequential nature rather than direct or random
nature.
3. The cost of magnetic disk storage is more
expensive than the cost of magnetic tapes.
4. Magnetic disks are more susceptible to breach of
security and access gain to sensitive online disk
files from remote terminals.
1. Optical disks possess large capacity to store data in
Advantages the form of multimedia, graphics and video files.
They can store more data in less amount of space
of Optical as compared to magnetic tapes and floppy or zip
disks
Disk 2. The life span for data storage in optical disks is
considered to be more, about 10-20 years
3. Optical disks hold more data recording density as
compared to other storage media, therefore, they
have low cost per bit of storage.
4. Optical disk is not affected by magnetic field
5. It is physically harder to break or melt.
6. Due to their small size and lightweight, these disks
are easily portable and stored.
1. Optical disk is not easy to copy as a floppy disk
Disadvantages
2. They possess slow data access speed as compared
of Optical Disks to the magnetic disks
3. The drive mechanism of optical disk is more
complicated than the magnetic and floppy disks.

You might also like