0 ratings0% found this document useful (0 votes) 77 views40 pagesCA Notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
The memory unit
ane tia limited applicat . :
tad. i capacity Most general purp mpl
sped with astditional Stora 1 "
they were red per unit co accomodate alle prowtat use vp
t eno pace in one maranns used .
3 rccumulate and continue te accu
Moreover, wiost COMpUter Users 2p SET Ne ae van
ated mation is neede’ he pro}
Ottware, Not all accumutated inforry nected by the processnt at :
processing,
heretore, Hts
mation that ts 0
nore economical Lo use Low-cost st
ot currently used by the CPU
«directly with the CPU Is called the main memory
common auxiliary memory a
ystem pro
ded by t
{transferred
ate
Device
he memory unit that commmunte
provide backup storage are called 4
used in computer systems are magnetic disks and
large data files, and other backup information. Only programs and dz
side in main memory, All other information is stored in auxiliary memory ar
ixiliary memory. The n
s. They are used for storing
processor r
toms rmemory when needed
Cox #&5€=6©6=—l”
inth» « aputer system design, Memory Hierarchy is an enhancement to org:
that it can minimize the access time. The total memory capacity of a computer can be visualiz
as being a hierarchy of components. The memory hierarchy system consists of all storage dey
employed in a computer system from the slow but high-capacity auxiliary memory to a relative
faster main memory, to an even smaller and faster cache memory accessible to the high spec«
processing loge, \\
the memory su:
nizi‘Memory Systom «
* Capacity: itis the global volume info:
bottom in the hierarchy, the capacity increases,
* Access Time: itis the time int ‘val between th
data. As we move from top to bottom nthe
* Performance: One of the most sign cant ways to increase system per
Dow far down the memory hierarchy one has to go to manipulate data.
* Cost per Bit: As we move rom bottom to top in the Hierarchy, the cost per bit increases. That
is internal memory is costlier than external memory
storage distinguishes each level in the ‘hierarchy
and capacity are related, the levels may also be distinguished
tore. As we
A ‘memory hierarchy’ in compute by response
time. Since response time, complexity,
by the controlling tech nology.
put not auxil
direct memor
memory is 2
while main 1
1000 time
ds, wt
Magnetic
Tapes /+——>|
1/0 Processor
Magnetic 4 >
Disks |Figure 9.3 : Classification of Semiconductor Memory
EEE 0 Access Memory (RAM)
s of integrated
Random-access memory (RAM) is a form of computer data storage. It takes the form Br:
circuits thar allow stored data to be accessed in any order (i.e., at random).
Random’ refers to the
| location and
idea that any piece of data can be returned in a constant time, regardless of its physical
whether or not itis related to the previous piece of dataCHILDREN'S EDUCATION SOCIETY (Rees)
THE OXFORD COLLEGE OF SCIENCE
1d to Bangalore University,
bby UGC under 2(f) & 1218)
Grade in cycle I, 1A0 & LSSSOC
by OST under FIST program, Recognized by Gox for BiSEP (formerly BTFS)
IESEM NEP UG,
FIRST INTERNAL EXAMINATION TIME TABLE
26" - 30'June 2023
Date Day ~ 9:30- 11:00AM I 1:00- 2:30PM
26162023 | Monday | BCA-Computer Architecture / Biochemistry-2 /| Blectromies-Flectronics circuits &
Chemistry-Inorganic and Physical chemistry special purpose devices /
| | Zoology-Biochemistry & Physiology FAD-Dyeing & printing in textiles
| { Statisties-I1 _|
Tuesday | BCA-Object oriented programming using Java) BCA-Database management system
| 2762023 Microbiology-Microbial biochemistry & Physics-Electricity & management
Physiology
| | __|__BsSe Computer Science-Data structure
28/6/2023 | Wednesday | Biotechnology-Microbiological Methods | English - Generic English
FAD- Fashion design & illustration
T
Friday | B.Se Mathematics-II / Language - Hindi, Kannada
30/6/2023
Geneties- Bioinstrumentation and Animal cell
Culture= + Computer Aubtetre
HAM he classitied into
atic KAM and Dynamic RAM,
(ay Static RAM () Dynamic RAM
Dynan na
4; Random Access Memory
+ SRAM fy a random wiecess memory that retains data hits in tts memory as long as power is,
being supplied
+ SRAM does not have to be periodically refreshed
+ SRAM provides faster access to data and js more expensive than DRAM and tt requires a lot
more -pace
+ SIA 1s used for a computer's cache memory and as a part of the random access memory:
digi: |-Lo-analog converter on a video or graphic card
Emmy
+ ORAM ts the mast common kind of random access memory for personal computers and
workstations
+ DRAM isdlynamic that me
anew electroni
Figure 9.5 : Typical RAM Chip
is, unlike SRAM, it needs to have its storage cells refreshed or given
charge every few milliseconds,
+ DRAM stores each bit ina storage cell consisting of a capacitor and a transistor, Capacitors
end to lose their charge rather quickly; thus, the need for recharging,
A variety of other RAM interfaces are also there, like EDO RAM, SDRAM, ete
Differ nes between Static RAM and Dynamic RAM
| SiatleRAM ] __DynamicRAM
* AM uses transistor store a singe bit of] 4% DNAN uses a separate capacitor to ware ach
ga bit of data
| STAN dow nt need pede eesbnntTo) ¥ DRAM ec perdi efmhment oman
| ¥ stats structures canpleia ORAM | RAW sire simple tan SE
[stat at epensneasconpared oORAM | ¥ DRAM ae less epenste ay compare
| a SRAM
| SRAM are faster than DRAM 4 DRAN's ate slower than SRAM
+ SRAM are used in Cache memory — DRAM are used in Main memory
LPEER #021 ter aon
t grage media used a computers and uth
= Neem ROM cannot be moditied (at least not very quickly or es)
teat ed to speeiit hardware. ap
to distetbute Hirmmisary (sottware thal ts ver
tnequent updates}
Figure 9.6: Typical ROM Chip Figure 9.7: Read-only Memory
ROM s are broadly classified as
+ Masked programmed ROM: During tie 1€ manulicturing time contents are ss aten
+ User programmed ROM: In this memory contents can be set as de
‘memory can iter be erased to write new values “4
Programmable ROM (PROM)
+ Programmable cead-only memory isa read-only memory that can be moved once by xy
User can store permanent programs or data
Erasable PROM (EPROM)
+ Erasable programmable read only memory. isatype of memory chip that retains ts data when
its power supply is switehed off In other words, itis non-volatile in nature Once pros
aan tfKUM can be erased by exposing it to strong ultraviolet light from a mer
spor light
source. EPROMs are easily recognizable by the transparent fused quarts window in ree ‘ope
shich the sons eh iy wave, unl witch persis expr co at
during erasing
Figure 9.8
rasable PROM Figure 9.9; FEPROM,GED > Computer Architecture
Electrically Erasable PROM (EEPROM) \
(
* EEPROM (also written E2PROM and Pronounced “e-e-prom", “double-e-prom” or simply,
“e-squared”) is a type of non-volatile memory used in computers and other electronic des S Word is
to store small amounts of data that must be saved when power is removed. For example binary :
EEPROM is used in calibration tables device configurauon. and CS
« When larger amounts of static data are to be stored (such as in USB flash drives) a specific Whe contro
eeyore MEMOLS Spe ees eee MOTE external decoders
iH" snemory Map Must be established ‘This
are required f
selection among th
will assipn add ATONE the
i ‘ , snaddresses t , some
uf jyed connections are determined, Then the logic dhapram yy a Ovatious chips, From this th
ite se dhagram representine the
Wye CPU can be drawn, Presenting the memory conneen
$$
GOs
spine active portions of the Program and data and Placed in a
-gss time can be reduced, thus reducing the total
fast small memory, the aver
suemory is referred to as a Cache memory,
Tage meniory
*ecutlon time of the program. Such a fast sil
ins placed between CPU and main memory as
§ shown in the figure.
ne Memory <—_____, |
32k 2 J a cru
Cache Memory
51a?
Figure 9.11: Example of Cache Memory
The Cache memory access time is |
than the access time of main memory by a tactor of 5 or 10
The cache is the fastest component in the memory hierarchy and approaches the speed af CPU
components.
The tundamental idea of Cache organization is that by keeping the most frequently accessed
mstructions and data in the fast cache memory Although the cache 1s only a smaii action of tie size
of main memory, a large fraction al memory requests will be found in the fast cache memory because
of the locality of reference properly of programs.
ESO cea ents
When the CPU needs to access memory, the cache ts examined. If the word is found in the cache, 1t
is read from the fast memory. If the word 1s not found in the cache, the main memory is accessed to
read the word
Ablock of words containing the one just accessed is then transferred from main memory to cache
memory. The block size may very from one word (the one just accessed) to about 16 words. In this
way one data are transferred. In this way some data are transferred to cache so that future references
to memory find the required words in the fast cache memory.te: Locaiy of Moeroncor
(a large no. of typical pages has thrown that the references of ry ata
tendo be conned within ses aed aren in mmo Ths phenomena the ery
locality of ref “meesey
Pcassocnareacria |
The cache system used by a processor 1s defined by six traits:
Analysis
noes,
+ The size of the cache;
+ The size of a block, which when combined with the size of the cache defines the number of
lines; '
+ The number of caches (ie, multiple levels or a split cache);
+ ‘The mapping function (the link between a block's address in memory and its locati in the
cache);
+ The replacement algorithm (the method used to figure out which block to remove from the
cache in order to free up a line); and
+ The write policy (how the processor writes data to the cache so that main memory eventually
gets updated)
The basic operation of cache can be explained as follows:
1 When CPU wants to access memory, it first examines the cache
(i) Ifthe word 1s found in the cache, itis read from this memory.
(ii) Ifthe word 15 not found in the cache, {he main memory is accessed.
A block of words containing the most recent accessed one is then transferred from main
an find the required words in eache
memory to cache memory so that {uture references ¢
oT
Performance of cac
the CPU reters to memory 4
found in cache, i is in main memory and it counts 1
erences to memory ([nits + misses} is called the Hit
memory is frequently measured in terms of a quantity called Hit ratio. When
ci finds the ward in cache, it is said to produce a hit, If the word is not
amiss.
The ratio of the number of hits to the total CPU rel
Ratio. Typically it is 0.9 and above. This verifies the validity of locality of reference property.
The average memory access time of a computer system can be improved considerably by use of a
cache. Ifthe hit ratio is high enough so that most of access time is closer to the access time of the fast
ample, a computer with cache access time of 100 ns, a main memory access
cache memory. For e
ime of 1000 ns, and a hit ratio of 0.9 produces an aver
mprovement over a similar computer without a cache memory, whose access time is 1000 ns.
age access time of 200 ns. This isa considerableFigure 9.19; Memory Tabl
for Mapping a Virtual Address
Mapping table may be stored in a separate me "me
+ Separate Memory: I mapping tables stove in separate memory ane additional
fone extra memory access time inquired
+ Maln Memory: If is stoced in main memory, ewo accesses to memory are required. So
vl un at hal ped
| + Associative Memory: When mapping table is stored In associative memory, Uhe physicat
‘memory 1s broken down inte groups a equal shee called Mocks, which may ranpe trom 64 to
4096 words each,
[Adress Mapping Using Pages
The table implementatio the
address mapping can be simplified the
Information i the address space andl ge
the memory space are each divided te ae
groups of ied size “et
1s into groups of equal size called blocks, Page Page
‘whieh may range tram 6 te 4096 words net Paget
each, The term page relers to groups
ff address space of the same size, Pa age
roters to the organization of address space Tae Paar
thie block refers to the organization of mai mcaes
memory space weeks
For example, if a page or block consists Adee ge
of IK words, then, wsing the previous
ve example, address space is divided into wae
"1024 pages an main memory divided Figure 9.20; Address and Memory space spt
Into 32 blocks ‘groups of 1k words+ Computer Architects
Ald gh both a page andl block are split into groups uf IK words. a page refers to the organization
ofa ass space, while a block refers to the organization of memory space. The programs are alsy
cons.dered to be split into pages: Portions of programs are moved from auxiliary memry to maiy
memory in page frame records equal tothe size of page. The term “page frame’ is sometimes use
todenote a block
Consider a computer with an address space of BK snd a memory space of 4K. If we split each into
froups of IK words we obtain eight pages and four blocks as shown in Fig, 920. A any gh
tw four pages of address space may reside in main memory in any ane of the faur hocks
Virtual address can be represented with the two numbers
1. A page number address and 2. Line within a page
iven time, up
Ina computer with 2* words per page, ‘bits is used to specify a line address and remaining high
order bits of the virtual address specify the page number.
| PageNo ine Humber
L289 10 bog 0 0 4 I irtualadivess
Preserve
—— an
ip a
| - orfororerourt
ou ° us
1 Mato Memory
100 0 cua
Address Register
Figure 9.21 : Memory Table ina Paged System
In the example of Figure 9.21, virtual address is of 13 bits, Each page contains 2" = 1024 words So
the high order 3 bits will specify one of the 8 pages and the low order 10 bits give the line address
Within the page. The organization of the memory mapping table in 4 paged system Is shown in
Figure 9.21. The memory page table consists of 8 words, one for eaci page. The address in the page
denotes the page number and the content of the word gives the block number where that page 1s
stored in main memory. The pages 1, 2, 5 and 6 arein main memory in blocks 3, 0, 1 and 2 respectively.Memory Syste
20a,
& presence bitin each location indicates whether
spemory into main memory
+ presente hea tints thats page tava ta stringy, 4
Operaung system is generate co fetch the required page trom auxtiony meme, Mt
into main memory before cesurning computation. The CPU refere pi
a virtua adress of 15 tts. The 3 high order bis ofthe virtual eress spec ST
and also an adress for the memory page table-The content af the word, an
table atthe page number address is read out inca the meznory table tie Page
+ the presence bits 1, the block mumber thus read is transte
ofthe main a ster. The line number fiom the virtual addres
into the 10love order bite ofthe memory address rapist: A read signal a men atte
theconcens of the word to the main memory bulfer register ready be sedty ne cea
In general a system with 'n' pages and 'm’biocks would require a memory page t
able of y
of which up to "mm blocks will be marked with block numbers and all other are empty
NEES 3 Word in,
a page ny
the menor
Ug) ste:
ed ta the tw
Woeations
+ Letaddress space be 1024K words,
+ Let memory space be 228 words,
+ leach page or block contains IK words, the number of pages ys 1024 and the
+ The capacity of the memory page table must he 1024 words
+ Only 32 locations may have presence bit of 1
+ Atany given time 10243
‘umber of bucks 39
92 locations st least will be empty and nut in use,
Amore efficient way of organizing page table is to construct it with a number of sw
number of blocks in main my
be fully utilized,
ors equal ta the
mory: By this, size of memory wauld be reduced
ach location wi
Page No. Biot No
Figure 9,22 : An associative memory page table9.
a4
——-» Computer Architecture
This can be done with associative memory havi
number together with its correspor ya
8 each word in mei
i mMory cc
nding block number. ¥ containing
a pay
The page field in each word is compared with the page number in th
Ifa match occurs, the word is read from memory i
extracted, This is shown in Figure 9.22,
tual address.
and its Corresponding block number ig
An associative memory of 4 words is used. Each entry in the associative memory array consists
of two fields. The first three bits specify a field for storing the page number. The last two bits
constitute a field for storing the block number.
The virtual address is placed in the argument register. The page number bits in the argument
register are compared with all page numbers in the page field of the associative memory.
If the page number is found the 5 bit word is read out from memory, The corresponding blo:
number, being in the same word
transferred to the main memory address register
Ifno match occurs, a call to the operating system is generated to bring the required page from
auxiliary memory.
PE viru Memory System
r s. It consists of
shination of hardware and software techniquesS More attractiy
because least rece!
y used page is a better candidate for removal.
FF Disadvantages of LRU algorithm
—
+ Itis difficult to implement
9.6 Secondary Storage
Primary memory is very expensive and has limited storage capacity because of its volatile nature.
In order to permanently store large amounts of data or programs , we use a cheaper and permanent
memory called ‘Secondary memory’. This memory provides permanent storage of data in bulk
quantity.
A'secondary storage device’ refers to any non-volatile storage device that is internal or external
to the computer. It can be any storage device beyond the primary storage that enab!:s permanent
data storage. A secondary storage device is also known as an aux’ iary storage device, *ckup storage
device, tier 2 storage, or external storage. These devices store virtually all programs a’ ~ applications
on a computer, including the operating system, device drivers, applications and gene 1 user data.Computers use main momory such as candem access memory (RAM) and cache to hold data that
computer
being proe-ssed. However, this type of memory is volatile. and tt loses tts data when the
+ anid tablets, need to store
switch | off General. purpose computers, such as personal computer
programs; nd data for ater use.
‘That's wh, secondary storage is needed to keep programs and data long term, Secondary storage |
nnon-colatile and is able to keep data for longterm. They are used for various purposes such as backup
data used for future restores or disaster recovery long-tetm archiving of data that is not frequently
accessed, and storage of non-critical data in lower-perfurmning, less expensive drives
Without secondaty storage, al programs and data would be jost when the computer is switched off
[GB] Advantages of Secondary Storage Devices
In secondary storage devices. the stored data might not be urider the direct contra! of the operating
| system, For example, many organizations store their archival data or critical documents of secondary
Storage drives, which their main network cannot access to ensure their preservation whenever x data
each occurs
«Since these drives donot interact irecty with the main infrastructure andl cam be siated is areme
|.” Siiccure ste isonet thot ahaer may aces these desuness hey phyey stolen.
Characteristics of Secondary Storage Devices
+ itis non-volatile, which means it retains data when power is switched off
+ Itallows for the storage of data ranging from a few megabytes to petabytes
«+ {tis cheaper as compared to primary memory.
«+ Secondary storage devices like CDs and flash drives can trausler the data {rom one device to
another.
‘Types of Secondary Storage Device
‘The two types af secondary storage devices, are
+ Fined storage and + Remawahle storage
Fixed storage is an internal media device used by » computer system to store data, Usually, these are
referred to as the fixed disk drives or Hard Drives,
Fixed storage devices are not fixed. These can be removed from the system for repairing work
maintena. .» purposes, and also for an upgrade, etc. But in general, this can not be done without +
proper to:ikit to open up the computer system to provide physical access, which needs to be done
by aneng, weer
Technically, almost all data, ie. being processed on a computer system, is stored on some built-in
fixed storage device. Difforent types of fixed storage devices are:
+ SSD (solid-state disk) units,
+ Internal flash memory,
+ Hard disk drives (HDD)san external media device that is used
Removable Disks drives or the
Removable storag
e referred tas
torage device that can be removed from a computer system while
A computer system to store
xternal Drives
as
thes ia
ne system is pun
ning fy
es it easter for a user to transfer data from one computer system + st
storage a another
he main benefit of removable disks i storage factors that they can provide fast data ty
ated with storage area netvurks (SANs). Different types of Removable Storage arg ter rat
+ Optical dists (CDs, DVDs, Blu-ray discs) + Memory cards
+ Floppy disks + Magnetic tapes
+ Disk packs
+ Paper storage (punched tapes, punched cards)
Classitication of Secondary Storage Devices
Figure 9.23 shows the commonly used secondary storage devices.
Secondary Storage
Devices
1 -
Y +
Sequential Access Direct Access
Device Devices
Y — ft - —
netic Tape yy ¥ .
i PC Magnetic Optical Disks Memory Storage
Disks | Deviees
a — + - —t
I t ’ , v Y Y ’ Y
Floppy Hard CD-ROM WORM CD-RW PVD ng Moma
Disks. Disks: {CD-R} Derive Card
’ y 1
Zip Disk Disk Pack Winchester Disk
Figure 9.23: Secondary Storage Devices
Ey
Itisa class of data storage devices that read stored data in 2 sequence, This is in contrast to randot
‘access memory (RAM), where data can access in any order Magnetic tape is the common sequent!
access storage deviceecitisa medium for magnetic recording, made of agnetizable coating on along,
ananetie thE sti film, Devices that record and play aucio and video using magnetic rape are tape
pee Mjeatape recorders. device that stores computer data an maeic tape is known as
oe age key technology In early computer development, allowing unparalleled amounts
mnechanically created, stored for long periods, and rapidly accessed
ape dive
jgntato BE
quien
gs storage device (DASD) is another name for secondary storage devices that store data
prec ete
a ich as hard disk drives, optical drives and most magnetic
Heerate locations with aumiqueaddress,
storage devices.
1, Magnetic disks: A magnetic disk is a storage device that uses a magne
write, rewrite and access data, It is covered with a magnetic coating and stores data in the
form of tracks, spots and sectors. Hard disks, zip disks and Hoppy disks are common examples
of magnetic disks.
(i) Floppy Disk: A floppy disk is a flexible disk with a magnetic coating on it, and it is
packaged inside a protective plastic envelope. These are among the oldest portable
storage devices that could store up to 1.44 MB of data, but now they are not used due to
very little memory storage
(ii) Hard Disk Drive (HDD): Hard disk drive comprises a series of circular disks called
platters arranged one over the other almost % inches apart around a spindle, Disks are
made of non-magnetic material ike aluminum alloy and coated with 10-20 nm magnetic
material, The standard diameter of these disks is 14 inches, and they rotate with speeds
varying trom 4200 rpm (rotations per minute) for personal computers to 15000 rpm for
tion process to
servers,
Data is stored by magnetizing or demay
wetvaing the P
etic coating, A magnetic reader
arm is used to read data from and write data to the disks. A typical modern HDD has a
capacity in tera hytes (TB)
2, Optical Disk: An optical disk 1s any compu
teclann
er disk that uses optical storage techniques and
yy ered and write data, ISA computer starage disk that stores data digitally and
uses laser beains to read and write data
(i) CD Drive: CD stands for Compact Disk, CDs are ew
disks that use optical rays, usually
lasers, to read and write data They are very cheap as you can get 700 MB of storage space
for less than a dollar: CDs are inserted in CD drives built into the CPU cabinet. They are
portable as you can eject the drive, remove the CD and carry it with you. There are three
types at CDs:
+ CD-ROM (Compact Disk - Read Only Memory): The manufacturer recorded the
lata on these CDs. Proprietary sottware, audio or video are released on CD-ROMs.
+ CD-R (Compact Disk - Recordable): The user can write data once on the CD-R. It
cannot be deleted or modified later
+ CD-RW (Compact Disk - Rewritable): Data can repeatedly be written and deleted
on these optical disks.weno S108 ©
sevice that ea S
wltimedia Fes
(iDVD Dawe: OVD sa
a for digtal
Sperthey are usualy used #0 STOPES paca le
‘Die ales came in taree varieties” 2ST"
alsa definition
1 that stores hat °
Blu Ray Disk: Siu Ray Diss (8D) 18 29 OP" pan re OVD
Bpscan
er multimedia files. BD uses a shot
da
3. Memory Storage Devices: \ memory device contains ilions of
nected memory calls
se cals hold millions of transistors representing
allowing a computer to read mauion It includes
Fee aera cand. hick youl recognize a dhe STAR.
i ras
(i) Flash Drive: 4 ts dove ssa small ulraportabe storage device USB “e" drives
alto easy ming flesfrm one device to another. Flash driv: °¢ net
ne a USB
caters and other devices via a builtin USB Type-Aor USB-C plug, makin
combination
aves, or ump drives. Tne terms
referred to as pen drives, thu
tate drive (SSD) are also sometimes used, but most of the ume,
rrobiie ISB nased storage devices ike external hard drives.
old up t9 2 TR of storage. They're more expensive per
tot they have prevailed as 2 simple, convenient
sn computer organization, sach as.
drive is 3 device plugged anto a SR port of the system that
and photos to a PC and vice vers +
passihte
\dsmaller size ofa
ng data wransportatio
+ Backup Storage: °
tion, Important infor
medical records,
n related to fam|
tos can be stored om them asa backup
«+ Transport Data: Professionals or students can now easily transport lange data
ideo, audio lectures on a pen drive and acsess them from anywhere.
ot PC techn cians can store work-related utility tools various programs,
on 2 high-speed 04 GB pen arive and move from one site to another
card or memory cartridge i an electronic data storage device
flash smemory These are commonly
used in portable eles 8 such as digital cameras mobi
tn poate es ital cameras mobile phones, lapta
Computers tablets PDAS. portable media platers, video game consoles synthesieere
Hectronic keyboards and digital pianos and allow adding memory to such devence
such devices
ied within the device
(11) Memory card: 4 me:
used f digital i+ Computer Auhiteclore
Difference between Primary and Secondary Memory
Below are some main differences between primary and secondary themory in computer organization
| Primary Memory | ‘condary Memory
| © Primary memory is directly accessed Secondary memory is not accessed direct!
by the Central Processing Unit by the Central Processing Unit (CPU). Instead,
(cpu), data accessed from a secondary memary is
first loaded into Random Access Memor
| ___| (RAM) and then sent to the Processing Unit
| + | RAM provides a much faster-accessing speed | Secondary memoryis slower in latasccessing
| todata than secondary memory Computers Typically primary memon
can quickly process data by loading software than secondary memory.
| programs and required files into primary
s six times faster
+ Primary memory is volatile and gets Secondary memory provides a feature of
compl: ely erased when a computer is shut being non-volatile, which means it can hold on
| down, toits data with or without an electrical power
I
URLS Eee
RAID or redundant array of independent disks is a data storage virt
combines multiple physical disk drive components into one or more logical units for data redundancy,
performance improvement, or both.
alization technology that
Data redundancy, although taking up extra space, adds to disk reliability This means, in case of disk
failure, if the same data is also backed up onto another disk, we can retrieve the data and go on with
the opi" tion. On the other hand, if the data is spread across just multiple disks without the RAID
technic «the lass of a single disk can affect the entire data
The tever’ was coined by David Patterson, Garth A. Gibson, and Randy Katz at the University of
California, Berkeley in 1987.
It is a way of storing the same data in different places on multiple hard disks or solid-state drives to
protect data in the case of a drive failure. A RAID system consists of two or more drives working in
parallel. These can be hard discs, or SSD (Solid State Drives)
Key evaluation points for a RAID System
+ Reliability: How many disk faults can the system tolerate”
+ Availability: What fraction of the total session ume 1s a system in uptime mode. Le. how
available is the system for actual use?
+ Performance: How good is the response time? How high ts the throughput (rate ot processing
work}? Note that performance contains a lot of parameters and not just the two.—— _
+ Capacity Given a soto N disks Cash aval locks How mach Uefa a
nspatent tu the underlying syston This meHts, tthe Host ystay
ng self as a linear array of blocks. This allows oly
RAID is very tt
1 single big disk presen er We hin
replaced by RAID without making too many changes 4 the existing code +
RAID combines several ineependent and relatively small disks into sie storap,
s. The disks can combin
The disks included in the array ave called array ments
diferent ways. which are known as RAID levels. Each of RAID levels has its ows chars
+ Fault-tolerance is the ability to survive one of several disk failures ‘
+ Performance shows the change in he read and writes speed of the eat ary oy
bmpary
+ Thearray's capacity isetermined by the amount of user data written tothe ary: iye
capacity depends onthe RAID level and does ot avays match the sum ofthe Rap gan
isks' sizes. To calculate the particular RAID type's capacity and set of member disks y
use a free online RAID calculator. ‘an
RAID systems can use with several interfaces, including SATA, SCSL IDE, or "FC (liber channel) Son
systems use SATA disks internally but that havea Fire Wire or SCSI interface forthe host system
Sometimes disks in a storage system are defined as BOD, which stands for lust a Bunch ofDisks th,
means that those disks do not use a specific RAID level and acts as statl-alone disks, Ths is oeg
done for drives that contain swap files or spooling data.
==
RAID works by placing data on multiple disks and allowing input/output operations to overlap ig
a balanced way, improving performance. Because various disks increase the mean time hotween
foiluroe (MTBEY
RAID arrays appear to the operating systent as a single logical drive. RAID employs the techniques of
disk mirroring or disk striping
+ Disk Mirroring will copy identical data onto more than one drive.
+ Disk Striping partitions help spread data over inultiple disk drives. Bach drive storage space is
divided into units ranging from 512 bytes up to several megabytes. The stripes of al the disks
are interleaved and addressed in order
+ Disk mirroring and disk striping can also be combined in a RAID atcay.
in a single-user system where significant records are stored, the stripes are typically set up to be
vmall (512 bytes) so that a single record spans all the disks and can be accessed quickly by reading
ll the disks at the same time
na multi-user system, better performance requires a stripe wide enough to hold the typical o
naximum size record, allowing overlapped disk 1/0 across drives.| digit by its
resulting
i divisio
pe aes Hexadecimal to Decimal Conversion
To convert a hexadecimal number to decimal, multiply each digit of the gi
neglecting the
its weight and add all the product term
eiip___—_.
Convert 6E5,, to decimal
Since the octal system
representing each octal
> __
Convert (742) , to binary
Number System Cia}
exadecimal number by
—_
Convert (F4C),, into decimal.
(Fac
Fac
x 16° +4x16'+Cx 16°
)
=15*256+4«16+12*1
3840 + 64 +12 = 3916
= 3916,,
ber can be converted to binary byEa cimalto
rt a decimal
6 till qu
nder is from 10 to 15, th
onvert a decimal fr
part until the fractional
ry in the i
hexadecimal fraction.
iia
Convert 6796.3, to hexadecimal
Integer Part:
6796.3, = LABLAC,
ai ——_
Convert (77), into hexadecimal
Szero or less than 16, Write down the reu
replace the
ers from bottom to top gives the equ
lecimal Conversion
ide the give
Meger eae
each d
nal equivalent d
nleger
Fractional Part : \
03 *16= 48 > 4 94 \
Re IA=17R > 12
=
Convert (1938),, into hexadecimal
16, 1938 A
16, 121 -
BEER oni
octal system i
Convert (742) , to binar
-_
Hence binary equivale
=(111100010),
‘Yo convert binary to
represent each group
Convert (10011) , t
010
Thus octal equivaledix of this system is 8. It
egor and fractional parts-
7 system and its binary
Me
} 45 e | aad
‘Table 1.3 : Numbers With Base-16- ee
1,2 Base Conversions
BEET inary Conve
dabble method integer rani fractional parts are converted : se]
EEE ecivnat Integer to Binary Integer (divide by 2 method)
‘A decimal integer is converted into an equivalent binary integer using repeated division by
parately.
two process.
In this process the given decimal integer is divided by 2. The result has a quotient and a remainder.
rt
The quotient is again dived by 2. The process continues until the quotient becomes ‘0
ng the
is obtained by w
The remainder of each division is noted. The equivalent binary
remainders in the reverse order [Bottom to Top]
That is the first remainder obtained is the LSB and the
valent
is the MSB of t
binary integer number.1A LSI
y1,=101001, MSB
r= 101004
Ao-0
3-0
bop | psa
si,,= 110011
=
———"
Convert 1231,, to binary
gist ALB
1-9 [MSB
1231, = 101
Y tnvthas 9)
the given deciiyal integer is divided
(2) The result bas a quotient and a remainder
(3} The quotient is again divided by 2
(4) The process is continued
il the quotient become
Oor'l
(5) The remainder ot waets di
(6) The equivalent binary integer is obtained by writing
the temainders in the reverse order [Bottom to
Toph. fe, the first remainder obtained 1s the LSH
and the last remainder is tthe MSB of the equivalent
binary integer number
=2—
| Convert 16,, to binary
2\ 16 ALSB
16,,= 10000.
| Convert 67,, to binary
| 2 168-0 |
SB
673,,= 1010100001
oor
5-0
22-1
1g MSBConvert 175,, to binary
LSB
2| 175
2| 87 -1
Convert 1998,, to binary
= 10101111.
1988,, = 1 1111001110,etal Convers
—— wo
Jintegers © octal divide the gi
jes zero or less (an eight. Write down the re
lent octal integer eMainder yp Mem
ach
arr deci
e quorient bec
emainders UP
‘action
To con
con
py Bune ch
Reading ther
ro convert a de
resulting {ractlon®
pcimal ft
Convert 392.8, 1 OCtal
2.8, = 610.6314,
a=
Convert (177),, into Octal
8) 177
g[ 22 -14
(zs
0 -2!
177,, =261
ywards gives th
to octal, multiply
iJ the fraet jonal part
uipart with by 8 unt
2560 124. ()
436
ven integer by 8 and then eact
’ICh reg
Sultin,
«
e equiva
he given de
the given decimal (raction with
with «
CINE ang
4,
becomes:
comes ZerO OF an ear|
an eartio,
hry
T8Ctigg
Pe,
NNN 64-6
pars 4293
U2es=l607
06 =48 4
U6, - 0.0314,
en
Convert (7562),, into Octal
8 7562
eA
8, 945 -2 |
g 118 -1{
BI 4-6 |
1-6)
= 16612,To convert binary to octal, we group the bits starting from right most bit into groups of 3 and
represent each group as an octal
Convert (10011) , to Octal
010 O11
{|
2 3
Thus octal equivalent of 10011 , = 23,
a
Convert (10010101011), to octal
010 010 101 o1n
2 2 5 3
‘Thus octal equivalent of
10010101011 , = 2253,corner artiteive
a
Convert (10110101), into octal,
no 110 101
1 1 ‘
2 6 5
40110101, = 265,
PREEEI eecin to Binary Conversion
also simplistic. Given
This conversion
equivalent. Then, combine each 4 bit binary numbe
oe
aa ___
Convert (1000401) ,’ ’ ’
soliton =2
HEBER - ¢
bobo
1iitoo1t 1010011
1o1o ONL
BEERS nary to Hexadecimal Conversion
The hexadecimal number system uses the digits 0 to 9 and A, B,C, D,
system is a power of 2 (2*), we can take a roups of
hexadecimal digit in its place
111000010,
the hexadecimal
F And
4 and use the appropriate
ary number in g
The steps to doing so are simple. Begin at the rightmost 4 bits. If there are not 4 bits, pad o’sto the left
until you ‘y. 4. Repeat the steps until all groups have been converted
ihe
and th
digit
cons
step
Cony
Hex
valuc
Con
Ste}
Condecimal equevatent
Looted! =
Jem two step)
The conversion is
diy
a» __
Convert (742) , to hexadecimal
step 1
plot Convert vctal to binary
7 4 2
‘ 1 4
- nt ho
Hexadecimal to octal conversion procee
rouping the binary bits iio 3-bit octal tips
7 values, then r
am
Convert (FAS) ,, to octal
Step 1:
Convert hexadecimal to binary
0 the left 3
; odd
oor | 1111 | 100
unary to hexadecimal grouping, Aigit
10
0101
Number Systems + >
exadecinial
Hence hexadecimal equivalent ¢
HOOT = EB
ine binary as an intermediate base. Ortalis converted to bina
ch toa hexadeciy
by fours, which cortespan
step 2
Group 4 bits together and represent equivale
hexadecimal dight
Binary equivalent. of the given octal number
(111100010)
1001 m0 uno
|
; 4 | \
| Hexadecimal equivalent of 742 , = 1E2
Jecimal to Octal Conversion
sels by first converting the hexadecimal digits t6 4-bi bins
Step 2:
Regrouping the bits into 3 bits
Given binary (0 O11 111 110 100 101
Cone
14Number Systems +
This is simple addition of bits according to the rules of Binary Addition
dition of Unsigned Numbers
Example: Perform binary addition of numbers 10110, and 10101,
Cary >
0 1 0 0
Augend > 1 0 1 1 0
Addend > 1 90 4 0 1
sum > 1 0 1 0 1 1
In L* column ,
0+1=1 withacarry of 0.
0+0+1=1 withacarry of 0
04+1+1=0 withacarry ofl
In 2" column
In 3" column ,
In 4% column
1+0+0=1 withacarry of 0
The sum is 101011Humber Syaten
om
Jhis operation ts similar fo the baste atthe
lary Subtraction,
when We subtract 1 [rem Lave need te horsuw trom the next higher order digit, te
bv Land the remamder lott here is alse £ The four rales of binary Subtraction are
«0-020
elon)
+03 1 [Borrow 1}
rowan 901 011010 001100
Solution; Solution:
tetany o 0 4 0 1g
»oOrid oo oo
orite er) to. @
* Binary subtraction 1s pettormed column by column ta a similar manner ‘o that in dec
subtraction In order to subtract | from 0 bartawing is necessary frat tive ne: higher pe
isthe The borrow 1s equivalent to adding 2 (a value equal to the base of the number system) ta
order to subtract J trom (we must borrow 1 from the nest hi
ighu'e position. The borra
paverts the 0 to 10. which is equal to 2
0 1= 1 witha borrow ot 1
+ Bo
wing 1 from a higher bit position 1s equal to subtrac
of | from that bit and redy
11 able 16 chessie heh
the 2
Horie > 0 o o
ws: Minuendl x4 1
Subtrahend 0 1 1
Difference > 1 ( Dve”
op Sneha
{ay Ordinary Binary Subtraction
fo) Station ws s Comprement ruber
{e) Subtraction using 2's Complement \
[ay rain
rhysis te simple method of subtraction of bts according to he rales a inary subireton
011.901 Mo1oine——swr191 2010 \ L_
our 101____orooucnos__-vo1488 4010 (©) 2sComplen
aro ——_swua91001 01: 100008 + n2sc
= —— asl
1's Complement Method of Binary Subtraction
o) I tio Step t
«+n 1's complement method the subkractian ts porfarmed using nly addition. To subtract step
4g smaller binary number from larger binary nurber te following steps are used step?
Thean
‘Step 1: Obtain 1's complement of yhe smaller ume
‘Step 2: Add !'s complement te the larger number
Step 3: The addition always result in fina arty called end round cas
Stop 4: Remove the end around carry and tothe result The nal esl wil be in
true binary form
tion usin 1's complement metod fst both the nunbers must be
«+ To perform subtrar
er of ts he integer pasts and |
expressed. st
fraction parts hy al
the same rember of bits 1th Teading ant tang sto the
RSE 0 tors om rt nero —_\
‘ subtraction is:
uteatarand cry ———— _— Sisal
| ciferent cases
wo 1. Both mi
= 2. Both mi
—_ 7 3. The mir
4, Themis
5, Both m
6 Both mMumber tyatams © Gy
MN ecto: eos ston,
Here the minuend has G-bits, Therelore the subtrahend Is
0 express.’ ay f-bit
| number by. adding 2-leading zeros.
| Joi
oorlaL es + HOO
ton. ; Honor
+1
ONO,
(9) 2's Complement Method of Binary Subtraction:
+ In2's complement mettod the
a smaller number fram
ubtraction is performed using only additic:
larger number the following steps are used,
‘ Step 1: Determine the 2's compte
ibtract
' Step 2: Add the 2's complet
Step 3: Th
To subtract
ment of the smaller number.
to the Larger number.
ind around carry. Discard the carry,
The answers in true binary fo
sing 2's complement method
Here the minuend hs
eis always an e
bits. Therefore the subtrahend is alsa expressed as f:byt
Ibe Number by adding 2-leading zerns
2's complement of 011011 is 100100
bust be on]
Hs anid hoo101
to the it
| tortor
O1n011 10)
Discard the carry
101101, - 011011, = 10010,
Subtraction fs similar to addition, Adding 2's compte
| disregarding the carry, if any, achieve
different cases:
ment of the subtrahend to the misuend and
Subtraction. The process is illustrated by cons. i, ing six
1. Hoth minuend and subtrahend are positive. The subtrahend is the smaller of the two,
Both minuend and subsrahend are positi
- The subtrahend is the larger of the two.
The minuend is positive. The subtrahend is negative and sinaller in magnitude
The minuend is positive. The subtrahend is neyative and greater in magnitude
Both minuend and subtrahend are negauive. The minuend is the smaller of the two,
© ott minuend and subtrahend are negative. The minuend is the larger of the two,CE tower seen
Case:
+ The binary representation of +14 = 00001110.
+ Now, the 2's complement ofthe sultrahend
+ Therefore +24 ~ (644) is given by
01 1909,
+ 11110010
"00001010
with the final earry di
‘+ The decienal equival
case2
Lotus subtract +24 from +14.
«+The binary representation of +14 = 00001110.
+ The 2's complement representation of +24 = 00011000,
“The 7's complement ofthe subtrahend (ie. +24) = 11102000.
+ The decimal equivalent
hich sin 2's complement form 10. whlch
Thi. afore, +14 - (+24) i given by
‘69001110 correetanswer
+ 11101000 ane
LOO + ets subtract -24 fom 14,
which is of course in 2's complement form, is 10 + The 2's compioment representation of -14=
+ The 2's complement representation of
+ The2's complement ofthe subtrahend = 000
+ The decimal equivalent of
hich isthe correct answer
+ Therefore
+ Letias subtract -14 from +24
«The binary representation of #24 0001 1000 = minuers.
1020 = subtrahend.
= The 2's complement representation af “14
‘The 2's complement ofthe subtrahend (Le.~14) = 00001110.
snerefore, +24 ~ (+14) is performed 35 fl
‘0011000
+ 00001120
001001
+ The decimal equivalent of (0010 +30, ie is the correct answer.
" 2 complement of et
binary counterparts AD inthe MSB positon indicates a positive sign, whilea" nthe Spe
Indicates a negative sign
7
cases
Lotus subtract =24 fom #14
«The binary representation of +14 = 00002110 = minuendComputer Archie,
BEEN ypc
Binary multiplication works just like decimal mukiplication
‘The Rules of Binary Multiplication are
+ 0r0-0 soeteo
sLso-0 sdeted
10111
Lon
Lis
poi
rod
triad
1010.01
ust jiyun x wuUUOL 10 = 11210110
=
0010111 «00000013 ~ 01000101
10tixtor0
1
1
0
0
1
1
1
Ox
noo0
Doo000000
oolo1o0l-
o1o1oors
oritioito
oogrord
xoooooorl
ritit
ovororns
oor
doronoiot
boosie
The main
Binary di
division f
Lal
ii
Divide 1
For theNumber Systems
EEE or Division
‘The main rules of the binary division are:
tele
120 = Meaningless
os1=0
050 = Meaningless
Binary division is the repeated process of subtraction, just as in decimal division. Yo perform,
division follow the following steps:
1. Align the divisor (¥) with the most significant end of the dividend. Let the porticg,
dividend from its MSB to its bit aligned wath the 158 of the divisor be denoted X
2 Compare Xand ¥
(a) IX >= ¥,the quotient bit is 1 and perform the subtraction XY
{b) FX < ¥, the quotient bit 1s 0 and do not perlorm any subtractions.
3. Shift ¥ one bit to the right and go to step 2
<=
it Traptor
+
ae Dividend
1107
Subtraey
[ 1100780] ef stn
ni aT [7s
Subtract
Divide 19 by 6
Ce
6-1) roor: «
‘-ouo
100
lio
ori
bio
pore
For the above example, the division process gives remainder as 1 and quotient as 3Number atom = CEB)
Em:
nputers can
Tscand only the numeric values. But, itis not always certain that allie inputs are
Skee in Rumerte form So, there was a eed for an encoding system which could conve * the text files
“mens values For this ASCH (pronounced as ask ee) was developed. AMERICAN STANDARD
O8 INFORMATION INTERCHANGE (ASCII) is an encoding approach, which fs a code for
8 characters in English into seven bit integers. 95 out of 128 characters are printable
Sts from Oto 9, lowercase and uppercase letters from a to 2 and the punctuation
vols ASCILIs used n electronic Communication. ASCII originated fram the telegraph code and tt
Mpeg as 27 bit code for teleprompter In comparison to the telegraph code, ASCII codes are
ent and can feature 2 large number af devices
EER crevice
Dic(pronounced “ebb see dick”) 15 short for extended binary coded decimal interchange code is
ht BH, oF one byte, wide This is a coding system used to represent characters-eters, numerals,
Nation marks, and other symbols in computerize text A character is represented in EBCDIC by
31 BH EBCDIC mainly used on 18M mainframe and IBM mid-range computer operating systems
ts consists of two nibbles, each tour bits wide. The first four bits define the class of character,
« the second nibble defines the specific character inside that class.
SCDIC s diterent from, and incompatible with, the ASCII character set used by all ether computers,
EBCDIC code allows for 256 different characters. For personal computers, however, ASCII is
the standard if you want to move text between your computer and a mainframe, you can ge! a file
conversion utility that will convert between EBCDIC and ASCIL .
IC was adapted trom the character codes used in IBM's per-electronic PUNCHE!: CARD
machines, which made it less than ideal for modern computers. Amongits manly inconvenient, were
‘the use of non-contiguous codes for the alphabetic characters, and the absence of several purictuation
haracters such as the square brackets (] used by much modern software.
he ‘ios sibbic ww ailunes,iii i, defines the character as a number, and the
fines which number is encaded. EBCDIC can code up to 256 different characters,
Difference between ASCII and EBCDIC
cond n
I ___-BBepic
fer encoding standard for electronic | An vighthit character encoding used mainly an LBM
ramen BN midancecmpie ere |
- ———-___ —+ |
inds for American Standard Codefor Information Stands for Extended Binuy Cod Decimal |
Imerchange Code |
one
rows Interchange ee
bits to represent a character
+ Represen
codets Sys, ta chiral
intoan
[ Uses @ its to repre
128 characters Represents 256 character
+ [ar
ges the characters in consecutive ord
Groups 9 characters at atimeat if ai
e output must also be 1. Therefore, if
t.
NAND Construction
onstruction
This is made by
NOT gate, this automatically sees to the "OR"
and leaving only the NOT part.
Desired Gate
rt of the NOR gate, eliminating it from consi
NOR Constru
EREW2 NOR as AND Gate
An AND gate gives a 1 output when both inputs are 1; a NOR gate gate gives 1 output only whe
inputs are 0. Therefore, an AND gate is made by inverting the inputs to a NOR gate
Desired Gate NOR Construct@ + Computer Architecture
NOR as OR Gate
The OR gate is simply a NOR gate followed by a NOT gate
Desired Gate NOR Construction
A
Q oT yoo
FREER 08 2s nan Gate
A NAND gate is made using an AND gate in series with a NOT gate:
Desired Gate NOR Construction
8
PREPET 01 a:x.08 cat
An XOR gate is made by connecting the output of 3 NOR gates (connected as an AND gate) and the
output of a NOR gate to the respective inputs of a NOR gate. This expresses the logical formula (A AND
B) NOR (A NOR B). This construction entails propagation delay three times that of a single NOR gate.
NOR Construction
Desired Gat
A Ds
Q e [> 0
or as X-Nor Gate
in XNOR gate can be constructed from four NOR gates implementing the expression "(A NOR N) NOR
N= A.NOW B" This construction hae a propagatian delay three times that of a single
IOR gate, and uses more gates.
Desived Gate
—a
Eee
oolean algebra was invented by George Boole (1815 - 1864). In digital electronics it does th
‘ne job as a truth table, but with symbols. A Boolean expression tells us what condition will give a
vet Of L Boolean Algebra is used to analyze and simplify the digital (logic) circuits. Ituses only th
NYY numbers ie. 0 and 1. Itis also called as Binary Algebra or logical Algebra.