Ch-4-Computer Memory
Ch-4-Computer Memory
COMPUTER MEMORY
● It can be divided into two groups: primary memory and secondary memory.
While the main memory holds instructions and data when a program is executing,
●
the auxiliary or the secondary memory holds data and programs not currently in
use and provides long-term storage.
The primary memory is volatile, so the data can be retained in it, only when the
●
Level 1 Cache
refer to other forms of data storage.
In computer’s terminology, the term storage refers to storage
Level 2 Cache
devices that are not directly accessible by the CPU (secondary or
Level 3 Cache tertiary storage).
Examples of secondary storage include hard disk drives, optical
Primary
Memory disc drives, and other devices that are slower than RAM but are
Hard Disk
used to store data permanently.
Optical Disk These days, computers use different types of memory which can
be organized in a hierarchy around the CPU, as a trade-off between
Magnetic performance and cost.
Tape
The memory at a higher level in the storage hierarchy has less
capacity to store data, is more expensive and is fastest to access.
© Oxford University Press 2012. All rights reserved.
PROCESSOR REGISTERS
Processor registers are located inside the processor and are therefore directly accessed by
the CPU. Each register stores a word of data (which is either 32 or 64 bits). CPU instructions
instruct the arithmetic and logic unit to perform various calculations or other operations on
this data. Registers are the fastest of all forms of computer data storage.
CACHE MEMORY
Cache memory is an intermediate form of storage between ultra-fast registers and the RAM.
The CPU uses cache memory to store instructions and data that are repeatedly required to
execute programs thereby improving the overall system speed and increase the
performance of the computer.
Cache memory is basically a portion of memory made of high-speed static RAM (SRAM)
instead of the slower and cheaper dynamic RAM (DRAM) which is used for main memory.
The flash memory is also a type of EEPROM in which the contents can be erased
under software control. This is the most flexible type of ROM, and is widely used
to store BIOS programs. It is primarily used in memory cards, USB flash drives,
MP3 players, PDAs (personal digital assistants), laptop computers, digital audio
players, digital cameras, and mobile phones. The EEPROM blurs the difference
between what "read-only" really means. However, the EEPROM is rewritten only
once a year or so, compared to real read-write memory (RAM) where rewriting is
done often many times per second.
Each platter requires two read/write heads, one for each side.
Data is actually stored on the surface of a platter in sectors and tracks. While
tracks are concentric circles, sectors on the other hand are pie-shaped wedges on
a track.
A track is divided into a number of segments (also called sectors) that can
store a fixed number of bytes- for example, 256 or 512.
The performance of a hard disk depends on its access time where access time
is the time required to read or write on the disk. Access time is actually a
combination of three components:
● Seek time
● Rotational delay
● Transfer time
Seek time: The time taken to position the R/W head over the appropriate cylinder
(usually around 8 msec on average). Seek time varies depending on the position
of the access arm when the R/W command is received. Seek time will be maximum
when the access arm is positioned over the innermost track while the data that
has to be accessed is stored on the outermost track. Similarly, seek time will be
zero if the access arm is already positioned over the desired track. On an average,
the seek time varies from 10-100 milli-seconds.
Rotational delay: The time taken to bring the target sector to rotate under the R/W
head. Assuming that the hard disk has 7,200 rotations per minute, or 120
rotations per second, a single rotation is done in approximately 8 msec. The
average rotational delay is around 4 msec.
Transfer time: The time to transfer data or the time taken to read/write to a
disk is called transfer rate.
Thus, the overall time required to access data = seek time + rotational delay
+ transfer time.
To access data from the hard disk, a disk address has to be specified. The disk
address consist of Sector number, Track number and Surface number (when
data is recorded on both the sides of the disk)
Storage capacity of a disk with multiple recording surfaces can be calculated
as:
Storage capacity = no. of recording surfaces * no. of tracks per surface * no. of sectors
per track * no. of bytes per sector
Advantages:
● Enable random access of data
● Can be often used as a shared device in a multi-user environment
● Preferred both for online and offline storage of data
● Can store large amounts of data
● The cost of data storage is very low.
Disadvantages:
● Must be stored in a dust free environment
● Magnetic disks are larger in size and heavy in weight
An optical storage media consists of a flat, round, portable metal disc, which is
usually 0.75 inches in diameter and less than one-twentieth of an inch thick.
The disc is coated with a thin metal or plastic or other material that is highly
reflective.
Compact Disc Rewritable (CD-RW) is an erasable optical disk. The user can
write and over-write data on the CD-RW disc multiple times.
Advantages
● Data stored on flash drives is impervious to scratches and dust
● Mechanically very robust
● Easily portable
● Have higher data capacity than any other removable media.
● Compared to hard drives, flash drives use little power
● Flash drives are small and light-weight devices
● Flash drives can be used without installing device drivers.
© Oxford University Press 2012. All rights reserved.
FLASH DRIVES contd.
Disadvantages
Can sustain only a limited number of write and erase cycles before the drive fails.
●
Flash drives are very small devices that can easily be misplaced, left behind, or
●
otherwise lost.
The cost per unit of storage in a flash drive is higher than that of hard disks
●
Floppy disks are data storage devices that consist of a thin magnetic storage
medium encased in a square plastic shell lined with fabric.
The mechanism of a floppy disk has two motors. One motor in the drive rotates
the diskette at a regulated speed, the second motor moves the magnetic RW head,
along the surface of the disk. To read/write data on the disk media, there must be
a physical contact between the read–write head and the disk media.
Storage capacity of magnetic tape = data recording density * length of the tape
Data is recorded in the form of tiny non-magnetized and magnetized spots, where
the presence of a spot represents 1 and its absence represents 0. This means that
data is stored in the form of zeroes and ones.