Nothing Special   »   [go: up one dir, main page]

Memory

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

Computer Memory and Storage

• A computer memory refers to the electronic


holding place for instructions and data where
the computer's microprocessor can reach
quickly.
• Computer storage refers to the permanent
computer memory that stores all the data files
and instructions even after the computer
system is turned off.
Computer Memory
• CPU requires memory to process the data, hold
the intermediate results and to store the
output. Computer memory refers to the
electronic holding place for instructions and
data where the processor can reach quickly.
• It can be classified into two broad
categories: primary memory (to process the
data and hold the intermediate results)
and secondary memory (to store the output).
Computer Memory
• The primary memory allows the computer to store data for
immediate manipulation and to keep track of what is
currently being processed. The major limitation of this type of
memory is that it is volatile. It means that when the power is
turned off, the contents of primary memory are lost forever.
• Hence, to store the data permanently, a computer requires
some non-volatile storage medium like a hard disk. This kind
of storage is known as secondary memory. Such memories
store all the data (files) and instructions (computer programs)
even after the power is turned off. The secondary storage
devices have a larger storage capacity; they are less expensive
as compared to primary storage devices, but slow in
comparison.
Memory Representation
• For measuring computer memory, a standard unit is
required. Digital computers work on only two states:
ON (1) and OFF (0).
• Each of these values (either 0 or 1) is called a binary
digit or bit and can be considered a symbol for a piece
of information.
• Although the smallest unit of data that a computer can
deal with is a bit, computers generally do not deal with
a single bit.
• Instead, they deal with a group of eight bits, which is
referred to as a byte. A byte can have 256 different bit
patterns, and thus can represent 256 different symbols.
Memory Representation
• Bit: It is the smallest unit of data on a machine and a single bit can hold
only one of two values: 0 or 1. Bit is represented by a lower case b.
• Byte: A unit of eight bits is known as a byte. Hence, a byte is able to
contain any binary number between 00000000 and 11111111. It is
represented by an upper case B.
• Kilobyte: In a decimal system, kilo stands for 1000, but in a binary system,
kilo refers to 1024. Therefore, a kilobyte is equal to 1024 bytes. It is usually
represented as KB.
• Megabyte: It comprises 1024 kilobytes, or 1,048,576 bytes. However, since
this number is hard to remember, a megabyte can be thought of as a
million bytes. Megabyte is the standard unit of measurement for RAM and
is represented as MB.
• Gigabyte: It consists of 1024 megabytes (1,073,741,824 bytes). It is the
standard unit of measurement for hard disks and is often represented as
GB.
• Terabyte: It refers to 1024 gigabytes. Often represented as TB, terabyte
memory is usually associated with super computers only.
Types of Memory
1. Internal Processor Memory: This memory is placed
within the CPU (processor) 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 for temporary storage of data and instructions
on which the CPU is currently working. Processor
memory is the fastest among all the memories but is
the most expensive also. Therefore, a very diminutive
part of internal processor memory is used in the
computer system. It is generally used to compensate
for the speed gap between the primary memory and
the processor.
2. Primary Memory: Random access memory (RAM) and
read only memory (ROM) fall under the category of the
primary memory, also known as main memory. Every
computer comes with a small amount of ROM, which
contains the boot firmware (called BIOS). This holds
enough information to enable the computer to check
its hardware and load its operating system into its RAM
at the time of system booting. RAM is the place where
the computer temporarily stores its operating system,
application programs and current data so that the
computer's processor can reach them quickly and
easily. It is volatile in nature, that is, when the power is
switched off, the data in this memory are lost. Unlike
RAM, ROM is non-volatile. Even when the computer is
switched off, the contents of the ROM remain available.
3. Secondary Memory: Also known as auxiliary memory,
secondary memory provides backup storage for instructions
(computer programs) and data. The most commonly used
secondary storage devices are magnetic disk and magnetic
tapes. These are the least expensive and also have much
larger storage capacity than the primary memory. The
instructions and data stored on secondary storage devices
are permanent in nature. They can only be removed if the
user wants it so or if the device is destroyed. Secondary
memory can also be used as overflow memory (also known
as virtual memory), when the capacity of the main memory
is surpassed. Note that unlike processor memory and main
memory, secondary memory is not directly accessible to the
processor. Firstly, the data and instructions from the
secondary memory have to be shifted to the main memory
and then to the processor.
RANDOM ACCESS MEMORY
• RAM is like the computer's scratch pad. It allows the computer to
store data for immediate manipulation and to keep track of what is
currently being processed. It is the place in a computer where the
operating system, application programs and data in current use are
kept so that they can be accessed quickly by the computer's
processor. RAM is much faster to read from and write to than the
other kinds of storage in a computer, like the hard disk or floppy
disk. However, the data in RAM stay there only as long as the
computer is running. When the computer is turned off, RAM loses all
its contents. When the computer is turned on again, the operating
system and other files are once again loaded into RAM. When an
application program is started, the computer loads it into RAM and
does all the processing there. This allows the computer to run the
application faster. Any new information that is created is kept in
RAM and since RAM is volatile in nature, one needs to continuously
save the new information to the hard disk.
Why RAM is used by the computer.
• Whenever a user enters a command from the keyboard,
the CPU interprets the command and instructs the hard
disk to “load” the command or program into main
memory. Once the data are loaded into memory, the
CPU is able to access them much quickly. The reason
behind this is that the main memory is much faster than
secondary memory. The process of putting things that
the CPU needs in a single place from where it can get
them more quickly is similar to placing various
documents, which the user needs, into a single file
folder. By doing so, the user finds all the required files
handy and avoids searching in several places every time
he needs them.
Types of RAM
• Static RAM (SRAM): The word “static”
indicates that the memory retains its contents
as long as power is being supplied. However,
as soon as the power goes down, the data are
lost. This makes SRAM a volatile memory as
opposed to ROM.
• It is very fast but much more expensive than
DRAM (Dynamic RAM). SRAM is often used as
cache memory due to its high speed.
Types of RAM
• Dynamic RAM (DRAM): It is named so
because it is very unstable. The data continue
to move in and out of the memory as long as
power is available. Unlike SRAM, DRAM must
be continually refreshed in order to maintain
the data. This is done by placing the memory
on a refresh circuit that rewrites the data
several hundred times per second.
• DRAM is used for most system memory
because it is inexpensive and small.
Difference between SRAM and DRAM
1. SRAM retains its contents as long as electrical
power is supplied to the chip. If the power is turned
off, its contents are lost. On the other hand, DRAM
must be continuously refreshed after about every
15 microseconds. This is true even when power is
supplied constantly.
2. SRAM is useful for low amount of memory.
Anything over 4 MB is very bulky. SRAM is good for
internal memory in processors, and cache, but
DRAM is best for the system's main memory. DRAM
is used where its small size and power efficiency
outweigh its slowness as compared to SRAM.
READ ONLY MEMORY
• Just as a human being needs instructions from the
brain to perform actions in a certain event, a
computer also needs special instructions every
time it is started. This is required because during
the start up operation, the main memory of the
computer is empty due to its volatile property so
there have to be some instructions (special boot
programs) stored in a special chip that could enable
the computer system to perform start up
operations and transfer the control to the operating
system. This special chip, where the start up
instructions are stored, is called ROM.
READ ONLY MEMORY
• It is non-volatile in nature, that is, its contents
are not lost when the power is switched off.
The data and instructions stored in ROM can
only be read and used but cannot be altered,
thereby making ROM much safer and secure
than RAM. ROM chips are used not only in the
computer but also in other electronic items
like washing machines and microwave ovens.
READ ONLY MEMORY
• ROM can have data and instructions written into it only
one time. Once a ROM chip is programmed, it cannot be
reprogrammed or rewritten. If it is erroneous, or the data
need to be reorganized, one has to replace it with the new
chip. Thus, the programming of ROM chips should be
perfect, having all the required data at the time of its
manufacturing. Note that in some instances, ROM can be
changed using certain tools. For example, flash ROM (a
type of ROM) is non-volatile memory that occasionally can
be changed, such as when a BIOS chip must be updated.
The ROM chips consume very little power, are extremely
reliable, and in the case of most small electronic devices,
contain all the necessary programming to control the
device.
Types of ROM
• Masked ROM: The very first ROMs, known as masked ROMs,
were hard-wired devices that contained a pre-programmed
set of data or instructions. The contents of such ROMs had to
be specified before chip production so the actual data could
be used to arrange the transistors inside the chip.
• Programmable ROM (PROM): Creating a ROM chip from
scratch is a time-consuming and an expensive process. For
this reason, developers created a type of ROM known as
programmable read only memory (PROM), which can be
programmed. Blank PROM chips can be bought economically
and coded by the users with the help of a special device
known as PROM-programmer. However, once a PROM has
been programmed, its contents can never be changed. As a
result, PROM is also known as one-time programmable (OTP)
device. Like other ROMs, PROM is also non-volatile.
Types of ROM
• Erasable Programmable ROM (EPROM): An EPROM is
programmed in exactly the same manner as a PROM.
However, unlike PROM, an EPROM can be erased and
reprogrammed repeatedly. It can be erased by simply
exposing the device to a strong source of ultraviolet
light for a certain amount of time. Note that an EPROM
eraser is not selective; it will erase the entire EPROM.
• Electrically Erasable Programmable ROM
(EEPROM): This type of ROM can be erased by an
electrical charge and then written to by using slightly
higher-than-normal voltage. EEPROM can be erased
one byte at a time, rather than erasing the entire chip
with ultraviolet light.
Types of ROM
• Flash ROM: A flash ROM also called flash BIOS or flash
memory, is a type of constantly powered non-volatile
memory that can be erased and reprogrammed in
blocks. It is a variation of EEPROM, which, unlike flash
memory, is erased and rewritten at the byte level. Flash
memory is often used to hold the control code such as
the BIOS in a personal computer. When BIOS needs to be
changed or rewritten, the flash memory can be written
in block (rather than byte) sizes, thus making it easier to
update. Flash memory gets its name because the
microchip is organized so that a section of memory cells
are erased in a single action or “flash”. Flash memory is
used in digital cellular phones, digital cameras and other
devices.
RAM, ROM AND CPU INTERACTION
TYPES OF SECONDARY STORAGE DEVICES
• Sequential Access: Sequential access means
the computer system must search the storage
device from the beginning until the desired
data is found. The most common sequential
access storage device is magnetic tape where
data is stored and processed sequentially.
Suppose, a tape contains information
regarding employees of an organization. Now,
to look for employee number 100's
information, the computer will have to start
with employee number 1 and then go past 2,
3 and so on, until it finally comes to 100.
• Direct Access: Direct access, also known
as random access, means that the computer
can go directly to the location, where the data
that the user wants, are stored. The most
common direct access storage devices are
magnetic disk and optical disk. In these
devices, the data are stored as sequentially
numbered blocks. Thus, one can access block
12, then access block 78, then block 2 and so
on.
MAGNETIC TAPE
• Magnetic tape appears similar to the tape used in
music cassettes. It is a plastic tape with magnetic
coating on it. The data is stored in the form of tiny
segments of magnetized and demagnetized portions
on the surface of the material.
• The magnetized portion of the surface refers to the bit
value “1” whereas the demagnetized portion refers to
the bit value “0”.
• Magnetic tapes are available in different sizes, but the
major difference between different magnetic tape
units is the speed at which the tape is moved past the
read/write head and the tape's recording density
MAGNETIC TAPE
• Magnetic tapes are very durable and can be erased
as well as reused. They are an inexpensive and
reliable storage medium for organizing archives and
taking backups. However, they are not suitable for
data files that need to be revised or updated often
because data on them are stored in a sequential
manner and the user needs to advance or rewind
the tape every time to the position where the
requested data starts. Tapes are also slow due to
the nature of the media. If the tape stretches too
much, then it will render itself unusable for data
storage and may result in data loss.
MAGNETIC DISK
• Magnetic disks are the widely used and popular medium for direct
access secondary storage. They offer high storage capacity and
reliability and have the capability to access the stored data directly.
• A magnetic disk consists of a plastic/metal circular plate/platter,
which is coated with magnetic oxide layer. On a disk, data are
represented as magnetized spots. A magnetized spot represents 1
and the absence of a magnetized spot represents 0.
• To read the data, the magnetized spots on the disk are converted into
electrical impulses, which are then transferred to the processor.
• Writing data onto the disk is accomplished by converting the electrical
impulses received from the processor into magnetized spots on the
disk.
• The data in a magnetic disk can be erased and reused virtually
infinitely. The disk is designed to reside in a protective case or
cartridge to shield it from the dust and other external interference.
MAGNETIC DISK
• The surface of a disk is divided into imaginary tracks
and sectors.
• Tracks are concentric circles where the data are
stored, and are numbered from the outermost to
the innermost ring, starting with zero.
• Sectors refer to the number of fixed-size areas
(imaginary pie slices) that can be accessed by one
of the disk drive's read/write heads, in one rotation
of the disk, without the head having to change its
position.
• An intersection of a track and a disk sector is known
as track sector.
TYPES OF MAGNETIC DISKS - Floppy Disk
• A floppy disk is a round, flat piece of Mylar plastic
coated with ferric oxide (a rust-like substance
containing tiny particles capable of holding a magnetic
field) and encased in a protective plastic cover (disk
jacket).
• It is a removable disk and is read and written by a
floppy disk drive (FDD), which is a device that performs
the basic operation on a disk, including rotating the
disk and reading and writing data onto it. The disk
drive's read/write head alters the magnetic orientation
of the particles, where orientation in one direction
represents “1” and orientation in the other represents
“0”.
TYPES OF MAGNETIC DISKS -Hard Disk
• The hard disk, also called the hard drive or fixed disk,
is the primary storage unit of the computer. It
consists of a stack of disk platters that are made up
of aluminium alloy or glass substrate coated with a
magnetic material and protective layers.
• They are tightly sealed to prevent any dust particle,
which causes head crash, from getting inside. A hard
disk can be external (removable) or internal
(fixed) and can hold a large amount of data.
• The capacity, that is, the amount of information that
a hard disk can store, is measured in bytes. A typical
computer today comes with 80–320 GB of hard disk.
OPTICAL DISK
• Apart from magnetic tapes and magnetic disks, a
new storage medium, which is gaining popularity,
is the optical disk.
• An optical disk is a flat, circular, plastic disk coated
with material on which bits may be stored in the
form of highly reflective areas and significantly
less reflective areas, from which the stored data
may be read when illuminated with a narrow-
beam source, such as a laser diode.
• These disks are capable of storing enormously
high amounts of data in a limited amount of
space.
OPTICAL DISK
• The optical disk storage system consists of a
rotating disk coated with a thin layer of metal
(aluminium, gold or silver) that acts as a
reflective surface and a laser beam, which is
used as a read/write head for recording data
onto the disk.
• Optical disk comes in various sizes and
capacities. A compact disk (CD) with 700 MB
capacity and 12 cm diameter is the most
popular means of optical storage.
TYPES OF OPTICAL DISKS
• Compact Disk - Compact disk is the most popular and the least
expensive type of optical disk. It was originally intended only for
storing music (in the form of digital audio) and can record about
80 minutes of uninterrupted playing time. A CD is capable of
being used as a data storage device along with storing of digital
audio.
• Compact disks are available in various formats: CD-ROM (compact
disk-read only memory), CD-R (compact disk-recordable), and CD-
RW (compact disk-rewritable) disks.
 A CD-ROM disk comes with pre-recorded data by the
manufactures and can be read but cannot be altered.
 CD-R is a type of WORM (write once-read many) disk that allows
you to record your own data. Once written, the data on the CD-R
can be read but cannot be altered.
 A CD-RW disk is rewritable version of CD-R that means, it allows
writing, erasing and rewriting of data several times.
TYPES OF OPTICAL DISKS
• Digital Versatile Disk- DVD, initially called Digital
Video Disk, is a high-capacity data storage
medium. At first glance, a DVD can easily be
mistaken for a CD as both are plastic disks 120
mm in diameter and 1.2 mm thick, and both rely
on lasers to read data. However, the DVD's
seven-fold increase in data capacity over the CD
has been largely achieved by tightening up the
tolerances throughout the predecessor system.
In DVD, the tracks are placed closer together,
thereby allowing more tracks per disk.
TYPES OF OPTICAL DISKS
• Blu-ray Disk- Blu-ray disk is an optical storage device,
which is used to record and playback high definition
video and audio as well as store images and other data.
It is developed by Blu-ray Disk Association (BDA), which
is a group of world's leading consumer electronics,
personal computers and media manufacturers
including Thomson, Apple, Panasonic, Sony and
Samsung.
• It uses blue-violet laser having shorter wavelength (405
nm) than a red laser (650 nm) used by DVDs. Due to
this shorter wavelength, the laser can be focused more
precisely on the small spot thereby resulting in storage
capacity 10 times that of DVD.
UNIVERSAL SERIAL BUS
• Universal serial bus (USB), developed by Intel, is a set of
connectivity specifications that establishes
communication between personal computers and
devices such as mouse, keyboard, pen drive, external
hard disk drives, etc. Nowadays, almost every computer
or laptop is equipped with one or more USB ports. The
USB connector is a narrow socket around 1 cm wide
and 0.5 cm high.
• All USB devices come with a USB connector that is
plugged into the USB port on the computer. As you plug
in a USB device, it is detected by the computer and the
required software is configured automatically; there is
no need to restart the computer.
Pen Drive
• A pen/flash drive is a removable storage device that
is frequently used nowadays to transfer audio, video,
and data files from one computer to another. A pen
drive consists of a small printed circuit board, which
is fitted inside a plastic, metal, or rubber casing to
protect it. The USB connector which is present at
one end of pen drive is protected by either a
removable cap or pulling it back in the casing.
External Hard Disk Drive
• External hard disk drive is a type of hard drive
that resides in its own enclosure (called hard
drive cage) outside the computer case and is
connected to the system through interfaces
like USB.
• With the addition of USB interfaces in the
personal computer, external hard drive has
become quite popular in the computer
market. The storage capacity of external hard
disk ranges from 20 GB to several TBs
MEMORY STICK
• Memory Stick, also known as memory card, is
a digital storage device, which is designed to
be used with portable electronic devices such
as mobile phones, digital cameras, PDAs, iPod,
etc.

You might also like