Chap 4 Storage Devices - 9th
Chap 4 Storage Devices - 9th
SHALAMAR CAMPUS: DARS BARAY MIAN STOP SHALAMAR LINK ROAD MUGHAL PURA LHR 042-36812355 / 0323-4110323
DAROGHAWALA CAMPUS: OPPOSITE DOCE BAKERS DHOBI GHAART DAROGHAWALA G.T ROAD LHR 042-36551778 / 0300-4246728
1.
Main Memory
Main memory is where programs and data are kept when the processor is actively using them.
When programs and data become active, they are copied from secondary memory into main
memory where the processor can interact with them. A copy remains in secondary memory.
Main memory is intimately connected to the processor, so moving instructions and data into
and out of the processor is very fast. Nothing permanent is kept in main memory. Sometimes
data are placed in main memory for just a few seconds, only as long as they are needed.
Computer memory operates at a high speed, for example random-access memory (RAM), as a
distinction from storage that provides slow-to-access program and data storage but offers
higher capacities. If needed, contents of the computer memory can be transferred to
secondary storage
Main Memory Organization
We can imagine Main Memory to be organized as a matrix of bits. Each row represents a
memory location, typically this is equal to the word size of the architecture, although it can be
a word multiple (e.g. 2xWordsize) or a partial word (e.g. half the word size). For simplicity we
will assume that data within Main memory can only be read or written a single row (memory
location) at a time.
For a 96-bit memory we could organize the memory as 12 8 bits, or 8 12 bits or 6 16
bits, or even as 96 1 bits or 1 96 bits. Each row also has a natural number Address which
is used for selecting the row:
primary
storage
devices
are
as
Muhammad
follows:
RAM
RAM is that part of main memory in which data and instructions are held temporarily. RAM
provides a working area to the user to enter and process data. In RAM each data element has
its own address (location). Any data element can be read easily and quickly by using that
address. It is also called as Read-And-Write Memory (RAM) since the computer can store or
write data at any selected location (address) and can retrieve or read data when needed. It is
a temporary memory of a computer used to store data and an instruction when the computer
is on; everything that is stored in RAM is lost when the computer is turned off. For this reason,
it is also called volatile memory. Large RAM sizes provide larger data that computer can hold
and process. Additional RAM chips can be installed in a computer simply by plugging them on
motherboard.
This
increases
the
storage
capacity
of
RAM
of
computer.
RAM is a semiconductor memory with no moving part. Data can be accessed from RAM at very
high speed very close to the speed of light. A memory chip less than one-fourth size of a
postage stamp can store more than 500,000 bytes equivalent to the printed matter on a
popular daily newspaper.
RAM types according to Technology
i. DRAM (Dynamic Ram)
ii. SRAM (Static Ram)
i. DRAM
Dynamic random-access memory (DRAM) is a type of random-access memory that stores
each bit of data in a separate capacitor within an integrated circuit. The capacitor can be
either charged or discharged; these two states are taken to represent the two values of a bit,
conventionally called 0 and 1.
ii. SRAM
SRAM (static RAM) is random access memory (RAM) that retains data bits in its memory as
long as power is being supplied. Unlike dynamic RAM (DRAM), which stores bits in cells
consisting of a capacitor and a transistor, SRAM does not have to be periodically refreshed.
Static RAM provides faster access to data and is more expensive than DRAM. SRAM is used for
a computer's cache memory and as part of the random access memory digital-to-analog
converter on a video card.
CACHE MEMORY
Cache memory, also called CPU memory, is random access memory (RAM) that a computer
microprocessor can access more quickly than it can access regular RAM. This memory is
typically integrated directly with the CPU chip or placed on a separate chip that has a
separate bus interconnect with the CPU.
The basic purpose of cache memory is to store program instructions that are frequently rereferenced by software during operation. Fast access to these instructions increases the
overall speed of the software program.
`
ROM
ROM stands for Read Only Memory. The instructions written in ROM can only be read but
cannot be changed or deleted. The ROM is, therefore, also called non-volatile memory. It is
not possible to write new information or instructions into the ROM. This is the reason why it is
called Read Only Memory. ROM stores data and instructions permanently. When the power is
turned off, the instructions stored in ROM are not lost. The instructions are written into the
ROM chips at the time of its manufacturing. When the computer is switched on, the
instructions in the ROM are automatically loaded into the memory of the computer. These
instructions prepare the computer system for use and display the initial operating system
screen. A variation of ROM is programmable read only memory (PROM). PROM is a ROM into
which you can load read only programs and data. Some microcomputer software packages,
such as electronic spreadsheets are available as PROM units as well as on interchangeable
disks. ROM and PROM are used in variety of capabilities within a computer system.
Difference Between RAM and ROM
Muhammad
Everything that is stored in RAM is lost when the computer is turned off. For this reason, it is
also called volatile memory. In contrast the Read Only Memory (ROM) is non-volatile memory.
Instructions can only be read from ROM. Instructions once written on ROM chip cannot be
changed. It is a permanent memory of a computer, i.e. the contents of this type of memory
are not lost when the computer is turned off. As soon as the computer is turned on, a program
that resides on ROM automatically makes the computer ready for use. ROM is a
semiconductor memory generally programmed by the manufacturer.
PROM (programmable read-only memory)
A programmable read-only memory (PROM) or field programmable read-only memory
(FPROM) or one-time programmable non-volatile memory (OTP NVM) is a form of digital
memory where the setting of each bit is locked by a fuse or antifuse. It is one of the type of
ROM (read-only memory). The data in them is permanent and cannot be changed. PROMs are
used in digital electronic devices to store permanent data, usually low level programs such as
firmware (microcode).
EPROM (erasable programmable read-only memory)
EPROM is programmable read-only memory (programmable ROM) that can be erased and reused. Erasure is caused by shining an intense ultraviolet light through a window that is
designed into the memory chip. (Although ordinary room lighting does not contain enough
ultraviolet light to cause erasure, bright sunlight can cause erasure. For this reason, the
window is usually covered with a label when not installed in the computer.)
EEPROM (electrically erasable programmable read-only memory)
A special form of EEPROM is flash memory, which uses normal PC voltages for erasure and
reprogramming. EEPROM is user-modifiable read-only memory (ROM) that can be erased and
reprogrammed (written to) repeatedly through the application of higher than normal electrical
voltage. Unlike EPROM chips, EEPROMs do not need to be removed from the computer to be
modified. However, an EEPROM chip has to be erased and reprogrammed in its entirety, not
selectively. It also has a limited life - that is, the number of times it can be reprogrammed is
limited to tens or hundreds of thousands of times. In an EEPROM that is frequently
reprogrammed while the computer is in use, the life of the EEPROM can be an important
design consideration.
MEASUREMENT FOR MEMORY & STORAGE
The
following
table
shows
the
prefixes/multipliers
of
Increases
are
in
units
of
approximately
(actually 1024). See: EXPLANATION
1 bit (binary digit*) = the value of 0 or 1
8 bits = 1 byte
1024 bytes = 1 kilobyte
1024 kilobytes = 1 megabyte
1024 megabytes = 1 gigabyte
1024 gigabytes = 1 terabyte
1024 terabytes = 1 petabyte
Abbreviations
1 kilobyte = 1 k
1 megabyte = 1 MB
1 gigabyte = 1 GB
1 terabyte = 1 TB
PUNJAB TEXT BOOK BOARD (COMPUTER CHAPTER # 4)
Zubair Faizi(0313-0049010)
BYTES
1000
Muhammad
1 petabyte = 1 PB
Size in "bytes"
Kilobyte (KB) = 1,024
Megabyte (MB) = 1,048,576
Gigabyte (GB) = 1,073,741,824
Terabyte (TB) = 1,099,511,627,776
Petabyte (PB) = 1,125,899,906,842,624
EXPLANATIONS and NOTES
The Decimal System is a base 10 number system that uses ten digits
(0,1,2,3,4,5,6,7,8,9).
1000 is attained as follows:
1 x10 = 10 x 10 = 100 x 10 = 1000 (kilo)
The Binary System is a base 2 number system that uses only two (bi)
numbers or digits (0 and 1) to represent all values.
The unit closest to 1000 is attained as follows:
1 byte x 2 = 2
2x2=4
4x2=8
8 x 2 = 16
16 x 2 = 32
32 x 2 = 64
64 x 2 = 128
128 x 2 = 256
256 x 2 = 512
512 x 2 = 1,024 bytes (1 kilobyte)
A "2 gig hard drive" means the drive holds "2 gigabytes" (2,147,483,648
bytes). Just one CD can hold 650 MB, so 2 GB could be filled with about 3
CD's.
Terabyte databases are becoming common, and rumor has it that there
are probably a few petabyte databases in the United States Pentagon.
DATA ORGANIZATION WITHIN BYTE
In computing, the most significant bit (MSB, also called the high-order bit) is
the bit position in a binary number having the greatest value. The MSB is sometimes referred
to as the left-most bit due to the convention in positional notation of writing
more significant digits further to the left.
In computing, the least significant bit (LSB) is the bit position in a binary integer giving the
units value, that is, determining whether the number is even or odd.
SECONDRY MEMORY
1. Hard Disk
2. Floppy Disk
3. CD-ROM (Compact Disc Read Only Memory)
PUNJAB TEXT BOOK BOARD (COMPUTER CHAPTER # 4)
Zubair Faizi(0313-0049010)
Muhammad
Secondary memory
Fast
Slow
Expensive
Cheap
Low capacity
Large capacity
Works
directly
processor
Not connected
processor
with
the
directly
to
the
2.
DESCRIBE IN DETAIL THE PURPOSE AND WORKING OF THE FOLLOWING
SECONDARY DEVICES
FLOPPY DISK
HARD DISK
FLOPPY DISK
It is a small removable, portable storage device that is made of polyester film coated with a
metal oxide compound. It looks like a 45 rpm phonograph record except that it is enclosed in
a jacket square in shape. It is readable by a computer with a floppy disk drive. The physical
size of disks has shrunk from the early 8 inch to 5.25 inch square and about 1-millimeter-thick
PUNJAB TEXT BOOK BOARD (COMPUTER CHAPTER # 4)
Zubair Faizi(0313-0049010)
Muhammad
(mini-floppy) to 3.5 inch square and about 2 millimeters thick (microfloppy) while the data
capacity has risen.
Steps for writing data on Floppy Disk
i.
ii.
The computer program passes an instruction to the computer hardware to write a data
file on a floppy disk,
The computer hardware and the floppy-disk-drive controller start the motor in the
diskette drive to spin the floppy disk.
iii.
A second motor, called a stepper motor, rotates a worm-gear shaft (a miniature version
of the worm gear in a bench-top vise) in minute increments that match the spacing
between tracks.
iv.
The read/write heads stop at the track. The read head checks the prewritten address on
the formatted diskette to be sure it is using the correct side of the diskette and is at the
proper track.
v.
Before the data from the program is written to the diskette, an erase coil (on the same
read/write head assembly) is energized to "clear" a wide, "clean slate" sector prior to
writing the sector data with the write head. The erased sector is wider than the written
sector -- this way, no signals from sectors in adjacent tracks will interfere with the
sector in the track being written.
vi.
The energized write head puts data on the diskette by magnetizing minute, iron, barmagnet particles embedded in the diskette surface, very similar to the technology used
in the mag stripe on the back of a credit card.
vii.
The diskette stops spinning. The floppy disk drive waits for the next command
HARD DISK
A hard drive is a magnetic disk on which you can store computer data. The term hard is used
to distinguish it from a soft, or floppy disk. Hard disk holds more data and is faster than floppy
disks. In general, hard disks are less portable than floppies, although it is possible to buy
removable hard disks. Todays computers typically come with a hard disk that contains several
billion bytes (giga bytes) of storage.
Capacity and Performance
A typical desktop machine will have a hard disk with a capacity of between 10 and 40
gigabytes. Data is stored onto the disk in the form of files. A file is simply a named collection
of bytes. The bytes might be the ASCII codes for the characters of a text file, or they could be
the instructions of a software application for the computer to execute, or they could be the
records of a data base, or they could be the pixel colors for a GIF image. No matter what it
contains, however, a file is simply a string of bytes. When a program running on the computer
requests a file, the hard disk retrieves its bytes and sends them to the CPU one at a time.
There are two ways to measure the performance of a hard disk
Data rate - The data rate is the number of bytes per second that the drive can
deliver to the CPU. Rates between 5 and 40 megabytes per second are common.
Seek time - The seek time is the amount of time between when the CPU requests a
file and when the first byte of the file is sent to the CPU. Times between 10 and 20
milliseconds are common.
PUNJAB TEXT BOOK BOARD (COMPUTER CHAPTER # 4)
Zubair Faizi(0313-0049010)
Muhammad
The other important parameter is the capacity of the drive, which is the number of bytes it
can hold.
DATA ORGANIZATION
In computer disk storage, a sector is a subdivision of a track on a magnetic disk or optical
disc. Each sector stores a fixed amount of user-accessible data, traditionally 512 bytes for
hard disk drives (HDDs) and 2048 bytes for CD-ROMs and DVD-ROMs. Newer HDDs use 4096byte (4 KiB) sectors, which are known as the Advanced Format (AF).
The sector is the minimum storage unit of a hard drive. All files must occupy at least one
sector, regardless of the file's actual size. In practice, however, operating systems typically
operate on blocks of data, which may span multiple sectors.
TYPES OF FORMATTING
Short for low-level format, a formatting method that creates the tracks and sectors
on a hard disk. Low-level formatting creates the physical format that dictates where
data is stored on the disk. Also see high-level format. Modern hard drives are lowlevel formatted at the factory for the life of the drive.
After low-level formatting is complete, we have a disk with tracks and sectors--but
nothing written on them. High-level formatting is the process of writing the file
system structures on the disk that let the disk be used for storing programs and data.
COMPACT DISK
MAGNETIC DISK
CD (Compact Disk)
Muhammad
An optical disk approximately 4.75 inches (12 cm) in diameter, on which a program, data,
music, etc., is digitally encoded for a laser beam to scan, decode, and transmit to a playback
system, computer monitor, or television set.
CD-ROM
CD-ROM (Compact Disc, Read Only Memory) is an adaption of the CD that is designed to store
computer data in the form of text and graphics, as well as hi-fi stereo sound. It is a nonvolatile optical data storage medium that is physically the same as an audio CD and is
capable of storing large amounts of data up to 1 GB, although the most common size is 650
MB about 12 million bytes per pound weight. All CD-ROMs confirm to a standard size and
format, so you can load any type of CD-ROM into any CD-ROM player. In addition, CD-ROM
players are also capable of playing audio CDs. A standard CD is 120mm (4.75 inches) in
diameter and 1.2 mm (0.05 inches) thick.
Magnetic Storage/Disk
1) Magnetic Tape
2) Magnetic Disk
Magnetic Tape (Tape Storage)
Magnetic tape is one of the older types of magnetic storage media. The magnetic tape
recorder was invented in 1928 and was primarily used for analogue audio recordings. A
magnetic tape is also a storage device from which you can access data serially like an audio
cassette from which you can hear the songs in the order in which they are stored. Serial
access is slower than the direct access provided by media such as diskettes. When you want
to access some particular data from the tape, the device has to scan through all the data you
do not need but that data is stored before the required one. The access speed can be quite
slow when the tape is long and what you want is not near the start. So the best use of the
magnetic tape is for the data that you do not use very often.
4.
Muhammad
The amount of data or the number of binary digits (0 and 1 bits) that can be written (stored)
on a linear inch of tape is known as the tape's recording density. Common recording
densities for multitrack tapes range from 200 to 6,250 bits/bytes per inch (BPI). Also note that
sometimes the density of a tape is referred to as the number of frames per inch (FPI) or
characters per inch (CPI) rather than BPI. Regardless of which term is used, a frame or byte is
a group of related bits that make up a single character written across the width of the tape.
Most magnetic tape units are capable of reading and writing in several different densities.
5. EXPLAIN THE PURPOSE OF THE FOLLOWING AND DRAW A DIAGRAM SHOWING
THEIR RELATIONSHIP
CASHE MEMORY
HARD DISK
MAGNETIC TAPE
1. Cache: Cache is used by the CPU for memory which is being accessed over and over
again. Instead of pulling it every time from the main memory, it is put in cache for fast access.
It is also a smaller memory, however, larger than internal register.
Cache is further classified to L1, L2 and L3:
a) L1 cache: It is accessed without any delay.
b) L2 cache: It takes more clock cycles to access than L1 cache.
c) L3 cache: It takes more clock cycles to access than L2 cache.
2) Main memory or RAM (Random Access Memory): It is a type of the computer memory
and is a hardware component. It can be increased provided the operating system can handle
it. Typical PCs these days use 8 GB of RAM. It is accessed slowly as compared to cache.
3) Hard disk: A hard disk is a hardware component in a computer. Data is kept permanently
in this memory. Memory from hard disk is not directly accessed by the CPU, hence it is slower.
As compared with RAM, hard disk is cheaper per bit.
4) Magnetic tape: Magnetic tape memory is usually used for backing up large data. When
the system needs to access a tape, it is first mounted to access the data. When the data is
accessed, it is then unmounted. The memory access time is slower in magnetic tape and it
usually takes few minutes to access a tape.
Below given figure shows the hierarchy of computer memory:
Muhammad
6.
Secondary memory (or secondary storage) is the slowest and cheapest form of memory. It
cannot be processed directly by the CPU. It must first be copied into primary storage (also
known as RAM).
Typically, secondary storage is used to back up primary storage through replication or other
data protection methods, which involves holding a secondary copy of the data.
The data in secondary storage may not be as current as the data in primary storage,
especially when backups are not policy-driven or automated. Secondary storage can also refer
to data that is less frequently accessed than primary or production data. Because it is
accessed less frequently, it can be migrated to secondary storage devices that perform at a
lower level than primary storage and are less expensive.
7.
High-level format, a formatting method that initializes portions of the hard disk and
creates the file system structures on the disk, such as the master boot record and the file
allocation tables. Also see low-level format.
An initial formatting of a hard drive that initializes the physical tracks on the surface or the
internal disks. The drive manufacturer performs a low-level format on the hard drive before
it is released
Muhammad
10
RAM (random access memory) is the place in a computer where the operating system,
application programs, and data in current use are kept so that they can be quickly reached by
the computer's processor.
ROM is inherently non-volatile storage - it retains its contents even when the power is
switched off, in contrast to RAM. ROM is often used to hold programs for embedded systems
since these usually have a fixed purpose. ROM is also used for storage of the lowest level
bootstrap software (firmware) in a computer.
A 9th CLASS STUDENT HAS A HOME COMPUTER SYSTEM, WHAT STORAGE
DEVICES, THE STUDENT WILL USE ON THE HOME COMPUTER SYSTEM.
EXPLAIN WHY THESE DEVICES ARE NEEDED.
Floppy Disk
Hard disk
CD
Tape
Explain them in your own words
8.
Muhammad
11