Memory and Storage-1
Memory and Storage-1
Primary Memory
C H A p T E R 0 l:J T L N E
4.1 INTRODUCTION
Computers are used to perform various tasks in science, engineering, business, education, entertain-
ment and many other fields. They work at high speed, can handle large volumes of data with great
accuracy and have the ability to carry out a specified sequence of operations without human interven-
tion. The CPU handles the processing of data and presents the results with the help of output devices.
However, the CPU requires memory to process the data, hold the intermediate results and to store the
output. So, computer memory refers to the electronic holding place for instrnotions 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 memo,y (to store the output).
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. Jt means that when the power is turned off, the contents of the primary memory are lost for-
ever. Hence, to store th~ data permanently, a computer requires some nonvolatile storage medium like
hard disk. This kind of storage is known as secondary mem.ory. Such memories store all the data (files)
/' ... 109
108 Introduction to Computer Science Primary Memory
Power
------ Table 4.1 Memory Units
(Volt) "
,I
Unit
J1
Symbol Bytes
Byte B 2° =I byte
Kilobyte KB 2 10 = 1024 bytes
Megabyte MB 220 = 1024 KB
Gigabyte GB 230 = 1024 MB
5
0 0 0 ~erabyte TB 2'° = 1024 GB
0 Time
(ns)
1 4 - - - - - - 8 bit= 1 byte - - - - - - - . i
Gigabyte: It consists of 1024 mefillb,Yles (I 0,73,741,824 bytes). It is the siandard unit of measure-
1
Figure 4.1 Bit and Byte ment for harcl 01slcs and is often represented as GB.
Terabyte: Tt refers to 1024 gigabytes anct'n often represented as TB. Terabyte memory is usually
1
associated with only super computers (Table 4.1). ---
and instructions (computer programs) even after the power is turned off. When memory is mentioned '1¾' Note: In modem computers, groupings ofbytes (usually 2 or 4) called computer words can reJ2:...,
it generally refers to the primary memory only, and when there is a mention of storage,,the second'. ~ ~hunks' of information. I
ary memory is referred. This chapter discusses the primary memory and its various facets such as its
,
types, how it works, what purpose does it solve, and so on . The secondary memory will be discussed 4.3 MEMORY HIERARCHY
in Chapter 5 in detail.
The processor is the 'brain ' of the computer, where all the e s s e n ~ e s take place.
However, unltite a numan bram, a computer processor has very limited memory. So, it has to rely on
4.2 MEMORY REPRESENTATION other kinds of memories to hold data and instructions and to store results. There are three fundamental
types of memory in a comRJW! system:
AU the quantities, physical or otherwise, are measured in some units. For example, length is measured ■ Internal Processor Memory: This memory is placed within the CPU (processor) or is attached
1 to a special fast bus. Internal memory usually includes cache memory and special registers, both
in meters and mass is measured in grams. Likewise, for measuring computer memory, a standard unit
is required. It is already known that digital comQuters work only on two states: ON (I) and OFF (0). of wruch can be directly accessed by the processor. This memory ts used tor temporary sto.!!ge
These two values are represented by two different voltages within the circuit: For example,,0 V rep- of data and instructions on wruch Oie CPO ts currently working. Processor memory ,s the fastest
resents a false value (0), and +5 V represents a true value (I) (see Figure 4.1). Each of these values among all the menlotieS, tmt IS most expensive also. Therefore, a very diminutive part of internal
(ei ther 0 or I) is called a 'binary digit' or 'bit' and can be considered a symbol for a piece ofinforma- processor memory is used in the computer system. It is generally used to compensate for the speed
tion. Although the smallest unit of data that a computer can deal with is a bit, the computers generally gap between the primary memory and the processor.
do not deal with a single bit. Instead, they deal with a group of eight bits, which is referred~as 'byte',. ■ Primary Memory: Random access memory (RAM) and read-only memory (ROM) fall under the
A byte can have 2~fferent bit Qatterns and-t ~an,I.ep~s.e.ut.25-6_different SY.mbols. category of the p,dw.ru;.y-menrnry, which is also known as mai11 memory. Every computer comes
Various units used o measure computer memory are as follows: I with a small amount of ROM, which contains the boot firmware (called BIOS). This holds enough
■ Bit: It is the smallest unit of data on a machine and a single bit can hold only one of two values: information to enable the computer to check its bardware and load JtS operattng system into RAM
0 or I.. Bit is represented by lower case b. at the time of system booting. RAM is the place where the computer temporarily stores its operat-
■ Byte~ unit of eight bits is known as aoyt:)Hence, a byte is able to contain any binary number ing system, application rograms aiicl current data so that the com uter w:,ocessor can reach t!'iem
b~tween 00000000 and Im I 111. It is represented by upper case B. I q~k'Tyir!rn]!sily. tis volatJ e II na ure, that is, when the power is switched off, the data in this
KIiobyte: In a decimal system, kilo stands for 1000, but in a binary system, kilo refers to 1024. memory IS lost. Unlike RAM, ROM is nonvolatile. Even when the computer is switched off, the
Therefore, a kilobyte is equal to I024 bxtes. lt 1s usually represented as KB. - contents of the ROM remain available.
Megabyte: licomprises I024 kilobytes or 10,48,576 bytes. However;siiice this number is hard ■ Secondary Memory: This is also known as auxilimy memoa. The secondary memory provides
---
to remember, a megabyte can be thougllt of as Iilil!@Llix@.. Megabyte is the standard unit of backup storage for instructions (computer programs) and data. The most comrnordy used secondary
measurement of RAM and is represented as MB. storage devices are magnetic disks and magnetic tapes. These are the least expensive as well as have
L ~
110 Introduction to Computer Science
. Primary Memory 111
Low Access Time: Access time is the time req uired between the request made for rcad/writ\;.operati on
/ Fast High
~
• and the time it takes for the c~ _!.e tion of the request. Generally. the access _!! me ~ a s ured fo r
u-9 / ~ "'- read opei>rrrions only. A fas ter access time is always 12 referable.Tnepnmary memory has a fas ter
""ij1;ceSS ume as compared to the secondary memory.
g_'r-7 Q
0«--/
01/ {vo/, cR
0~ egisters,
Internal
Processor
"'- ~ 0'5'
Access Mode: Access mode refers to the way the data are accessed from the me mory. The da ta
• from the memory can be accessed in the following ways:
_,;,,: S /' acne ?-
o'<? «,,0/ , lvlernory Memory "'- • Sequential: In this mode, the locations in the memory are accessed in a Qr_edefined sequential
0"'1/ (j order. Thus, the access time depends on the location of the data. Magn7 tic tape is an ex ample
1/, ~ ~ uenti ~I m_jQ.e . - -- - • - -- --
y(/ W
RA1v1. Ro1v1_1__ _P
Secondary Memory
"'-
--...__
'' ~
• Rariciom: Random access means that the locations in the memozy can be access,!:d in any order
regardless of the memory location that wasacc essed before. Thus the access time is indepen-
dent of the location of the data and it takes the sa;;:;;-amount of time to acces ~y Jq_cation .
- L - - - - - - - - - - - - ~"'o RAM is an -example of ranffornm ode. __..
• D1red: In some cases, tne data are accessed neither in a random nor in a sequential fashio n.
Figure 4.2 Memory Hierarchy but using a combination of both the modes. In this mode, the access timefo-;, all locations may
be the same or may slightly differ. i fi1s type of semirandom-mode exists in the magnetic disk.
n~uch larger storage capacity than primary memory. The instructions aod data stored on secondary • Physicaf Characteristics: The phys ical characteristics of a memory device can be cat.ego~
s ~ e v ~permai1enf m natur_sThey can only be remo_ved if the user wants It so or tlie device into four parts: electronic, magnetic, mechanical an~_OJ?.~- Irrespective of the physical charac-
is destroyed. I he secondary memory can also be used as ove,jiow memory (aTso known as virtual tenstJcs , one of the important requirements ofthe storage devices is that I.hey should exgjbit two
111e11101y), when the capacity of main memory is surpassea. No te that unlike processor memory and physical states, i.e. 0 or l. The access time of t11e memory depends upon how qi:;-i~kly the state
main memory, secondary memory is not directly accessible lo the processor. The data and instruc- can be recognized-antl"'cnanged. Obviously, the quicker the device recognizes the state. the faster
it will be.
tions from tbe secondarx memory have lo be shifted to the main me~ry..,2nd then to the process~r.
~ .__ ·····~ • Volatility: Some memories are volatile io nature, that is, they lose contents oo power failure . On
the other hand , some memories can retain information even after lie power tail u~, Such memo-
Figure 4.2 illustrates the memory hierarchy. The CPU accesses memory according lo a distinct hie;i\l.'_
ries are calle.d nonvolatile memones. A nonvolatile memory is always desirable. In a computer
chy. When tbe data comes from a pe1m a nent storage (e.g. hard disk) , first it goes in RAM. The ~eas~n
system, the primary memory 1s volatile, while the ~ary'tnemu1y 1s nonvolatile.
behind it is that if the CPU has to access the hard disk constantly lo retrieve every piece of requi;ed
~
data, it would operate very slowly. When the data are kept in primary memory, the CPU can access it
more quickly. Subsequently, the CPU stores the required pie~es of data and instructions in the proces-
sor memory (cache and regis ters) to process the data. 4.4 RANDOM ACCESS MEMORY
Random access memory (RAM) is like tl1e computer's scratch pad. It allows the computer to store
4.3.1 Storage Evaluation Criteria 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
Some memories are meant for larger storage s pace, whereas some are meam..fodi!_~ocessin~ of that they can be accessed quickly by the computer's processor. RANI is much faster to read from and
the data. Dd-ferent types of memories can be compared and evaluated on the basis of the followrng write to than the other k.tncls of storage JO a comp<1ter-'(fl'Ke hard disk or floppy disk). However. the
7ffi5j5'erties. data in RAM stays there only as long as the computer is running. When the computer is turned off.
■ Storage Capacity: Storage capacity refers to the size of the memory, that is, the amount of data M loses all its contents. When the computer is turned on again, the operating system and other
tnac Can be stored in the memory. The internal processor memo ry fi as [~ least capacity, which is file;ilfe mice again loadea into RArvf. When an application program is stru:ted. the computer loads it
usually expressed in terms of number of bytes and kilobytes. The primary memory (RAM) has into RAM and does all· the processing there. This allows the computer to nm the application faster.
lai·ger storage capacity than the internal processor memory, but less than that of the secondary Any new information, that is created ~s kept ih RAM-and since RArvt is volatile in n;J.ture, one needs to
1 · mory such as hard disk. Note ihat large primary memory__£rovides hi gher speel1 and ~e ~ continuously save the new information to the hard disk (Figure 4.3).
ondary memory provides more s ace to store data and instructions.-
■ Cost: 1e cost o memory 1s va ue y esumatrn o the cost per '>irof storage, that is , the co st of a ~ Note: Random access memory is also called read/write me11101y because, unlike read-011/y m em-
siorage unit for a given storage capacity. Obvio~ , a lower cost me~ ry is desirable. The co st ory ( ROM) that does not allow any write operation, ra11dom access memory allows CPU to read
per bit of storage of primary memory is higher than that of the secondary memory. as well as write data and instructions into it.
~
Primary Memory 113
112 Introduction to Computer Science
~.
Memory Modules
-
..
.\c \ ·
.,....,.... ~...
, ------- \I Lei us 111ke n s1mplc: c.·rnmple of why RAM is t~~cd by 1he com purer. Whenever o user cntcrs a .:om·
..
:I: :ind from 1hr kcyhonrd. the CPU interprets 1hc command :incl instrUcls Lhc h:inl cli~k to · lootf the
~ ~
,,. ',~-
•" ,.1.,. -~
"' )
\'
.
.
·• • l
111
co111111nnd or program into lhc main memory. Once lhe dn1:1 is loocled into the memory. the CPU is
. ·I•:'
nhk w access ii much quickly. The reason is 1hn1 lhc main memory is much foster than 1he set.-ondM)'
.\·..1,,:~~".
• .- "" . " ,· ' ' :> . • ~ . ' 111.:mory. The proce..--s of pulling things the CPU needs in a single pl:iec from ,, here it C!IO gel them
.,
0\ ;..;'::, "-·~~-~~-&.,-<~
I\~,,,~;;.· ~•~'i ·"" .•
~,!~·>·4 RAM 1:ikes certain amount of time to read/write da1:1. once the request hn.s been modi! b~l'\X.~ sor.
..... ..
This 1ime is known as access time nnd typicall'f.. RA1\l's access time varies trom 9-,o 70 ns. depending
upon its cype. Although lesser the nnnoseconds, b.!ner lhe access. user-pen:e.ived performance is ba.~
Figure 4.3 Random Access Memory on coordinating access times wilh the computer's clock cycles.. that is. CPU's processing speed. This
speed is measured in megahertz (MHz).
RAM 's speed is controlled by bus widlh and bus speed. Bus widrh refers 10 the numbcr of bits thnt
can be sent to the CPU simultnneously, anq bus speed refe.rs to the number of times a group of bits
can be sent eachsecond. For exampfe. a 100MHz 32-=bit CPU bus is capubte of sending -t by1es-;;f·
d ifls\J\lc\io!'I
darn, IOU numon timesper second to the CPU. By simply changing the bus width, the spe~ imd data
oataafl e volume can be increased. - - " •
is \oadad ifl\O \))
0
~aifl~e~ ~
. s\t\.lc\iol'
oa\a al'd \{\ c\.l? \of
4.4.2 Size of RAM
'o(ougn\ \o \ne .
Nf\ne( ?(ocess11'9 RAM is small, both in physical size and storage capacity. It comes in the form of separate microchip
modules lhat are plugged into RAM slot on the computer's motherboard. This chip connects through
a bus or set of electricnl paths to lhe processor. RAM is available in the capucity of 256 MB. 512 MB.
I GB, 2 GB and so on. Nowadays, a typicnl computer comes with I GB RAM and a hard disk that
can hold 160 GB of data. Having more RM, I in lhe computer reduces the numb.!r of times that the
1
computer processor has to read data from the hnrd disk. an oper,1tion thnt takes a much longer time
lhan reading data from RAM.
Consider the analogy with a drawing table. A larger drawing table allows the artists to create a
larger image. In addition. more space menns they can place more than one dmwing at one time,
and work on all at the same time. The drawing process includes a number of tools such as marl..1:.rs,
brushes, straight edges and pencils. If the table is smaller, lhe artists may have to put away some tools
on another table and get them from there whenever required. This process of putting away and getting
the 1ools is very slow.
. s\fUc\S c\iOfl As it is with the drawing table, so it is with RAM. More RAM gives the CPU more room to operate
c?\.ldl~is\(. \flS~c\10fl and it can continue processing without interruption as long as all needed infomtation is in the memory.
na( fld ifls
da\a a In case it is nol, lhe processing is interrupted until the needed information is retrieved from the storage
(e.g. hard disk) and placed into lhe memory. The more lhe interruptions. slower will be the computer.
figure 4.4 Random Access Memory Interaction Hence, If a computer has more main memory. it faces fewer interruptions and operates faster.
-~
~
• Primary Memory
115
-- -- -
32 bits to 64 bits and accordingly the comput-
- -32-bit
err are termed as 8-bit, 16-bit, :.--.---- .
and 64-bil
Figure 4.6 Fixed Word Length Memory
computers. The more the nuJJ1ber,9£.[ilis, p..e.~.o~d. the faster the fl ow of electronic signal and as a \
~
result, the compuier'wITi ;;--~ster (Figure 4.5). • ---~- - -
~
The main memory is accessed by referring the address of the corresponding cells. The cells are logi-
cally organized into rows and columns with each row and column having an address line and data line. C
~
12 5 1
10 2 1
Whenever data are 10 be read, the cplfseii(Js the memory address to the RAM controller. The RAM 1101 0
1 10 2 I A 12 5 2
controller, decodes the address into row and column address and sends first the row address and then A 1022td A
the column address through a very thin electrical line engraved into the chip. After that,,the contents D D 1253 M
D 1 10 3 K
D D
of the desired cell are transferred through the data bus and can be retrieved by the CPU. D 12 54 p
R 1104 E R
R
E E 1255 u
E
s s s
4.4.3.1 Fixed and Variable Word Length Memory The main memory of a computer can
s s s 12 56 T
be d ~ two ways: fiXJ.Q word length and-variable<WOrd-letl}lth. In fi xed word length mem· E E
E
E 1257
ory system. each memory location stores a fixed number of characters, which are equal to the word s s s
8
R
8
length of the computer. The computers that employ hxed word length memory approach are called 12 58
1vf!!.·d-addressable com~ters. In such computers, the storage space is always allocated in multiples of
word length. For example, if a word-addressable computer has a word length of 4 bytes and each
character (e.g. A, B, C, D, and so on) needs J byte of memory, then to store words like 'ill', 'BYE' Figure 4.7 Variable Word Length Memory
nnd 'MIK E', the computer will require one word (4 bytes) of memory. However, to store words like
'SUMMER', 'CLIMATE', and 'COMPUTER', the computer will require two words (8 bytes) of Both fixed and variable length memory approaches have their own advantages and disadvantages.
memory (Figure 4.6). The comparison between the two 1s a lows:
In _variable word length memory system, the mcmor~~ at each me~o~ ■ The fixed wor cngt memor approach offers a fas ter calculating speed than variable word
locnlio.!J..C,1n-s1,o nc character. Hence, the word 'HI' will occupy onl);]. bytes, ·MIKE w~l length approac . or example, if a word-addressa6le computerhas a word lengtli ofeighicharac-
occupy 4 bytes. and 'COM PUT will occupy 8 bytes of memory. The computers that employ van· ter'Mtr-en-to-iicld two eight-digit numbers only a single operation is required. On the other hand, in
ublc word length memory approach arc called character-addressable computers (Figure 4.7).
~'~
,,,, ,..
116 Introduction to Computer Science
character-addressable
.
and thus. total eight steps would be requrred.
---
computer, only one. digit of each number can be added in a single operation
.
Primary Memory
very fast but much more expensive than DRAM. SRAM is often used as cache memory due to its
~ . ' . ..
117
I The variable word len2th ~ memory approach optimizes the storage - space
...-- as- compared to th Dynamic RAM (DRAM): This RAM, unlike SRAM. muse be continually refreshed ro marntarn
1
fixed length memory approach. For example, consider the fixecl length memory system show 11 .e the data. This is done by placing the memory on a refresh circuit tiia[re'm!les the Cfaia"several
"'Figure 4.6, m which ilie \vordiength of the memory is of 8 bytes. Io case. most of the words in •li(iiiclred times per second. DRAM is used for most system memory because ir is cheap and small
less than 6 bytes, then it will result in wastage of memory space. However, in case of variable 0are (Figure 4.8).
--7' 1,r, "'""'""'"",ch~'"",~
leog<J,, ,o spare ls be p],ced la m,y memory cell. • •
~
~han DRAM for the same amount of storage space, thus making the manrrfactunng costs fuglier.
---
BSRAM
ene;ally, static RAM-is..._well suited for high-level registers, L 1 and L2 cache memory but is not used
,~'
as system s mam memory. --
PB SRAM In SRAM, each bit is stored on four to six transistors that form two cross-coupled inverters.
Figure 4.9 lllustrates a typical six-transistor SRAM cell consisting of two cross-coupled inverters
with access transistors at both ends. An inverter is a logic gate that inverts the digital signal driven as
its input. There are two bit lines (Bit and Bit) per column of SRAM cell. Bit lines are used to transfer
~
FRM DRAM
EDO DRAM
7""" data for both read and write operations. One bit line supplies the bit and the other supplies its comple-
ment. Access to a cell is enabled by the word line, which controls the access transistors that in rum
the cell sho,ld be coaaec,ed to bl, lia~ d,riog ilie =d/wri>e operarioa. SRAM
IBEDO DRAM I
j Dynamic RAM SDRAM
Access
IDOR SDRAM
RDRAM
I
Word
Line -
Transistor
VRAM Bit
Bit
l
Figure 4.8 Types of RAM Figure 4.9 Six-Transistor SRAM Cell
....
~ ·J I
~
manufacturino D
is almost identical to a processor manufacturing. A .
silicon
.
--------
substrate is engrav~w . .
The capacitor also has to be recharged whenever 1t 1s read from. becaose r ing
ead. from tJ,e capacitor
.
the repeated patterns of integrated transistors. The use of four to six transistors makes the SRAll,j c'.~
discharges it. lf the capacitor is not refreshed, it will lose its electrical charge and the cell will have a
bulkier as compared to DRAM. , hip
value of O(Figure 4.10). . . , ical
SRAM comes in following types:
Asynchronous SRAM (ASRAM): It is an older type of SRAM used in man)' PCs for L2 DRAM. is slower, less expensive and ~ 1es less_~~®J}!ter ~ motberbo~ ~ A typ M
DRAM may occupy one:rourth or even ess than the silicon area of SRAM. The:~" ~or ~e ~RA -
which works independently of the system clock. Thus, the CPU must wail for~ueste~che,
to be aller and less expensive is that it uses only one transi oumd a capacitor rn its cucunry as
Burst SRAM (BSRAM): Burst SRAM (also known as Synch Burst SRAM or synchronous S ·
com ared to four O!:._Six transistors used in S ike.SRAM. DRAM manulactunng 1s very si~lar
is synchronized with the system clock. This allows it to be more easily synchronized w· ~At)
device tl1a1 accesses ll and the ~~~~I~ IEs_s. However, i!._is e~nsive. ~ ll, ~ny
l~ manufacturing of a processor. A silicon substrate is engraved~ the repeated panerns. making
transistors and capacitors~which comprise each bit of data.
Pipehne BursrSitA'M'(PB"SRAM): PB SRAM requests are pipelined; larger packets of d , ~- ;;;;,r; - -r---, -· - --- ~
sent to the memory at once and acted on very quickJy. This type of SRAM is often ~sed ~la arc
it can operate at speeds higher than 66 MHz. caUSc 4.S.2.1 SRAM Versus DRAM The primary difference between SRAM and DRAM is the life of
the data they store. SRAM retains its contents as long as electrical power is supplied to the chip. lf the
power is turned off, its contents are lost. On the other hand, DRAM must be continuou_sly refreshed
4.5.2 Dynamic RAM 1..e f-<J,1, after about every 15 µs. This is true even when power is supplied constantly. SRAM chips are not as
dense as DRAM clups, that is, the total number of cells in th~chip.is.Jess.!!3ao that on DRAM
DRAM stands for dynamic random access memory. It is named so because it is very unstable. The chip. SRAM is beneficial because it is fast, has low latency (the time lag between a requesrmade and
data continue to move in aiRJ·6urofThemeriiorya's long as the power is avaifiibie.Ei;ctricrtyshould ~tion being performed) and need not be refreshed. However, it is large and expensive, requires
always flow through thecnip to keep refrcshingJhe~ y"."DRfvvf,ciepending on its type, has to be more power to ope~ produces a lot of heat. DRAM is ~.iJilQk..ill!aJiTrio]paceefficieilt: ftinay
refreshed approximately every 15 ms. The reason for this lies in DRAM's composition) A1l DRAMs be ilower and may ~ave_a longeLiatenc;._x,tban..SRAM,~.bUl..i~still very useful. Typical access time of
are made up of memory cells, where each cell is composed of one capacitor and one transistor. The SRAM is 25 ns, while that of DRAM is 60 ns.
capacitors by naturenold elecfi]ij!A.capacitor-tliat'lsfull of electr01isl~ ~£!!_siqered ON on having SRAM is useful for less amount of memory. Anything over 4 MB is very bulk]'. SRAM is good for
tbe value of I,_and an empty capacitor J.~.C!?.(11_ide~e~ !o~,<?FF, or having the vafue ·o~ When the internal memory in processors, and cache, but DRAM is best for system's main memory. DRAM is
capacitor is charged, it powers t~ of the_transi;;tor..The gate will then allow electrgns to,move trsed Wlitre its small size and power efficienc outweigh its slowness as compared to SRAM. SRAM
across the transistor. If tlfe"capacitocis.,nol cbar~hen very few electrons will be able to traverse 1 is less dense than · wer its per unit area) and is, therefore, not suitable for high-capacity.•
tfii'mlglrthe transistor. However, the gate is not 100 per cent efficient, so electrons slowly,Jeak ~ut of 1 low-cos • r-megabyte applications. The power consumption of SRAM varies widely depending ori
the capacitor until_it is discharged. As a result, tbe cell may lose its value. ,To prevent this, the capaci- its speed. Fast SRAM is much more power-Q_U..!)filY than DRAM and some !Cs can consume power
tor needs to be refreshed continuously. This puts DRAM in the class of volatile memory devices. 1 the order of a watt at full speed. Slow SRAM can have very low power consumption in the region of a
1
microwatt. Currently, the technology does not exist to produce small SRAMs so that they can replace
I
~~
Address Line DRAMs. Thus, DRAM is still used in computers. ~
I
4.5.2.2 DRAM Technologies DRAM technology has evolved over the last decade. w ~ d s ·
Transistor different kinds of DRAM. Some of the most popular DRAM technologies are briefed as follows:
■ !ast Page Mode DRAM (FPM DRAM.l.: Fast page mode DRAM is also called as page mode
DRAM, fast p~ e mode 111emon1 or_p.aglLJJJJ)de memo,y. It is the origlnEL ( ~ DRAM. The
memory controller waits through the entire proce1ss of locating a bit of data by column and row
Capacitor address and then reading the bit before it starts on the next bit. The controller sends the row and
column _add~ o!
the .first bloc_k ~ th,:!!_it.£_0 be ~ d. After that, the column'address is
I=
automatically incremented, allowing tlie controller to access the next location without havino to
su ~ s. That is, FPM DRAM does not require the row address to be specifie/for
each request as it assumes that the next block of data is on the same row. Clock timings for this
Bit DRAM are typically 6-3-3-3 (i.e. 3 clock cycles for access set11p, and 3 clock cycles for the first
Ground Line
and each of three successive accesses based on the initial setup). FPM DRAM is slow and has an
Figure 4.10 DRAM Cell access time of 60-120 ns. Due to its slow speed. FPM DRAM is replaced by EDO RAM.
--'
,...
,~ Primary Memory 12 1
11,20
~ - ~ln~~~
mxfu'.:ctio
'.'·:'.'.n~to
.'. ~ Co~m ~p~ute~r~Sc
::=:i:
en:.:.c:=--
e --------------
-
• Extended Data Out DR.A:\! (EDO DRAM'>: It ~
------
1 faster lhan FPM DRAM 1::,1
Control line ,--.
is =Ily found on 66 MHz m~--crs:- EDo memory funher enhances the m~thod of ~
Vihil.e !he~ zre beulg read f r ~ bloc_k. !he memory controller can listen to the ~
in:structio:i. This dpZbility results in incr~<erl performance as the memory controller n~ ~
-__ · .J~, ;~'"'" ''°''OD zfte:r reaniDg one block of dala However, EDO RAM can001nn.....
1,1,.n~r... .... =~ . . .
OI!.? bus spc.af f251.a thzn 66 ~ L so. wilh !he mcr~a.smg use of higher bus speeds, EDO P,A,\f
-.....,~ ~l ~1
'- - 1~
has lost its sizmhciiice. -
■ Burst Ex:tenrled Data Outpnt DRAM (BEDO DRAM): Original EDO RAM was too slow~
the =er sysu:ms being developed at that time. Therefore, a new method of ~emory <JCce<; Memory
kno?m as buTJting. h2d to be ~ -eloped to speed up !he memgry access. Accordmg to this lecfi. Controller
oique. when if.e dzta from one requested memory address is retrieved. _the me~ory controJJtr
bu15l5 intoJOf nc,;t few bJoc!'.S oi recoi'a.s ana reads~ose as well. The idea behmd Ibis .is lfua
most of the time the dzta need!0 by the CPO wrli be m sequence, then why to locate that hloci
~Jar the oe,;1request. If the next requested block is !hat_extra block, the memory controller
can~ f e r the data to the CPU. thereby reducmg any delays due to the preceding I I
memory r~ . Thisf~clmology increases the speed of EDO P ~ p lo aroun ~ ..J
.5ti!J~ sianJ,y.,Jii...6us..$p.e@sAver_o(£ Mlf~ _}3EDO RAM was an
effort to mar.e EDO RAM compere with SDRAM. However, because of lack of support from the
manufacturers, BEDO DRAM is no1 widely used. Intel and 01her manufacturers prefer SDRAM
Address Line I
==-instead.
■ SynchroDDUs DRAM (SDRAM): It is the most common type of RAM used in systems today. Ji
is synchronized at the system SJY...ed. This implies that the daia sto_ffiGii]ie memory is refreshed Data Line
at system speed. Also, the d2ta are accessed in memory at system speed. SDRAM..cmploys the
burstin~ y to i~ e !he performance. Because of running at system speed, the speed Figure 4.12 SDRAM and DOR SDRAM
of SDRAMmust i&roematcheaw'flh !Jrt:r peed of 1he motherboard. For example, if we are using
a motherbo-<1fd of 100 MHz, we need SDRAM of 100 MHz.
■ Rambus DRA.\1 (RDRAM): It was dcve/o~ bus, Inc. and endorsed by Intel as the sue,.
cessor to SDRAM. RDRAM narrows the memory busioTTioiiand runs at a speed ~p to 8_2Q.MHz and high voltage, usually millions of times per seconJsDRAM acts on the low-10-high transition
Since this narrow bus takes up less space on the board, !he speed of the system can e mcreased by of t e c oc an i0 nore e o - o- o\Vtra:nsr the other band. DDR SbRAM acts on 6oifi
running multiple channels in parallel. Despite the speed, RDRAM has had a tough time taking off l?lln!1 ns, ereby halving the reguired~cloc,k.rate for a_g,iven data,transfer rate...pro.y_ided the cbip--
in the marker because of compatibility and timing issues. It is also costly (Figure 4.11). sei supports i1:-Most manufacture;;-prefer this DRAi\1 oyer Rambus ~ ~ u ~ n o r "iiianx._
■ Double Data Rate Synchronous DRAM (DDR SDRAM): This DRAM is similar 10 SDRAM changes are required to be made.,lilSD.RAM to manufac.wre..DDR.SDRAM.JJJ addition. memory
except tlu;t it has higher bandwidth, which means grea1er speed. All types of SD RAM use a clock' makers are freelomanura:cw;;il because it is an o~ stao\!_arp. whereas !hey would have"io'"p'ay
license fees to Rambus,1n1:: 1omake"RDRAM (Figure 4.12).
----
signal that is a square wave. This means that the clock alternates regularly between J~ g e -
■ Video RAM (VRAM): VRAM is a dual-ported version of DRAi\.1 fonnerly used in graphics
adaptors (a component of a computer, designed 10 display images on a display medium like a
moimoi-). It was designed to provide two access paths 10 each memory address. When the video
controller reads the memory for intonnadon. it accesses an address with one of the paths and
~
when the CPU writes daia to the memory. it accesses the address from the other paih. I his unique
I _,n.,
Mem~ ~~ feat!Jfe-of-V-MM-aH~ad from and wriuen to at the same time. A special type
of VRAM, called Windows RAM (W&:!¥). yields even heller perfonnance lhan conventional
I VRAM. WRANI supports two ports, which enables a video adapter to fe1ch the con1ents of the
memory for display at the same lime when new bytes are being pumped into the memory. This
Figure 4.11 Rambus DRAM results in much faster display than it is possible with conventional single-port RAM (Table 4.2).
~
..
,,,-1 ...
,
122/
-
l~troduction to Computer Science
~..,. ~\}~
Technology I
Table 4.2 Comparing Types of DRAMs
UsedAs
Characteristics
--- in nature. that is. its contents arc not lost when the
owcr is switched oft.The data and instructio ns
Primary Memory 123
aJ1.;l~'tu
■ Prior to EDO DRAl'vl, it was the most c;;-- ~ d in ROM can only be read and used. but can-
Main memory Ill- ~~
FPMDRAM not be altered thereby making RO!vr much safer
Low-cost video memory man type of DRAM. ~
■ Compared to other DRAMs, its access speed
and secure than RAM. _ROM chips are used not ~
BEDODRAM Main memory ■ Not widely used because not supported1 b0 informatio n ar~ m~~ for speci,tic_c:;9nf!gura~
~ fiy<li fferent categories of c_oi:nputers _ai:e
.
Low-cost video memory processor c h"1pset m ak·ers. ' ,
_I
l meant for performing different tasks. For example.
l , .
■
■
Faster than EDO DRAM.
4-1 - 1- 1 at 66 MHz access speed. . a ~rogram, calledsysiem boot program, con-
tains a series of start-up instructions to check the
SDRAM Main memory ■ Generic term for DRAM with. a synchronous hardware, that is, 1/0 devices, memory and operat- Figure 4_ 1 3 ROM B 105 C h ip
interface. ing system in the memory. These programs deal ~
■ Simpler design. with low-level machine functions and are alternate for additional hardware requirement. ROM per-
■ Faster transfer rates than standard DRJ}M. forms tile neces.sMY.BIOS_ CJLasic in ut/ou ut syg_eJ;Il_} functu:u1,,10 start the system and then transfe_TS
■ Intel and Rambus, Inc. architecture. t1~ ~ 1 1 : ~1a..the.operating-s.ys1em. ,
RDRAM Video memory
~ can have data and instructions written to it only one time. On!;e a ROM chip is programmecL
■ Up to 600 MHz access speed.
it cannot be reprogrammed or rewritten. If it is erro neous. or the data need to be reorgaruzed_ one lt;IS
■ 10% costly than standard DRAMs.
to rep lace it with the new chip. Thus, the programming of ROM cnips s hould be perfect. having all the
DDR SDRA!vl Main memory ■ Activates output on both the up and the down required data at tile ume of its manufacturing. Note that in some instances. ROM can be changed us mg
part of the clock cycle, doubling the data cemrin--rol'.llS. f'or elrample, flash ROM (a type of ROM) is a nonvolatile memo ry that can occasionally
rate SDRAM. be changed sucb as when a BIOS cnip must be updated. The ROM cnips consume very little power
I
■ Up to 200 MHz access speed. and arc extremely reliable, and in case of most small electronic devices. contain all the necessary
VRAivl Hig her-cost video memory ■ Dual-ported, meaning a new image can b[
programming to control the device (Figure 4 .13).
stored in RAM, while a previous image'is
\,
being sent to the display.
■ Twice the speed of DRAM.
■ Large packaging and mar~ expensive than
4.6.1 ROM A nalogy
e::--
Picture a bulletin board under glass at the back of a classroom. One way to th.ink of ROM is that it is
DRAM. I J similar to the hard-copy notes placed under tile glass. At the end of the day. they remain unchanged.
The next day, the notes are exactly the wny they we re the day before. Students are able to only read
~
them . RAM can be thought of as a blackboard; it starts out blank. During the day, information is
4.6 REA D -ON LY MEMORY written on it, read from it and even erased from it. \,Vhen something is erased, new information is
then written on to the same place on the board. When the students go home at the end of tile day. the.
Just like a human being needs instructions from 1he brain ta pecforn:i..ac.ti.ansliw:.ertain event, a com- blackboard is washed clean and whntever data was on the board is cleared. This is what happens when
puter also needs special instructions every time it is started. This is requi red because during the a computer's power is turned off. RAM no longer has the e lectrical current available 10 s ustai n the data
start-up operation, the maiiin'iemuty crr'lhe computer is el)1pty due to its v9latl le QJ;gl~ !lY, so !here has in its memo ry cells. ROM is more like your long-term memory; the thi ngs you remember from your
to be some instructions (special boot programs) stored in a special chip that could enable the ~ompu~e; past. When you wake up in the morning, you get ready for school/office and know the address of your
system to perform start-up operations and transfer li?e coiilrol lo Ifie ope1ming' system. Tl11s •spec~a destination. Simi larly, when computer 'wakes up', it searches for start-up routines from ROM BlOS
chip, where the start-up instructio ns are storecl, 1s called read-o,,iv we11 w,J:-<:tsfL_Nf1,-lt is nonvolallle and then hand over the control to the operating system to func tion properly.
(
,,A
124 Introduction to Computer Science
. Primary Memory 125
4.6.2 RAM, ROM and CPU Interaction --------- Every time so methlng is loaded or opened, it is pl aced into RAM so that the CPU can access r.har.
information more easily and promptly. The CPU requests r.he required dar.a from RAM. processes it
The most essential part of computer processing is the memory. From the moment the •cornpui . and writes new data back to RAM in a continuous cycle. In most computers, this s huffling of data
. 1 . . ~.
turned ON and until it is shut down, the CPU constantly uses memory. A typ1ca scenario 1s listed as between the CPU and RAM happens millions of times every second. When the application is closed.
follows: the application a nd any other accompanying files are usually erased from RAM to make space for the
Step 1: Toe computer is switched ON.
new data (Figure 4 . I 4 ) .
Step 2: CPU loads data and insu:iictions fro~ ROM and checks whether all the major comp,oncn
like processor and hard disk are function mg properly. ,1 4
Step 3: CPU loads BIOS (basic input/output system) from ROM to determine the machine's fi
damental confi guration and environment. The information stored jn ROM BIOS .c~; 4 _7 TYPES OF ROM
determfoes what peripherals the system can support. Memories in the ROM family are distinguis hed by the methods used to write ~r.a,on r.hem and_the
Step 4: CPU loads the operating sys tem from the secondary storage (hard disk) into RAM. :nu number of times they can be rewritten . This classification reflects the evoluuon of ROM devices
allows the CPU to have immediate access to the operating system , which enbances,the per-s from ' hard-wired ' to programmable to erasable-and-programmable. One common feature of ~I these
formance and functionality of the overall system. devices is their ability to retain data and programs even during a power failure _ There are different
Step 5: When an appHcation is opened, it is loaded into RAM and any file that is opened for use i types of ROMs, which are as follows:
that application is also loaded into RAM . n ■ Masked ROM: The, very first ROMs, known as m asked ROMs. were bard-wired devices that
Step 6: After processing, when the user saves the file and closes the respective appHcation, the file · contained a preprogrammed set of data or instructions. The contents of such ROMs had 1.0 be
written to the specified location on the secondary storage device. After that the file(s) and 1~: specified before crup production so that the actual data could be used to arrange the tranSisr.ors
appHcauon are ' flu shed out' from the RAM.
inside the crup.
■ Programmable ROM (PROM): Creating a ROM crup from scratch is a time-consuming and an
expensive process. For this reason, developers created a type of ROl\11 known as programmable
read-only memory (PROM), wrucb can be programmed. Blank PROM chips can be bough!. eco-
fl.AM d p_;,...M nomkally and coded by the users with the help ofa special device known as PROM-programmer.
However, once a PROM has been program.med, its contents can never be changed. As a result.
II!:..__ -p\j --- . - . - . ? ',fA PROM is also known as one-time programmable (OTP) device. Like other ROMs, PROM is also
....- - - - ~ ~ r.P\J nonvola tile. However, it is more fragile than other RO Ms as a jolt of static elecoicity can easily
cause fu ses in the PROM to bum out, thus changing the bit pattern from I to 0 . Nevertheless, blank
~--
- ..---:?---- ~
-
' ' ' -~~~
~oM
~-- ~~
- - ;;.,;.-.;::
~
■
PROMs are economical and are great for prototyping the data for a ROM before committing to the
costly ROM fabrication process.
Erasable Programmable ROM (EPROM) : An EPROM is programmed in exactly the same
manner as a PROM. However, unlike PROMs, an EPROM can be erased and reprogrammed
When computer is in OFF state, ROM contains d~
but RAM does not.
"' •
When computer 1s turned ON, the CPU reads dala
· '
and repeatedly. It can be erased by simp ly exposing it to a strong source of ultraviolet (UV) lighr.
In struct.ions from ROM which are used for booting up. for a certain amount of time. Note that an EPROM eraser is not selective. It will erase the entire
'' t,
= p\J
EPROM. Although EPROM is more expensive than PROM, jts ability to be reprogrammed makes
it more useful.
. - ...,__:: ■ Electrically Erasable Programmable ROM (EEPROM): Trus type of ROM can be erased by
an electrical charge and then written to by using slightly rugher-than-normal voltage. EEPROl'vI
can be erased one byte at a time , rather than erasing the entire crup with UV light. Hence, the
process of re-programming is flexible, but slow. Note that neither the chip bas to be removed for
rewrite nor the entire chip has to be completely erased to change a specific portion of it. In addi-
twn, changing the contents does not reqrnre any additional committed eqwpmenL Because these
~~;~;.u read from and write data and instruction s
chips _can be changed without opening a casing, they are often used to store programmable instruc-
tions in devices like printers.
• Flash ROM: _Flash ROM , also called flash BIOS or flash memory. is a type of constantly pow-
Figure 4.14 RAM, ROM and CPU interaction
ered nonvolaule memory that can be erased and re-programmed in blocks. It is a variation of
~
,,-,~
126 Introduction to Computer Science Primary Memory 127
L immediate manipul ati on a nd to keep track of what is c urrently being processed. fl is the place ,n
....___
With UV light.
Chapter 5
Secondary Storage
C H A p T E R 0 u T L I N E
I Introduction
• Magneto-optical Disk
I Classification of Secondary Storage Devices
• Memory Stick
I Magnetic Tape
• Universal Serial Bus
I Magnetic Disk
• Mass Storage Devices
I Optical Disk
5.1 INTRODUCTION
In Chapter 4, we discussed about primary memory, which is volatile in nature and has a very limited
storage capacity. This kind of memory is mainJy used for processing the data. Being volatile, primary
memory cannot hold data or instructions once the computer is switched off. Therefore, a computer
requires more stable (nonvolatile) type of memory to store all the data (files) and instructions (pro-
grams) even after the computer is turned off. This kind of memory is known as seco11da1)' memo,y or
auxiliary memo1y or peripheral storage or seconda,y storage. As opposed to primary storage, which
tbe Central Processing Unit (CPU) uses for processing data and instructions, secondary storage is
used to store data and programs when they are not being processed. Secondary storage includes
devices like hard disks, floppy disks, CDs and magnetic tapes, The secondary storage devices have a
larger storage capacity. They are less expensive as compared to primary storage devices, but slow in
comparison.
132 Introduction to Computer Science
• Secondary Storage 133
tt
storage • Capacity: The secondary storage devices are used by organizations so that they can s tore large
volumes of data (equivalent of a room full of data on paper) in sets of disks that take up less spa~e
Input
- w..&J.J"--. . . .,
f.w]1m1;:f) :Bl
. D
=.,,_ fu---
' 9
than a breadbox. A simple wskette holds the equivalent of 500 printed pages or one book. An opu-
cal wsk can hold the equivalent of approximately 500 books.
• Reliability: The data in secondary storage is safe because secondary storage is physically _reliable.
However, sometimes, the disk may fail, but the overall reliability of secondary storage 1s excel-
·~ lent. Moreover, it is more wfficult to tamper or illegally access the daca on secondary storage as
'2 1• Processing
compared to data stored in traditional file cabinets.
• Convenience: With the help of a computer, authorized people can locate and access data quickly.
• Cost: It is less expensive to store data on a tape or disk (the principal means of secondary storage)
than to buy and house filing cabinets. Data that are reliable and safe are less expensive to maintain
than data subject to errors. Nevertheless, the greatest savings can be found in the speed and con-
venience of filing and retrieving the data.
• Reusability: The data remain in the secondary storage as long as it is not overwritten or deleted by
the user. When the data are placed in the RAM, the computer actually makes a copy of that data in
Figure 5.1 Basic Compute r Operation
the memory. The user can change the data as per requirement, and in case he/she wants to revert to
p In this chapter, different types of secondary storage devices a long with their characteristics and
working principles have been discussed.
These benefits apply to all the secondary storage devices, but some devices are better than the others. In
the following sections, we will begin with a look at the various secondary storage mewa, including those
Modern computing systems cons ist of four hardware components: cenrral processing unir, main mem- used for personal computers, and then,consider what it takes to get the data orgaruzed and processed.
01)1, seco11da1)' srorage and inpur-outpur devices that interact with end users. The input device is used
for providing data to the computer. The CPU processes this data and provides the output via the output
device. The secondary storage is used to store the data and instructions permanently. These data (files) 5.2 CLASSIFICATION OF SECONDARY STORAGE DEVICES
and instructions (software programs) are then loaded in the primary memory (RAM) so that the com-
puter cun process the data efficiently. Once the output is presented by the computer, if the user wants, The secondary s torage devices allow permanent storage of data and instructions. The data stored on a
it is stored on the secondary storage (Figure 5. 1).
secondary storage device can be accessed, depending upon how it is stored on the d evice. Primarily.
Imagine how many filing-cabinet drawers would be required to hold mjlJions of files of, say, tax there are two methods of accessing data from the secondary s torage devices:
records kept by a big corporation. The record storage rooms would have to be enormous. Computers, ■ Sequential: Sequential access means that the computer system mus t search the s torage device
in contrast, pennit storage on a tape or disk in extremely compressed fom1. Storage capacity is ungues· from the beginning until the desired data are found. The most common sequential access stor-
Lionably one of the most valuable assets of the computer. Secondary storage is the storage space where age device is magnetic tape, where data are stored and processed sequentially. Suppose, a tape
one cnn store software and data on a semipermanent basis. It is necessary because primary storag~ can contains information regarwng employees of an orgaruzation. Now, to look for employee number
be used only temporarily. The user probably will like to store the data tha t he/she derives from process- lOO's information, the computer will have to start with e mployee number 1 and then go past 2, 3
th
ing; at is why secondary storage is needed , Furthennore, main memory is limited in size, whereas and so on, until it finally comes to 100. The sequential access method is quite simple than other
secondary storage media can store as much data as necessary. methods but searching for data is slow.
~
111
Secondary S to rage 135
134 Introduction to Computer Science
--------- •ze~ such as ½-inch wide tape wound on a reel or 1/4-inch wide tape used in data cartridges and hc:15h-
51 - . . . . . . l d the s peed at w ic
ttcs However, the maJor differe nce between different magnetic tape units rnc u e
se · . . - Th t of data o r the
the tape is moved past the rcad/wrrte head and the tape's recording density. e amoun .
f11~
number of binary digits that can be stored on a linear inch of tape is the recording densi_ry of the_tape.
Common record ing densities for magne tic tapes range from 200 to 6250 bits/bytes per rn_ch ( bpi )_-
Note that sometimes the densi ty of a tape is referred to as the number of frames per m~h (fpi ) or
characters per inch (cpi ) rather than bpi. Regardless of which term is used. a frame o r byte 1s a gro ~p
of related bits that m ake up a sing le character written across the width of the tape. M os t magnetic
Figure 5.2 Sequentia l and Direct Access tape uni ts are capable of reading and writing io several different densities. The tape s peed ( or tape
movement) varies largely from less than 50 inches per second to m ore than fOO inches per second.
ll~ }-!ow fas t a tape uni t reads and writes is specified as the character trans fer rate, which is calculated by
•H multiplying the speed of the magne tic tape unit by the character density.
Secondary Storage
Devices I Magnetic tapes are very durable a nd can be erased as well as reused. They are the least expensive
and a reliable storage medium for organizing archives and taking backups. However, they are not
suitable for data fiJes that need to be revised or updated often because the data on them are stored in
Sequential Access D irect A ccess
Devices a sequentia l manner. Every time the user needs to advance or rewind the tape to the position where
Devices
the requested data s tart. Tapes are also slow due to the nature of the medfa. While data transfer can
be increased by increasing the speed of the tape, this can lead to two problems. One problem is that
Magneto- Memory
Magnetic Tape
Optical Disk
the heads are more likely to miswrite due to the tape not being under the head long e nough. The other
Stick
problem is re lated with the durabi]jty of the tape media itself-the faster the tape is started, pulled
and stopped , the more it will stretch. If the tape stretches too much, then it will render itself unusable
for data storage and may result io data loss. The tape now has a limited role because disk has proved
to be a s uperior storag~ med ium, than it. Disk data are qui te re.liable and can be accessed directly. as
opposed to data on the tape, ~hic)1 can be accessed only seque ntially. Thus. today, the primary role
,(,
of the tape drive is limited to backing up or d1:1plicating the data stored on the hard disk to protect the
Figure 5.3 Classificatio n of Secondary Storage Devices system against loss of data d uring power fai lures or computer malfunctions.
Direct: Direct access, also known as random access, means that the comp uter can go directly to 5.3.1 Magnetic Tape Organization
the location, where the data that the user wa nts are stored . The m ost com mon direct access >stor-
age devices are magnetic disk and optical d isk. In these devices, the da ta are stored as a numbered Magnetic tape drive uses two reels: supply reel and take-up reel. Both reels are m o unted o n the
sequence of blocks. Thus, one can access bl ock 12, the n block 78 and the n block 2. The direct hubs and the tape moves from the suppl y reel to the take-up reel. Fig ure 5 .4 s hows the basic tape
access method is ideal for applications li ke airline reservati on system s or comp uter-based direc- drive mechanism . T he magnetic oxide-coated side of the tape passes d irectly over the read/write head
tory assistance operations as in these applications, there is no fixed pallern of the requests for the assembly, thus making con tact with the heads. As the tape passes under the read/write head . the data
datn (Figure 5.2). can be either read and transferred to the primary memory or read from primary m emory and written
onto the tape . Once the tape is loaded , it is said to be online, that is, it is ready to be used for data
Based on the access method, the secondary storage dev ices can be c lass ified as shown in Figure,5.3. access, and whe n the processing is over, the tape is removed fro m the tape drive. This is known as
ofj/ine storage, tha t is, the data are stored away from the computer system, and it cann o t be accessed
by the computer unless the tape is re loaded o n the tape drive.
5.3 MAGN ET IC TAPE The magnetic tape is d ivided into vertical columns (frames) and horizontal rows (channels or
tracks). The data are stored in a s tring of success ive frames w ith one character per fram e and each
Magnetic tape looks like the tape used in music cassettes. It is a plastic tape w ith a magnetic coating frame spans multip le tracks (usuall y seven or nine tracks). T hus, a single bit is s tored in each track.
on ii. The data are stored in the form of tiny segments of mag ne ti zed a nd demagne ti zed ,portions on that is, one by te per frame as shown in Fig ure 5 .5. The re maining track (7th or 9th) is the parity u·ack
dcnrngnet1 zed portion refers Lo the bit value 'O'. Magnetic tapes are avail able in di fferent forms
:n:
the surfac~ of the 1~iaterial. Magneti~ed portion of the su'.·face refers to the bit ~alu_e •I •, whereas that stores the pari ty bit. W he n a byte is wri tten to the tape, the num ber of Is in the byte is counted, and
the parity bit is the n used to make number of l s even (even parity) or odd (odd pari ty). \Vhe n the tape
~
137
secondary Storage
;
o_. ~
~ /j
,¢,o
Usable Surface
"""' by ao ,rr,ogeme,t of lamp< a,d/m photodiode ""'o" to ;odi"" the location from wbe«
reading and writing is to begin and end (Figure 5.6). .
On a magnetic tape, data are recorded in the form of blocks, where each block consists of a group-
°'
'"" of''" (k,ow, "' n,eoni,) that is =lttrn ,cad itt , rn,tio"31 marutoc. E,eb block ean bold oo<
:mon, n,eotd< Md this P"'"'' is known "' b/oeki, g, and the munW oft«o,-d, ,vouped togethoc in
each block is known as the blocking factor. Between the blocks, the computer automatically reserves
0
I J+--- Vacuum ~
Columns
some blank space called inter-block gap (!BG). The records within each block are again separated by
a blank space (usually 0.5 inch) known as inter-record gap (!RG). These gaps allow proper timing for
record access. To be precise, in case of reading data from a moving tape, whenever an 1RG is reached,
Figure 5.4 Bas ic Tape Drive Mechanism the moving tape is stopped. Jt remains in immobile motion until the record is processed. Smaller gaps
allow more data to be stored on the same size of the magnetic tape. The length of theses gaps varies,
depending upon the method of recording. If single records are stored on the tape. the IRG may be
is read again, the parity bit is checked to see if any bit has been lost. In case of odd parity, there must 1
longer than the portion of the tape used to store the records. Therefore, much of the tape's recording
be an odd number of Is represented for each character and an even number of ls in case of even parity. I
A magnetic tape is physically marked to indicate the location from where reading and writing on surface is wasted (Figure 5.7).
tape is to begin (BOT or beginning of tape) and end (EQT or end of tape). The length of the tape I
between BOT and EOT is referred to as the usable recording (reading/wri ting) surface. BOT/EOT
markers are usually made up of short silver stri ps of reflective type. The BOT marker is placed towards R
R R
the front edge and the EOT marker is placed towards the back edge of the tape. These markers are R E
E E
E
C cl
!RG lg IRG !RG
C
0
!RG 0
R
!RG 0
R
IRG
R R
D D D
,1D
(a) Unblocked Records (Single)
R R R R R R RR RR
R RR RR E E E E E
E E E E E E E E E E
C CCC C IRG
C CCC C IRG IC C C C C IRG 0 0 0 0 0
IRG 0 0 0 0 0 00000
R R R R R R R R R R
R RR RR D D D D D
D DDDD DDDDD
I
5.4.1 Storage Organization of a Magnetic Disk S.4.2 Storage Capacity of a Magnetic Disk
The surface of a disk is divided into imaginary tracks and sectors. As shown i~ Figure 5.8, the tracks are ~;:;!ways wants to ha~e the highest amount of data stored in ~e least p~ssi_ble space. So. several
concentric circles where the data are stored, and are numbered from the outermost to the innennost ring, • eters must be considered while findioo out the capacity ot a magneuc disk. These parameters
starting from zero. The disk sectors refer to the number of fixed-size areas (imaginary pie slices) that 1ncude
1 num ber of recording surfaces, number o of tracks per surface, number of sectors per track and
can be accessed by one of the disk drive's read/write heads, in one rotation of the disk, without changing 0th:mber of bytes per sector. Therefore, one can define storage capacity of a disk as a multiple of all
the position of the head. An intersection of a track and a disk sector .is known as track sector. Generally,
above parameters.
~
.
'
l.A--
~
Secondary Storage 141
140 Introduction to Computer Science
~
Disk Arm
Read/Write
Assembly
Shaft Cylinder Head
!
:. :_:_.·: :_ :t:si~T;:ks·:
Access Arms - -
Slide in and out
Read/Write Tracks
Heads
Figure 5.9 Disk Pack and Cylinder 2. Rotate: Once the heads are positioned on the desired track, the head of the specific platter is acti-
vated. Since the disk is rotated constantly, the head has to wait for the required sector or duster
Storage capacity of a magnetic disk = Number of recording surfaces (desired data) to come under it. This waiting time is known as rotational delay rime or latency of
x Number of tracks per surface the disk. The latency of a disk with 7200 rpm is 4.17 ms.
x Number of sectors per track 3. Data Transfer: Once the read/write head is positioned over the desired sector, the data can be
x Number of bytes per sector transferred to or from the disk to the primary memory. The rate at which the data are read from
or written to the disk is known as the data transfer rate. It is measured in kilobits per second
5.4.3 Accessing Data from a Magnetic Disk (kbps). The data transfer rate depends upon the rotational speed of the disk. Lf the disk has a
rotational speed of 6000 rpm (rota,tions per minute) having 125 sectors and 512 bytes/sector. the
The data in a magnetic disk are recorded on the surface of the circular tracks with th h f di ·te data transfer rate per rotation will be 125 x 512 = 64,000 bytes. Hence, the total transfer rate per
hi
head, w ch 1·s mounted on the d"1sk arm assembl y (see F"1gure 5.9). These heads ca be •eIpo rea . wrJ ·se~ond will be 64,000 x 6000/60 = 64,00,000 bytes/s or 6.4 MB/s (Table 5.1).
bers to access the ad1acent
be . tracks simultaneously
. and 10 make the disk faster. The din kem mu1lip1e num-
·· dm
posmone · both mwar
· d and outward d"1Tect1ons
· so th. at the read/write heads s ann assembly can . The combined time (seek time, latency and data transfer time) is known as the access time of the
. In case of muluple
zontal surfaces of the disk. . disk. packs, each disk
. surface has itscan move on the . hon magnetic disk. Generally, the access time can be described as the period of time that elapses between
which works in harmony with other heads to record the data. Therefore, inform ~:Vn readlwnte head, a request for data from disk or·memory and the desired data arriving al the requesting device. Memory
tracks, constituting a cylindrical shape through a disk pack. The read/write head of: ion is stor:d on the access time refers to the time it takes to transfer a character from memory to or from the processor,
the data on a microscopic scale without having direct contact with the disk's surrata~etic disk stores while disk access time refers to the time taken to place the read/write heads over the requested data.
the head and the surface is very minute, which is approximately about 0.00Qo2 inch~- e gap between RAM may have an access time of 9-70 ns, while hard disk access time could be l 0-40 ms.
The process of accessing data from magnetic disk comprises three steps: 1&ure 5. J0).
I . Seek: As soon as the disk unit receives the read/write command, the read/writ h .
tioned on the specific track on the disk platler. The time taken in doing so is kn e eads are pos1-
5.4.4 Types of Magnetic Disk
lt is the average time required to move the heads to the desired track on the di~;~as se~k time.
modem disks may range between 2 and 15 ms but the seek time of most cornrno~ deek r_imes of All magnetic disks come in the form of round platters. These disks are available in different sizes .
1 shapes and designs. Some arc attached to the read/write head assembly, whereas some are avai lable in
sks IS 9 ms.
Ii ~
~L CY}\ ....-.... ....ii
....---
143
142 Introduction to Computer Science -
~ Secondary Storage
f 3~
=
~
1•01.1
- - ----
----
-----· --
--------
-- - - •
Head waiting for the requierd
Rotate Rotational delay seclor or cluster to come under it 51/4" Floppy Disk 3112" Floppy Disk
E:=:=:=3□
=
Figure 5.11 5¼-inch and 3½-inch Floppy Disks
~-1:2=====
-=i==:::z-. :.~
.....~ Rotating Disk
5.4,4.1.1 Read/write Operation of a Floppy Disk To read and v,;rite the data onto a floppy
disk, a floppy disk drive is used. This drive is made up of a box with a slot (having a drive gate) into
which the user inserts the disk. When user inserts a disk into the floppy disk drive, the drive grabs the
disk and spins it inside its plastic jacket. In addition, the drive has multiple levers that get attached
Data Data transfer time to the disk. One lever opens the metal plate, or shutter, to expose the data access area Other levers
Traoslori"9 Dl:!
.
Transfer
( ll ■ U_ O, ■ ~ and gears move two read/write heads until they almost touch the diskette on both sides. The drive's
$&;;:.
:--- • - 'l ~ ~:- .,._ ,..,~-- ~. , I circuit board receives instructions for reading/writing the data from/to disk through the floppy drive
controller. If the data are to be written onto the disk, the circuit board first verifies that no light is vis-
ible through a small window in the floppy disk housing. If the photo sensor on the opposite side of the
floppy disk detects a beam of light, the floppy drive detects disk to be write-protected and does not
allow recording of the data (Figure 5.12).
the form of removable disks. Broadly, magnetic disks can be classified into three types: floppy disk, The circuit board translates the instructions into signals that control the movement of the disk and
hard disk and zip disk. the read/write heads. A motor located beneath the disk spins a shaft that engages a notch on the hub of
the disk, causing the disk to spin. When the heads are in the correct position, electrical impulses create
a magnetic field in one of the heads to write data either to the top or bottom surface of the disk. Sinni-
5.4.4.1 Floppy Disk A floppy disk or diskette is a round, flat piece of Mylar plastic_coated with
ferric oxide (a rust-like substance containing tiny particles, capable of holding a magneuc field) and larly, on reading the data, electrical signals are sent to the computer from the corresponding magnetic
encased in a protective plastic cover (diskjacket). It is a removable disk and is read and written by a field generated by the metallic particle on the disk.
floppy disk drive (FDD), which is a device that performs the basic operation on a disk, including rota·
tion of the disk and reading and writing of the data onto it. The disk drive's read/write head alters the
5.4.4.2 Hard Disk The hard disk, also called the hard drive or fixed disk, is the primary stor-
magnetic orientation of the particles, where orientation in one direction represents ' I ' and orientation
in the other represents 'O'. Traditionally, floppy disks were used on personal computers to distribute age unit of the computer. It consists of a stack of disk platters thac are made up of aluminium alloy
software, transfer data between co~puters and crea_te small backups. Initially, 5¼-inch floppy disks or glass substrate coated with a magnetic material and protective layers. The whole disk mechanism
were ~sed. Later, a new format of 3½-inch floppy disk came into existence, which has larger storage and components are encased in a protective housing to prevent any dust particle, which causes head
capacity and supports faster data transfer as compared to 5¼-inch fl d' k (F' 5 11) crash, from getting inside. Hard disk can be external (removable) or internal (fixed) and can hold a
. kettes are smal I, .inexpensive
Floppy dis . readily. availabl Oppy IS s igure . d .h Jf life large amount of data. The capacity, that is, the amount of data that a hard disk can store is measured in
. stored
1f f properly.
b Tbey also possess the write-protect
' ' featue,eeasy
hi tohall
store and have a "'ooo s eta dis·' bytes. The storage capacity of the hard disk has increased dramatically since the day it was introduced.
kette rom emg . written
. to. To wnte-protect
. a diskette ther , w c . ows . the users
. to protec the When IBM introduced the first hard disk in I956, it could store around 5 MB of data. However, a
edge of the disk, uncovering a hole. ' user has to shift a slide lever towards
typical computer today comes with 80-320 GB of hard disk. The hard disk speed is measured in terms
of access time (typically in milliseconds). A hard disk with lower access time is faster than a hard
'~
,...
1.:.4_:_4:.____:_:'"..:.:l.:.:
ro:::d:.:u:.:c:_
llo: n~ lo:_C
Read/Write
Head
: :o:m
~ pu:1:.:e:_
r :S.c:::l.:
en:.:.c::..:e:_________________
-------- ----
5.4. .
Secondary Storage
4 2, 1 Read/write Operatio_n of a Hard Disk A hard disk uses round. flat disks (plar-
de up of glass or metals, which are coaled on both sides with a special material designed to
145
Access ters) ~~ormation in the form of m_agnetic patterns. The platters are mounled by cutting a hole in the
Cover store in d stacking them onto a spindle. Each platter has its information recorded in !racks. which are
rtheran
centre broken down. into smaller
S . I sectors.
I The platters
. rotate
. at high speed, driven by a special
. motord
fu necte d to the spmdle. pec1a ethectromagnet1c
d' k read/wnte heads are mounled onto the shders an
con either record data onto e IS or read data from iL The sliders are mounted onto the arms.
Stepper are usedth 1 are mechanically connected to a single assembly and positioned over the surface of tbe
Motor ~I of wa ~evice called actu_ator._Each platter has two heads: one on the top of ~e platter and the other
diskhby m· so a hard disk with three platters would have six surfaces and six heads.
e botto • • · · the
on t recorded onto the magnetic surface of the disk in exactly the same way as 1t 1s on .
Data ar~ ever a disk controUer is attached to the hard disk drive tbat handles tbe read/wme
floppies. ~w ed 'by the operating system. Each read/write command specifies a disk address ~t
comm ands
. the 1ssusurface number, track number and sector number. With this . .m,ormauon.
, • the read/wntedata
comprises
d moves to the desired sector and data.can be read from or written to. Usually. tbe next set of
Drive k (Fi 5 I~)
bea . uentially located on the dis 1gnre . J • re
Button to be read is se~ke floppy drives, in which the read/write heads actually touch the surface of th:;:ath~
Write Protection . Note
na,1 the that
headsun_ rn mos t hard disks float slightly off the surface. Nevertheless. the distance betw
Is Detected by
the Light
Access
Light Spindle
disk with higher access time; the lower the access time, the faster the hard disk. The hard disk plays a
significant role in the following important aspects of a computer system:
■ Performance: The hard disk plays a very important role in the overall system performance. The
speed at which the computer boots up and the programs load is directly related to the hard disk
Actuator
speed. The perfonnance of the hard disk is also critical when multitasking is exercised, when large
amounts of data and instructions (software) related to activities such as image processing, and
sound and video editing are to be loaded or while working with databases.
■ Storage Capacity: A bigger hard disk lets one store more software and data into it, thereby
permitting the user to store large software related to complex processes such as graphics and
multimedia.
■ Software Support: Nowadays, almost all software require large storage space and faster hard
disks to load them efficiently. Usually, older hard disks can barely hold the operating system and
few uncomplicated software that does not require much space.
■ Reliability: One way to assess the importance of any hardware component is to consider the Read/Write
extent of damage caused, in case it fails. By this standard, the hard disk is considered the sue· Protective Head
cessful storage component by a long way. A good-quality hard disk, combined with smart Case
maintenance and backup habits can help ensure that the nightmare of data loss does not become
part of daily life. Figure 5.13 Hard Disk
&h
,(
f ,l ~ ..
,II
~ ~
heJd and the disk surfuc-c is much !es..~ compm-ed to the thickness of a humnn hnir. When the he d
-----
a~identally touch the media. t'itht'r lit--cause the drive is dropped or bumped hard or bocnuse ,0 / s 5, 4.5 Advantages of Magnetic Disks
Secondary Storage 147
elt'C'trirnl mnlfunction. the surface becomes scrntrht'<l. Any datn stored. whe1-e the head has touohect11 1 ;n The mni n nclvnnta~cs of the magnetic disks nre a.~ follows:
disk are lost TI1is is en.lie-cl n hrnd cmsh. To hdp reduce the possibility of n head crash. most disk_ ~
' I cir' . l .
tro IIer:- park the hi:-nds owr an unused track on the disk when t 1e 1ve 1s not 1e111g used by the,Gpu
Con. 1
They foll ow dirc~t access mode for reading nnd writing 1hc data files. thereby making an idc:il
' device for accessing frequently accessed datn.
1 They arc used both as nn online and_ofn_ine storage of data. For instance. hard disk is used as JJJ
5.4.4.3 Zip Disk Zip disk is a removable sto1~1gc device _tJint_st~ted _with I_O?-t-.'IB storage capac. online storage, whereas Ooppy nnd zip disks nre used as offiine storage.
1 They are ensily moveable fro~1 ?n~ place to_another because of their small size and lightweight.
ity. but tod:iy it cnn store up to 250-750 MB of data. The zip disk s drive unit is measured as 18
1 The data transfer rate of the disks 1s much higher than the magnetic tJpcs.
13 x .i cm-' and weighs abou t half kilogram. It has rubber feet to stabilize the unit in either vertical 0:
horizontal position. The substrnte for the disk is made up of plastic mnterial on which magnetic oxide Due to low cost and high data-recording densities. the cost per bit in magnetic disks is minimum.
particles are co:uc~. The.re are two indicator lights: green for power mid amber for disk access. It hns : The storage capacity of the magnetic disks is virtually unlimited as numbers of such disk..< can be
added to store the data. . .
an eject button. but no ON/OFF switch. It comes complete with drive, connection cable, power supply
1 They m·e less prone to the corruption of data as they can_withstand the temperature and hum1d11y
operating software and a starter 100-MB disk with a set of zip tools softwm·e. On installation,,the,zi;
change in a much better way as compared to the magneuc tJpes.
drive is automatically assigned a logical drive letter. and the files can be transferred to and from the
zip disk like accessing hard disk or floppy disk (Figure 5. 14).
Zip disk is similar to the 3½-inch floppy diskette in diameter. However. one should keep in mind 5.4.6 Disadvantages of Magnetic Disks
that zip drive cannot read or write floppy disks and similarly a floppy drive cannot read/write datn
onto a zip disk. Either the zip dri\'e can be built into the computer or it can be connected to the com- The fo llowing are tl1e major disadvantages of the magnetic disks:
puter via the parallel port. There are different versions of zip disks and drives available in the market. 1 They must be stored in a dust-free environment to protect them from crashing down.
These versions can hold 100. 250 and 750 MB of data. As a zip disk can hold as much as 70 times of ■ They are not ideal devices to use in scenarios, wbere the file access required is of sequential nature
infonnation as compared to a floppy disk, it can be used to store heavy graphics, music or presenta- rather than clirect or random nature.
tion files. ■ They are more expensive than tJ1e magnetic tapes.
■ They are more susceptible to breach of security and access gain to sensith.: online disk fi les from
remote terminals.
5.4.4.3.1 Read/write Operation ofa Zip Disk A zip disk looks quite similar to a floppy disk.
Both are about the same size, but vary in their storage capacity. The magnetic-coated Mylar zip disk,
which is also called as cool..i e, is encased in a hard plastic material having a metal plate cover that 5.5 OPTICAL DISK
slides open to provide re.ad/write access to the cookie. When a zip disk is inserted into the zip drive, the
metal plate slides to expose the small portion of cookie. The metal hub that is attached to the centre of ~part from magnetic tapes and magnetic disks, a new storage mc'Ciium. which is gaining popularity.
the cookie spins at 3000 rpm (rotations per min- 1s the optical disks. An optical disk is a flat, circular, plastic disk coaled with m::iterial on which bits
me) along ,,~th the motor. The two heads on either may be stored in the form of highly reflective areas and significantly less retkctiw areas, from which
side of the cookie touch the surface of the disk to the stored data may be read when illuminated with u narrow-beam SOU!\.'C. such as a bsadiode. These
perfonn read/write operations. In a zip drive, the disks are capable of storing enonnously high amount of data in a limitt'd amount of space. The optic:11
read/write heads are about one-tenth the size of the disk storage system consists of a rotating disk coated with a thin layer of mt'!tal (aluminium. gold or
floppy drive he.ad resulting in higher data-recordin!! silver) that acts as a reflective surface and a laser beam, which is used as a rend/write head for recon:l-
density. The small size of the zip drive heads allow; ing the data onto the disk.
writing 2118 tracks per inch. Zip drives, like hard
disks. use a zone recording so that the same record-
5.5.1 Storage Organization of an Optical Disk
ing density is used throughout the disk In con1rast,
the conventional floppy is divided into sectors radi- ,Unlike magnetic disk (which has several layers of concentric layc:rs). an optical disk cvnsists of single
ally due to which the outermost tracks use more ong track in the form of spiral shape. This track starts from the outer t'dge and spirnls inward to the
surface area than the innermost tracks and thus c;ntre of the disk. The spiral shape of the 1rack makes the optical disk suitnble for storing l~e blocks
waste the recording surface. •
0 sequential data onto it, such as music. Even though mndom access is pos$.ible. it is usually slower
Figure 5.14 Zip Disk Drive
~
148 Introduction to Computer Science
taa.~
,.
s.5.3 Types of Optical Disks
Optical disks are available in several . .
d'
of opuca 1s s. ote at these technol .
. vanet1es wb·
Secondary Storage
poses. Compact isk (CD), digital versat'1le d.' k ich are made in different ways' d'"
· I d' k N th IS (DVD)
and Bin-ray disk (BDJ th
149
i'1,,.,
•
I tn one cateo • c requires a
oOry, there are many competi ng formats .
• s.s.3.1 Compact Disk Compactd· k.
. . II .
disk. It was ongma y mtended only for sto .
IS is the most p I
. ~pu ar and the least expensive tVTIP of optical
(
. f . nng music (m th ' f . . ,r
about 80 nunutes o umnterrupted playino t' . e ,orm o digital audio) and can record
.h . o ime. A CD IS ca abl f be.
device along wit stonng of digital audio. P e o mg used as a data storage
(a) Track Pattern of a Magnetic Disk (b) Track Pattern of an Optical Disk A CD is a shiny, silver colour metal disk of 12_cm di . . .
three layers: a polycarbonate plastic throuob wbi h Ii ameter. A typical optical disk is made up of
Figure 5.15 Comparing Track Patterns tive layer of acrylic on top of that The topom t c ght can pass, a layer of aluminium and a protec-
. os 1ayer can be p · t d ·th I L • 1 .
CD looks like as shown in Fioure 5 16 Ea h bi h an e wi a auc . A cross section of
0
• • c g area of the CD · all d · · ·
called /and. The pits of CD are typically 0.S µm wide S3-' ts c e prr ~d the flat secoon 1s
· I fr • 0· J µm 1ong and 0. I) l1m deep. A CD has
one track th at sp1ra s om the centre to the outside edoe If Id ·
. . e • one cou remove the track from a standard
than the magnetic disk (especially hard disk). The reason behind it is that in case of magnetic disk l2-cmCD, 1twouldstretchforthreeandahalfmiles The s·
m ol trak
. . · e e c 1s vt e mto sectors of equal
· di ·d d.
it is easy to locate the tracks since they are located at a fixed distance from the centre (Figure 5!15). ' length and density. The fi les are stored on these particular conti 2uous sectors.
Tbese tracks are further divided into small sectors of the same length, regardless of their location on Compact_disks are available in various fonnats: CD-ROM/ co~pact disk-read-only memory). CD-R
the surface of the disk. Such type of disk formatting allows the data to be stored in even more dense (compa ct disk-recordable) and CD-RW (compact disk-rewritable) disks. A CD-ROM disk comes with
fom1 as compared to magnetic disks. With more data-recording density, the optical drives have more prerecorded data by the manufactures and can be read but cannot be altered. CD-Ris a type of WORM
complicated mechanism as compared to the magnetic disk drives. Here, the speed of rotation of the (write once-read many) disk that allows you to record your own data. Once written. the data on the
disk varies inversely with the radius of the disk. The disk moves slowly when data are being.read near CD-R can be read but cannot be altered. A CD-RW disk is rewritable version of CD-R. which means,
the edges and moves fast when close to the centre. it allows writing, erasing and rewriting of the data several times. Toe data recorded on all CD formats
can be read using the CD-ROM drive; however, to write data on CD-Rand CD-RW disks, one needs
a special peripheral device known as CD-writer (or CD-bunier) (Figure 5.17).
5.5.2 Storage Capacity of an Optical Disk CD-ROM drives are characterized by the spin rate. The spin rate is the rotation speed of the disk
and it influences the information retrieval speed (access time). Currently. quad, hex and octal-speed
Since the storage capacity of an optical disk is huge, the cost per bit of storage is very low. Optical CD-ROM drives are available, where quad means 4x, hex means 6x and octal means Sx. Thus, the
disks are available in various sizes and capacities. A compact disk (CD) holding 600-700 MB of dat~ octal-speed drive is the fastest and, as a result, the most expensive drive.
having 12-cm diameter is the most popular means of optical storage. In a single-track optical disk,
the storage capacity is calculated by multiplying the number of sectors with the number of bytes per
sector, that is:
Storage capacity of optical disks= Numbers of sectors x Numbers of bytes per sector
The optical disks can store much more data (600 MB-6 GB) than the most portable magnetic media
like the zip disk and the floppy disk. Since read/write operations are performed through laser beaJ!lS,
no access arm movement is required that is used in the case of the magnetic disk. Hence, many people
assume that the data access time is even less than the magnetic disk. However, this is not true because
Polycar,bon~te P\as/jc
compared to the magnetic disks, where the tracks are arranged in the form of concentric circles; in an
optical disk, the tracks are organized in a spiral fashion . This results in slower random access time ~aoh
· the concentnc
10 · Ies. Generally, the access time for an optical disk ranges from IO to 4oms, whic
· c1rc Figure 5.16 Cross Section of a CD
is very low as compared to a floppy disk that has an access time of several hundred milliseco nd s.
~
~
Secondary Storage 151
I ;,, {
.---~
- -~. i1/
&ii
.__ ~:.
- "" -
-;. . .-• 4ij- y·
Figure 5.17 CD Wriler
~
Carrying Case
rt
~
~
~1~
'
.·• <
.
:
5.5.3.1.1 Reading Data from a CD-ROM It is already known that a CD is made up_ of three
coatings, namely, polycarbonate plastic, aluminium and an acryLic coating to protect the disk from
external scratches and dust. The polycarbonate plastic is stamped with millions of tiny indentations
Reflected
Light
~ ·· . · . -
(pits), moulded in the spiral-shaped track. A compact disk drive reads information from the CD's
spiral track of pits and lands, starting from the centre of the disk and moving to the outer edge. A light
is beamed from a semiconductor laser through the bottom of the polycarbonate layer, and aluminium
coating monitors the light being reflected. Since the CD is read through the bottom of the disk, each pit
appears as an elevated bump to the reading Light beam. Light striking the land areas (the areas without
a~er B•
l
~~
'.
~·- . ..
·Converters
Electrical O, 1
Signal
t·-
bumps) is reflected normally and detected by a photodiode. As the disk rotates at a speed b~tween 200 Laser Exiting
and 500 rpm, the light bounces off the pits causing the frequency of the light to change. The reflected
light then passes through a prism and onto a photo sensor. Light reflected from a pit is 180° out of
Reflecting ______,_
Surtace
phase_ with the Light from the lands, and the difference_s in the intensity are measured by the photo-
electnc cells, which conven mto a corresponding electrical pulse. This results in the series o( pits and
Figure 5.18 Reading Data from a CD-ROM
lands of varying lengths stamped onto the surface of the disk to interpret as a series of corresponding
Os and Is from which the data are recreated (Figure 5. 18).
5.5.3.1.2 Writing Data to a CD .The surface of CD-ROM contains one 1ong sp1ral . track of . J, CD·RW M, ,he ,o,oo"1iog J,yo, has polyc<Y"aJJi,c '"'""" i,i,i,Ily. While ,witi,g ,o <he
data. AJong the track, there are flat reflecuve ar_eas (represent binary 1) and no fl . ( d,sk, <he Ja,cc hca• ,p <he ,dcctod '"" ,o a ,cry high «mpera<ore (,bo" ,he meltieg poin<), which
. . . nre ecllve bumps rep-
resent binary 0). On a new CD-R disk, the ent1re surface of the disk is reflect· h . mclu <he crysol, i,<o ,cry,rnJli,c amo,pb'"' ph"' The« me,s ha,e Jowc< n,H "''"cc ,h,n ,he
1ve; t e laser can shme 00 Thi• di"""" ;, n,flccrnece bclps i, readi,g ,he reco«kd dm• " i, m,
through the dye and reflect off the gold layer. Hence, for a CD-R disk to work th «mai,i ,g c,ys<aJJi,c "'".
for a laser to create a nonreflective area on the disk. A CD-R disk, therefore has' ere muS t be a way
. . _ . . . , an extra layer that the
laser can modify. This extra layer 1s a greenish dye. When you wnte data to a CD-R h .. To"'"
case of CD-R disk. CD-RW disk, a prnce« caJJC<i ,,,,,,,,i;,,g is ,«ed. Dfili,g <hi< procc«, " ' ' " <he
d••",
(which is much more powerful than the reading laser) heats up the dye layer and h' t e wnl!ng laser "'" <hm ru« bece ch,ngOO ,o ,he ,moq>h°"' ph"" (dori ,, w,ideg) i<'""""' bock <o is orig irn,I
ency. The change in the dye creates the equivalent of a nonreflective bump. The :etnges i~s. transpar- crysrailioe "'" by hcatieg i< rn , tom Po""" ,ligh<ly below <he mdriog poim of ,he phasNh,ogi,g
th
dye in the pit area through the beat of the laser is irreversible (pemianent). Therefo;;pos1twn of . e
of a CD-R is written, it cannot be erased or rewritten. However, both CD and CD-R ,do~ce a secuon material.
the modified dye as a bump later on (Figure 5.19). nves can read 5,5.3,2 D;g(t,1 V,,,,!Ue D(sk DVD, ioiti•ilY otlJC<I digi<ol , ;d,o disk, is • high•copoci<y d, ra
In contras'. to CD-R disk, CD-RW disk is eras~ble and rewritabl~ because it uses Phase-ch .
matenals on Its recording layer, usually alloys of stlver, teUunum, rndmm and antimony m angU1g
s<orage medi,m. A<"""gl'""•, DVD coo easily be mi<rakca fo< o CD" bo<h"' pla,tic disk> of
120-mm diameter and J.2-mm thick, and both rely on lasers to read data. However, the DVD's seven-
changing material changes its state when heated to a high temperature (above its melting p~_tals. Phase- fold increase in data capacity over the CD has been largely achieved by tightening up the tolerances
be converted back to its original state when heated at a temperature slightly below~ ltitnt) a~d can
ng pornt.
~
~
-+\ \- 1 - \ \ --o.74µm
\\\) \D t""T" 1
1eaL ));
) )
(a) CD (b) DVD
Single-sided, Single Layer (4.7 GB) Double-sided, Single Layer (9.4 GB)
throughout the predecessor system. ln DVD, the tracks are placed close together, thereby allowing
more tracks per disk. The DVD's track pitch (the distance between each) is reduced to 0.74 µm , which
~~
.. .
I1I~
0
. ~..r.
>.
is less than half of CD's track pitch, i.e. 1.6 µm . The pits, in which the data are stored, are also a lot Figure 5.21 Different Types of DVDs
smaller, thus allowing more pits per track. The minimum pit length of a single layer DVD is 0.4 µm
as compared 10 0.834 µm for a CD. With the number of pits having a direct bearing on the capacity
levels, the DVD's reduced track pitch and pit size alone give them fo ur times the storage capacity of
the CDs (Figure 5.20). CD that stores all data in a single spiral track takes longer to relocate the optical pid.--up to another
~ Note: Like CDs, DVDs are also available in different formats: DVD-ROM, DVD-R and DVD-RW. location or fi le on the same surface.
A DVD allows for double-sided disks. To facilitate the focusing of the laser on the sm:i.ller pits,
manufacturers used a thinner plastic substrate, thereby reducing the depth of the plastic layer that
The packing of as many pits a~ po.ssible onto a disk is, however, the simple part; the real technologi-
the laser has to travel through to reach the pits. This reduction resulted in disks thnt were 0.6 mm
cal breakthrough of DVD ~vas with 1~ laser. Smaller pits mean that the laser has to produce a'sinaller
thick-half the thickness of a CD. However. since these thinner disks were too thin to remain flat and
spot: and DVD achieves this by reducmg the laser's wavelength from the 780-nm (nanometres) infra-
red hght ~of a standard ·ri1cat10n
· allows rn · to be
• formation withstand handling, manu facturers bonded two disks back to back, resulting in disks that on: l.2-mm
th CD to 635 or 650
f nm. Besides ' the DVD spec1 ick. This bonding doubles the potential storage capacity of a disk. Note that single-sided disks still
scann-ed irom more flan one. Iayer o . a DVD s· J b h ·
imp Y Yc anging the focus of the read laser. lnstea · d th
of usrng an opaque re ect1ve 1ayer Jl is possible to use a tr 1 ·vc have two substrates, even though one is not capable of holding the data (Figure 5.21).
layer behind carrying more data Th' d ans uccnt layer with an opaque reflecll
· 1s oes not double the ca 't b 101
be quite as dense as the single Jaye b t 1. d . paci Y ecause the second layer cani
1
having to be removed from the dri:~ aund t oesdenable a smgle dlsk to deliver 8.5 GB of data without .5.3.3 Blu-ray Disk Blu-ray disk is an optical storage device, which is used to record and
. . urne over. 5
playback high-definiti on video and audio as well as store images and other data. It is developed by
An rnteresung fea ture of DVD is that the disk' Blu-ray Disk Association (BOA), which is a group of world's leading consumer cleotronics, personal
disk out, as well as from the outside in. In stand~;~~~n~ data layer can be read from the inside of the
near the hub of the disk. The same is true for .
1 1
s1ty CDs, the mformation is always stored firSI :°''''""' and modi, mmmfoeN<W ;,d,diog Thooso, . Apple. Pru"soole. Sooy ,md ' ""'"'' · H
each disk can contain data recorded 'backw sdm~ e- ~yer and dual-layer DVDs, but the second layer of ~• bl,o-,lole> lose, ho,log ' ' ' ""- w,,ole,,g,h (405 om) d"" o red lose< (650 om) osed by DVDs
. ar s , or m a reverse · I • · ks ue to this shorter wavelength, the laser can be focused mol'! precisely on the small spot, thereby
onIy an mstant to refocus a lens from one ren . spira track. W1th this feature, 11 ta c 0
ective layer to 'another. On the other hand , a single-Jayer
...
~
.,. Introduction to Computer Science
,.....-
. . . l. ., higher than
., , . - 5,5,5 Disadvantages of Optical Disks
( / :. )
resulung in stora2e capacily ten 1mw
DVD. Like CDs ;nd DVDs, Blu-ray disks are also / :· .
available in different formats: ,, ·· ...~_- · .. IJow ing are the major disadvantages of optical disks:
~
The fo . I 1· · th · ·
■ BD-ROM: It comes with prerecorded content • They are comparative~ coS t ier an other storage devices, specilically floppy and Zip disks.
that can only be read. They are not easy to wnte as a floppy disk. One needs to use both software and hardware for writ-
I BD-R: It is a WORM type of disk on which • 1ng
. optical disks.
you can record data only once. • They possess slow data acc~s sP<:ed '.15 compared to the magnetic disks. _
■ BD-RW: It is si milar to BD-R disk, but the • The dri ve mechanism of opucal disk 1s more complicated than the magnetic and floppy dISks.
difference is that it is rewritable. lliis means &~ .
that the data can be erased and recorded a 8/u•~ ~ ·
number of times on the same disk. 5_6 MAGNETO-OPTICAL DISK
■ BD-RE: It is also a rewritable disk, but is used
only for high-definition audio/video and tele- As implied by the name, th_ese disks_ use a hybrid of magnetic and optical technologies. A IIDloOJJeto-
vision rewrding (Figure 5.22). Figure 5.22 A Blu-ray Disk
optical disk wntes magneUcally
d.kd' . d. (with therm al assist) and reads optically using the laser beam. A
maoneto-optical 1s nve IS so estgned that an inserted disk will be exposed to a magnet on the label
• ·1 bl · t sizes· . Stan dard (I?- cm) and Mini (8 cm)..Each disk can
• have
• either sid; and to the light (laser beam) on the op_posite side. The disks. which come in 3½-inch and .51/4-inch
Blu-ray disks are avaJ a e IO wo ndi. · h' h the data storage capacity of tbe disk differs. For
a single layerstor dual layers depe ng upon wk ICth • oJe layer is 25 GB and with dual layer is 50 formats, have a special alloy layer that bas the propeny of reflecting laser light at slightly different
. th O
• ty of Standard dis WI srno
instance,
GB. On theeotherora:e the storage capac,·cy of Mini disk with si ngle layer is 7.8 GB and with dual
capac,
band, an oies depending on which way it is magnetized, and the data can be stored on it as north and south
m:gnetic spots, just like on a hard disk (Figure 5.23).
layer is 15.6 GB. · · I · 0 ·
While a hard disk can be magnetized at any temperature, the magnetic coating used on magneto-
Blu-ray disk allows not only the recording of programs, but also theJr manipu at1on_- ne can ed11
optical media is designed to be extremely stable at room temperature, making the data unchangeable
the programs recorded on the disk or change their order. The user can also ~reate ~Iaylists of ~e pro-
grams stored onthe disks so that they can be randomly accessed. Moreover, 1t facilitates recordmg one unless the disk is heated to above a temperature level called the Curie poinr (usually around 20(fq.
program while watching another program simultaneously. Instead of heating the whole disk, magneto-optical drives use a laser to target and heat-specific regions
The organization of Blu-ray disk is similar to that of DVD; however, the way the data are stored on of the magnetic particles. This accurate technique enables magneto-optical media to pack a lot more
them differs. lo DVDs, the data resides between the two polycarbonate layers. Due to the layer on the information than other magnetic devices. Once heated. the magnetic particles can easily have their
top of the data, the substrate layer may refract the laser beam into two separate beams, which is known direction changed by a magnetic field generated by the read/write head_ Information is read us.ing a
as birefri11ge11ce. If the beam is split too widely, the disk reading operation cannot be performed. Blu- less powerful laser, making use of the Kerr effect, where the polarity of the reflected light is altered
ray
thus,disk overcomes
prevents thereading
the disk birefringence by placing the data on the top of the polycarbonate layer and
problem. depending on the orientation of the magnetic particles. Where the laser/magnetic head has not touched
the disk, the spot represents a 'O', and the spots where the disk has been heated up and ma,,,oneti-
cally written will be seen as data 'I' . However, this is a 'two-pass· process_which_ coupled with the
5.5.4 Advantages of Optical Disks
Light (Laser)
Th, ma" ~"'"'° of o,kaldisks"' • foll"'"' h' ,. Reflected Beam LaserBeam ~
Lens
, Th,y """" 1.,, u,.,;,, m sm,. daW,•fo<ma,io" i" rh, fo,m of m,himol i, ,..,, "~
and thefilo.
•idoo floppy oru"
They '°"
zip disks. mo,. a., i, <o, "''"•<of s,- • eom"'"' m., mag""' Po
tttttii11~t/41tttttttt
• Th,'"'•~ fo d,o "°"" i, optiul dish isoomidooo robe mo,., abom 10--20 y,m • ,om-
pared to the magnetic disks, which have a comparatively lesser life span .
~
Moving Media
7 \ ii ) ~ -- _
Disk Label Side
low cost
• Th,y holdpermo,o
bi1 of Storage.
dao.,..,di,g ''"•i, y • '<>m~"' ro orho srm,g, modi" <herefore, rl«y ha<
■ They are not affected by the magnetic field. Magnetic Reid
• A" °"'io,J _di• S ••gho '~" OP<sfHoppy disk,_ h is phr,ioaUy h"'" ro he~k, m,h o, w,p
• o., • •~• sm,11 "• ,,a lighrw,;,h,, ,be,o disk, are "'"' '""'hi, '"' ""'""
(a) Read Operation
(b) Write Operation
Figure 5.23 Read/Write Operation of a Magneto-optical Disk
...
..,........
Secondary Storage 157
◄ 16GB ~~ f\--
mainly ~n developed to meet the demands of
~age) outside the computer case and is connected to tl1e system through interfaces like USB. With
the mobiJ~ devices market. Jr offers large stor-
age capacHy ranging from I 6 MB ro 32 GB ~: nd dition of USB interfaces in personal computer, external ?ard drive h_as become quite popular in
transfer speed of 160 Mbls. and computer market. The storage capacity of external hard disk ranges from 20 GB to several TBs
Figure 5.24 Memory Stick
~
.,,,--
~
156
Introduction to computer science
11
------- thCone
if
ccdY rate of data transfer. Multiple drives lead 10 the reliability of the storage unit t,ecause
sp of 1he drives
. f ·1s, the~ 1hc unit. ~an continue to operate with other CD-ROM dn:,-es-
81
. vi th the help of a robotic arm remeves appropriate CD-ROM from the co-ROM Ju.kebo:c
unit i ing on the CD- RO M dnves . for the processing. and then retumino to the appropn:ite
.
.
Toe
5
I0ot
,od i< " ,•om>"' bk «·i,h ""°'' "' 'l''"'" ' "'l"""i
'"'""" ;mod""' ~,h • VSB MSC (m•' ""''' ',s,
"
.,noun•u1ceboX
111
l after the .
JOb has been .
finished. These jakeboites can store "'
up to s.:veral terabytes
nJ. it so they can be used for archiving of read-only data for offline stora"e and used as a d:it:i
f
dntn 111 ,
andn, ,.,.,,1 .,;""'
1EEE139~ tFi~un: 5.26).
,od fo•"''" io! of"""''' .,,, d.,;k bnc krtIp
• •
device during online storage.
o
used for raking bad,1JP>· Using external hard disk drive as a Drive wi th USB Connector
cop
ih< o, Ii"' d d' k
mp" "' " ·' ""'', m , ""'"°"
. . . . d d h
where I"'° ,mrag, copoci ,y i, res'"" ,o w ." '
p,o'"P' '"' """ i, , o< e;,conol. Wtieo osed " oflli"' ,mragc ,hey "' ref•"'' " "' orehn·ol
melllS of backup for impor1anl (or sensitiYe) data is ndvanta·
geous. This is because you can unplug extemal hard drive
when not in use 10 pro1ec1 your data from being compromised storage.
by onhne or ofiline activities.
LET us suMMARIZE
L sccoodOIY momo<Y refu~ m lb< memory, which om ,iore oil lb, dom (fi]es) "'' ;o,uuctioo>
5.9 MASS STORAGE DEVICES (pmg,om>) ' "" ,f,e, lb, comp"'" i, onncd off. H ioclodcs '""'"like""" di,~ HopPY dSk,
T f ·tornoe cap•cil)' in a computer system. a different kind of storage system is
10 •2elI a V!ISIhamoun
usefomi
l)'pe ofI S)'S
O > tem ,,multiple
a uniLS of similar kinds of storage media
•
res can s1
storaoe oreused
and up 10asseveral
a data terabyt
b k esd of.datda ·m ·rt, so they can be used for archiving
· data for offline S, 200
Magto 6250
ooric bits/bytes
,ope peri oinch
i, & ,;dod IO ,o,ti ,ru colo mo> (fnmre>) ,od ho<i'°"'" " "" (<h""ods °' '"''")
(bpi).
ac :up ev1ce unng online 1 The dol, ,re ,im«I ;, , '""' • 0 f ""'"' wilh mre '"""''"' P'' rroore ,od o,<h fnnn< sP"''
■ 0
CD-ROM Jukebox: A CD-ROM ·uke .
wilh !heir drives and controlle
. s orage.
J bdox co~pnses numerous sets of CD-ROM disks along mo l1ipl, ""'' ("' ,ru y",o/m ,;oc "'' , , ), Th••· , ,i " ' k bi, is ,mred io ""h '"'''· llun is,
rs mounte m a smole u ·1 Th · CD I
~
ROM drives to perform read/wn·te . " DI · e unit comprises one or more ·
. operauons on the CD ROM · . I · le one byte per frame.
-ROM drive environment, these CD-ROMs can be simultaneously
. · m the Jukebox. In them~ UP_10
CD read or wrilten, resulung