0% found this document useful (0 votes)
11 views

Computer Organization and Architecture!

Uploaded by

ptrial1900
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Computer Organization and Architecture!

Uploaded by

ptrial1900
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

<br>

22
23 30
3)
33
39
S
|2

6 3
|4 27
2 43

CoMPUTER ORGANIZATION
AND

RCHITECTURE

| Introducien
Aretutuu 2 Floating Poit Repreutatian
3 MiYoo peratie
4. Iyttuctie ud Modes
S. CPU, Data Path e Coub
6 Io Orgougation
Mainy l cache

ARCHIT ECTURE
Conceptual dzsgm
.

shu
woder,
CPUdesig,Iustuctios, Adavres ing
Doa omat

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Dat

Nwabers haracters

ASCI
Fixed Foting Ame'ea Standa
peint poutl Code
tY

Ois cogw Extuded


Biy Coded
Deuml

Stored
Baqas Arclaitecture
The
stored
2
anctitkcturer
Von- neumw arcitectu
HRaiwond Arcitectu

FloatingPeint_ Represeutotien
ages hage st moers
provid with
laad Mlwwber

Sig Eponeut Mautia( hactiom)


( bt) (biase Sged tradon

.
Bias value i added epeneute
Bins 2 wtee expoat
alo wewn a exce wotn

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Mautissa ia womaized
Ezplieid
homaliatn Aret eit et, bel

|01||
btgre
Imglit J
eould wttt
be

normal'gatien buany poud

a wet stored
O
Binay pout
pocut ot
bigte betoe biay u
wot sored
tored

mulu
w
Valu
wnplicat inucuyat

Vae
exeul woweli zatm

a bit Boo
negtin wsed to troctibnl
store out
Quuten- Conid
Tue wMautisa
l6
nowbliyd ngd
4
Bpene.
epiesectad exces 32}. lat te 16 bit vale
tor
6
bit
M
4

14-%: 10o1:Ol
explict wwo'yalee
net tieed.
19- 25

E 5+32
=
37 : Loolo|

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Caule
Mored
Can be red
stored
wudertow

Disadvautoges
H
caut store O

ut store volwe
dose to o

IEEE - 754 Floatng pout Kepreseutadon


O Stoudard

Sungle Precisieu
(32 lait) Deble reciien
t= aLO's Store
OR Speal
23
t au 'sibeis M
S2.
Bias= 127
Bcas 1023

For IEEE, default

Speual uubers
M. Nuwber

00...0 +0
-0
+oo

Not a Mwwaen

Deuom

E00.-O
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

bial
Vaue
Linmpiiat)

-]26 or -1022
Valu (- oM* 2
(Aenormalied)

veng vey Sall


muiber ttuat
caunot be nomalied

Smalleat poscilole vaue t E = (ooo...),


heuce, e
l- 127 : - |26

M
1· |

128 fimes e- -124


tee uber u stored E=-|2t|27 =2)
denomized form

000 126

for deuorwsli d wo'


e
-|2%
E
0O00 00..
auys

E-|29
-|29
2-126 -12
Jl*
1-L*
2 oLIo
EOoo0
0
M

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

OF
CoMPUTER
COMPO NENTS to
dttt cops
ALU
(cowiputiou)
(RAM, Rom)

SecondayHoo)
ATuput
Devicer
B Io

Ditaa.compeuuts

Sysken Bus
O
Colectien e
cemmwmicatien iwes betweew
3 THpe

H
Data Be baed tenat coutt
Casid

AAdress Bus
CPU bala by Memoy

Ceho buy To Deviee

oheratont peronmed
Read [eott gecs om wmeon t

CPU

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ok adderses)
Addres
bite
w
tee addess bu)

Mamon Acces Read


sends addrex to wewot tregu
A

ddhes Bu.
CPU seuda catrst ugua to
data
Tead

Memong Acceu
seuds addhes to addeu hut
seud data to data bus
CPU Suuds co to
wnt

CPU Registers|
age wtthi CPU.
O smal stor oCtie
Genenae Punpose Regt (qPR) Ro, Ri, R2
qenesat eo pecia Ppose kegt ( sPR)
Accumulator
oga Coutn
uctn Regutn

Status Wosd

Ragetmana)
Data hem Dota Rigis te
(MoR| MBR)

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

O Accumulator o seelawn 4 fee


used to store te heslt ALU

OR
ALU
ALU

2
difereut acitectu baued

Ceuut
we to tore addhes et ustucten to loe
executed

Used store
eacuting wustrucion.
() Stack fouute
ed to store adde

wed stotu ALw

(Coututn elacde.
Ca
alo wen a

ceuditin eode)

Addun
Data Mwy
Adde
wsed
to Send addrex to mewo

used seud dota oe CPo to wey r

to

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Micro-Operatons
valwes stored
The epertiene executed =
Netaten to describe micro opot

R2
Trauafor RI
Roget

exclusive operatis
RLR2
Trawster

Hemor Read onde.


Meony
[Ada]
RfM M[A4d] Re

20.
wion Cadoes looo

Rl= 6
<
K2= 6 +20 26

Leuge
Ttructien

Vaialole
Fixed Lengtlh initnchm
ituctitn
ate vaable

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

wtiel Jupports
D
tonider a has
beteh The
L
addes uwtru ien uct
Hree 2- addhex
d 2
lait addhenes nd iinn
taeu, te Ca sppet ?
|- addren iwtutiens
2
add ytrueas addre ustwttor
addI add
add
2bit 2lbit it 25t

cRU receives am wstYuctien ,u neede t


deide
mituctien.
No- e
its n2 add
2
lait al
3.@ 2
addeye
wutis ane pousi ole
wwsed
cobatin hits

| addes tuctien
Max

No
RaddreL Unised
Spported epde lwten spovted.

3
2 2
3

2 beoz
Ladd
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

with 244 bit wstuctkon and bt addheses


2-address ia truts, taeu,
we be tormulatd
hew laddess (ustrctiens Carn

addye inttin addhee iwtucten

epuode aoldi addz opeo de add


4bit q bit
6 bit 15 bit
2adoey
lo e
utruction Go
z
posible 2
6y
ef 2
addrus is tructie
Mo wsed ceubinatiene

ist 6 bits u epusde e I addres istctn


be

Maye No- e I addrees istructiene


that can
be
glatd 2o4

ad |2 lt
ystim wtth 32 loit tuetie
-address, wstuctuens ad
addhesed taene ae pes4
o

B000 -addre ustucties tomlabd?


stucte be
0- addes

2 addres
add! adde
/opuody add epode
(2biit
20bt 32-d

12 Max.
o! | addyes iuiutins
as4)*
(- 2
2x 2
Max
W
D
addres
B1024 - gooo)

192x2
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

2020 es

Crate procesor has


has 2 bypu
cowta
Each 1- typ uhucten
type huctun cotaime epode ud
aca R-
ne
I4 tee R-type opodes
ditnet

type iwtuctien Ro type tuttn


epcode addl Tutcwut
peode add adde
Ubit
6t
Let R-type iwtructie
(a-)x
-x = 2

INST RUCTION
he comwand to CPU
to ptonn

eutpy
w

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

to be performed ia deter wuined


The type ot operatien bt spcode
opcode epesaud wkormatim
wstouti suaved.
bils

Set Avchitetuse (ssE)


Istctien
t all ustuctens supported by CPU
Colectiim

en
ypes iuetucen bayed
o

wwed)
addreseu 3

b3 Addses Inctuen und)


Addhe
2
Iituce (2 addreses

aud
Support
barec
aceuaarcitture arclu tecture

cowputn wbuca sppark ey 2


addes luErln
9:- iuicder a digthl
eacl with
stution teu
wiwimu -
lcbt
addi add2 iutici
| epcode
5bt MAn
G
t Shit

a 2add ihitmilinm
:- Cowiden
6 yts
S2e of tetut
lopeode add

procenor has lio estinct itraeteme aud ge ene


A 32 bit wtectn urd opoti 2
gt

32 Rd 32- (6+St5)
addi
32-16 6 wts
Sht
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

2oL6
Gate Couider
rgst and twstrutuen sel
epcode,
Each ithucten
Size 12

seure
e
ditatn
2 Each hstuction wut be stored e

12 it inedecla

Prg
Ceusd
lepuode adal| add adds (nterwedat
6hut
4 bit 6bit l2hit

Since wmwmon
byt algnd,
5 to Store l luy.

=
|00X5 S0o bys

Eetive Addrei

wutrutn
opuode]
) eeatien
ututim Deco de
deode deodu
ERetre Addun Cateuttu
oferad Pete operatn
Execdte
te ßacu Ret

matructio
yele
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ase wet regued for all typs o4


itruc
Lletive Addu Caleahin
Fetcu eptcona
Decode Jene
Wite Bace Rek
ExeuteJ studians

Addnesing wode withuetien


Tells Hre byp
addes
w
te
lopcode| Mode Addre

heus and o wtre tee eperad


elbtained ator ti iutructie.
mode 6. Reqites Ludiret wode
Tmplicd
wode
1 Auto duereeut wod
Imwediate Autodevewt
tawputae2 wod
Reurtn wuede
wodel 3- Direct AddrestuA Inde
Addresiug wio dde wou
4 Tndhect q: PC Relate mode
wode.
5

LImp ed mode dtue tte


opercuud.
dafjni ton tthely
The
Increnmeut aceuuator)
Exauples LNCA |
uwlsuction
D addess
wod
d Immediat etructim vae
Addheet keld af witlh ceuetaut value
uwed to intialige egita

3. Direct od spetja tte ettective


addes ( addne
Addres keld mewo)
Mode Addres
opcocle

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

wuode
4
Indnect
Addse
te
addes eceadd
epoa Addre
BA meuoty
= 2.
to w implemunt
cLccenta
Ex Peitind

5- Rugiats nuode
egiste wticl teae eperand
Addre od
Mod Addres

bperand
Ragten
Ludiret wode
A
ddsex eld cpeus whic

Mode s
wsed to
shorte tehe insthuctn
leuge

opuodw.deld asdi

ou
ar itecture eme adde is ied

addt add

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Acdo olecreent
AutoiuCremet muode.
regixtea wndired
O vaiut automaticalg ineremt |ducretd
acces eie dada

Aucto increme
Post lncreet perfw operatem
vo
Hhe uerewed

Autole cremet
Pre
decremud it ducreeut
fe
tte

mode
Indered )| Index Reguter
O wed to acces elemut
ieren
eperaud addres uls iude
nuade
(4) PC- Relaled uodle/Posibcen indzpudut
Owed lorane iutuetiou
Val

addre pvogwnter

Reqts wode
Base

to addre
Base Registba vae aded
t
addren.
utrueben

addrese
ectuie
address
next
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Exausple
Atu itnutn
Moor teteh, PCz0
moce 202
iutdl) 20o pode
20|
Addne 500
202 Next witen

349

500
Ac
702 Tat iwtrutn
800 30

Mode
eHfedire addres
Iwmediat
201
500
Diect
Mode
5oo 800
Fudnct
800 300

400

400
Atacieeut
399
600

702
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
cts
<br>

& stored at locaien and addes


Q
An iustuctien
Locatien 3o1
Evadut etetve
prvcemoy regun
RI
du

(dduu,
U
adduin
EA = 250
) Direct
2) Reeatine (PClatte) BA 302+250 552
3) lagota indiret

mocle type wwtructien


relatie branch
addresA 3g0 The
is
branehmad t0
t
te vale et elate add

2. Detine tee vole

Betore strueten 300


30|

exeu

wthini eac wucteon ts exactt


Cewiden RUSC maclie nceditimal lorane initrchen
Conditnal and L

bytu addle
wode
e
Locat tee branclu uitctin.
to tae tanget ustructetn segee
Coudn
Re
*4
2 R3 Tonget
add
RS
Sb

PC
vai t4
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Certal Processin Unit (cP)


It ig tee lraiu ot
heeded procos input, store data ad

CPU tie < Time cPU takes to pertorTw

CPU
code at
Awen w
ytz.

ee Cycles Per Inzthucion


Time taln to CPI
execut lustrutiin * PU yee time CPJ
loce Yat

a
te macin A
tor wtel
Weowres wehe thecorded wthe
beeuante executig
ogiaus. A ssueu uat tte clock
hat

Iustuetbien No
Catyong yeles
oceusoee
ALU

Loade store
3
Branc 34
3

+
Ix04 3x0|4 4X0 34 +
S% 0-03
D-30
048+ D3 4
56+ bS
2.49

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

per semd)
MIPS(Miion Iincuctew
to
CPU'S pesforaee
used

, Sane iwsthutien
GateCouside tuo processos and P2 ee
idetcal
ker t Scut
teaat wnde aut
Set. Asme 25.
e tine

te dock
ucs
ogy P fe

Sae

P, P

Eecuten o.15t,
tine

CPI 124

jitucti
exeeuld, n CPI

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

22
ALU

eperatn
Stts
code. Statue l
rgiber
Restt
|AC

Datapabe
(Ceu
Celeetien
Du
acbal ids sueh a
ALU ad
procesg peiation

to wmeony
Iustrutn
Data bui from

M
Addiess

DI

D2
MU

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

-- ARe PC
Instructien Fetce
TREMIAR
IR < M[PC] 2•
mbat excuive step

Contot wnit cep ement


varie
to
and ed eese cobee
eenates coubel opevato aceovding te

Vaunaole

ee.
ct

D2 PC MUXI
IR AR
LN oUr
N
OUT NL select Set
IN oUT IN

epcle
Coats ARte Ceutol wit geust coutrol
word seut
Coutol wrd signale
to aittunt colouta
Copot
byed

Hardwired Cotyo',
wnit
Bops decodens
witlh qatea, kip
iplemuted
etthen cirit
Advanctage proueo fasta .wode
Ca be optiui'ged to
Dizadvamtog wines
vaiieus cowpomeuta
tere
Rea

updotion

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Deggn Hardired Covctl wit


|(nstructo Ragy

DECODER
).....
Time
Coutro Plags

Co

Couts
2005
ate
ardwied
s to
tine steps to inp'ement
slheus blew
T3 Ty
I,S, Sgss SSuse Sio
S

IzS,s,Ss S
Sgio Sio

SSg Sio

Circit cote Sio

T
A. Ss tIT3 aud
+ (Tz+Iy) Is
Sio
(I t Ig).T4
=
Ss T; t (IztI4)- T3 aud
Sio ErtI3) Ty + (JztI)Ts

Syo = + i4y)
tIi+Tg).Ty+(E,t )
T, +Ig

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Coutrot wit
Mico pro giamnmed
mplemeted
is ae tored baed
words requiremt
possible coutrol
word Set to
|Advoutage
tee logic ie
coutel
|disadvantage
sewer wehcuiswbeause
word
a
stored.
ontrol mewory
Grterma Coctrol
Coutrol Covetro Cotrol
PNext AddresA
Data
qemerator Addre
(Sequencer) Regte Raglen

Next Addres Intoratin


tere rol wovd

Coutrot
wOYd
Net
ddres|
cuornatn
Mico- instiutien

Standad wiero trucen foret Coutol word


Siguas MUX Next
(Cotro l word) select addre

J 120 cendrol sigma, bit No


2 Micropv oqsoumed
Total we e
icro-intuti
Next
Seuct
.
3 16 wpts MUy Ne yt add lo bit

(2044t0 13L

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Hongeuanl Vercal
One bit eacl ceutto dividA ueto
a
teaat
at
Can be actve.
Eacu
eeoded
ceute word.
Swall coutro wod
ON decodes
Decoders
atter
ae wed.

sleer.
2002
Catu
Hori geutal icYo

(6) Results n decodeu


+ena vecti
bl tor each covtrol
aloore

Vertical Hardwised
Hongotal

A
Cotol wit geurate (20 cnitel e

iided uto as
belw!
Choup': 3o 5x32- Decoder
4xl6 becoder verical: 5t4+4 +
24S+ 6 -
26 bt
2. DeeodA No ed bsreg:
u

Ghep: 3 Decoder
32 Deecdn
35
6x64 Des Sad |20- 2
94 buts

Priyanshu (GATE 2024 AIRnid379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109


uoontl)
<br>

CPU Dego
(Reduced CISc (comaple
RIsC
Jnstuctitn Set
Tnstructuen Sed Cewpute)
Cowpey
More munber
Less mube ustructiens
wstheetene.
iustrutow Vaviable bg wstruten
ixed bwgth
(" vaiableopode)
Cowp lex wstuetieue
Sunple utructiee
linitd addesin modes
mode.
Hardwired cu Mienprogaued

Regut
asthmatie

More no Les

<Preterallo for
Ppplind' CPU

201?
Gate
proceOr degn
cdnascaclen istu
to reg u tthwm ehe eperatne nmy
Rguten
I
usthetion forat.
II: Axed cotrol wwit
wirecl
T: ard ceaactuiatics culooe

4)

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Byte vs word oddressable


emory
Addrealble wag

Iword

\o02 2 w0rd
2

addressalsle word addressasle


uthere word size : 32. bt

addreeealole Word
addnalole
Addres ot irst word
0

uwod 4
Adduen second Addae 2eud

2
Addres tird Addrey Brd word

Bupt Orderwg
data stored&

LSB
to MSB 4or trom
MSB t
4rom LSB

bytel
Y

orderiny deecd
Tis

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
trst
<br>

ane stored
MSB

are stored

2
lbte
word - Assume | word
Q- b lit addresaslo

Big Eduan Little tnda


Doolo|o)
io0|o)
boold0| too \lo)

&:-
Asme
4ACD534D
Endua tle Endan
[001||0I
|0|0o|)

o|0 |0

- ARCHITECTURE

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

COMPUTER ORGANIZAT IONN

To Orqamizatun
Devices cDMMecta PocexOr extervally.
Peipheal dsuice'
Devices
Hnput
pevicel Tlo Devices
bstorag Devices
tocouoinatien

CPU
Devices
electronie dem'ee
(handdilh)

tpd.
O convert

sped

e
Codes dota to wats.

Io Intertace
> DMA CotrolLer
bMA + inderfaue

IO Processor
+
Iuteet DMA T
it exeule

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

with cPU
to connect memhy

Buusee oY Botth
Separ ate

Address Bs
Disadyastage() Data Buus

Ceutot Bus.
(beoz More CPU:
buses ane
Addre Bus
Advawta Cetro Res

2) Cowwon Data, Address


Meoy rite

Akvadagt
yo woautagel
meor kbala

Devices

addse2es
Tfo Read
{o wrte
Isolated s0

2 Coe Bus
3) Cowwen Address, Data

A-b
See Locee
Deadvade CPU
he wed
tore addres
Coreltb
address
wawe
So, uat CPU a

Advantaye (3 addse mewy addreses aceen Lo derves


Io notun
do as froe those
feuein
.uown
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

TO Mapped IO
mapped Ijo
Memoy
No meoRy atae
Sepavat ad dhe Apaca
No separate address

accese aceen tttene


Al are. eceA
s e
trubu dthewt
More üsthuctie less nstrucan
Lo aeees
More add
ods modey
Le
Ho acA

Serial vs Paralel Trower


L bit ct a
wwttiple hit ot a bu
coiy
|DI
4bts
D

Sepa each deiee


al deices feratoch

loch

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Trawslur
Serial _Asynchroneue
aldaractu
Destinaho
Source
8 bits

Skep
bit
-
Stast
bit

O
No rau ter wmea | state.
O0 start it) dectd meane trausi csien statd
stat bit
charater (stop bit) i be seut
O
Ater kaut bit

ne
8
trauwwssiu

per secoud
B
bit dharatns cau bt trwsitted
Fe Ma
Uuk weg
OVer
sevial coLicatiem witlh
mode trauiiscitn
,o bit
8 data bli 2 step biti
I2 bt
reqgu'red.

thaugued sec
4600 Lctu ca be

No e4 chaa ctuns: 4600


12

ayeebids, seriall comicatuon


clhaactu
Ipazty bat stetSecbits
2

uoo clen |
lo
requircd
ate = 12 bit
|+2+| +2

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Modes dota traer


cotheled Io Dota
hoqrammec IO o teue
or Iutemupt Drive
> Interupt intiated Ifo Data tawet
Access (DMA)
Direct Memo blw Io 2

Foqsamamed
ONo proviuen toeug to CoU aheut dato

O Io seti eun sttus bit oud


w
t

each devie
Pogam periodicaly
e
d
cahs tee tatus e
t ay
device hau t statu st st taeu,
data tiaw
cPU pertom

me
equired un Pruqamned I0
Total Time t read Time taken y

tine statu ePU to cleck


statu tme
set or wot
dupuude
alwost
stabu kog-y speed

deice wtieh epeaates 20 MBRS Lpud Tae


progia codro leck
Aota wite.

Size
Tetal tiu needid pevform data tawe wicro seeonde ?

Totet jti wi'se

o2+10
byes
aw
necdedz
yte 22 boy
heeded
To
traute
rey
:.iwe
20X106
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
S
3s
<br>

LnterruptI
bap a provisen (Tntemupt gua)
LO deiceCemmmicaben
cloeut
wterrupti
Neceives üatrudton
of cUrent pyOLes
(epletes executien PSw ete) curet
sares statu | P,
staek
BrauAches to serviee tee utupt. eut ere vo staeh
proceje bg tlig
Resumes tae previ
et
CPU K lnterupt

ISR wtenit receives iuterrupt


Service Routine CPU exeudes
ISR = Inter upt
ISR.
Vector A
ddrert addres
(rfereme)

Interupt
Non- vectore)
Vectored interrupt
interrupt ( Scales)

Device Seu interupt and Device seud


vector. nterrupt
CpU exeutes dtat
Vector address ie seut
C

Service routie
upt iu anoedged CPU, lotaima Locten
actuual rsR.
vector.
to seud
y ued
Data bu coutrol ynal
Tutemupt

Nn Masalsle
|Mahable uterpt
ntemup| alwag accepte
or reject atenpt
CPU can accept
wterrupb

.
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Intessupt

Externa Dateal
wle
interrpk
o Devie geuerts tes Sterrupt de to wmexpected
eTTo Qutreton
uteipt.

Syaten cau

Time Regired Ivdept Io


Juterrupt
Servi ce
overtheod
time
ime

Simutaeoue Tvtmup
2 deuie geueate nteupt sinultaneuy
device's wtept siswd be serviced tnet

Baed gutept Haudg

Sagtue Soltin Hardae son

|Sertal LRana)
rioritt

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

VAD Vector Addressg


VADT
VAD 1 V
AD^
Dev Dev 2
Dev3
Pof Po Po

lglest
Tueml
CPu
INTA
Stonvaten posible

2005
Gate to a
ate la' tocPUikßsec is cenected
A
dovi trasle
witin daia
tiamstuied byt'ioe,ee t derfoce rego
Data
tiue bw te auice
S

nicYoscCennd trau
CPu wewiong ove
and
porgrwce gam wden utrupt ote
prdga
cotioed weo de
To ime
-perfov waamee. of iutesTupt taeTwt slo h'ue.
feformamee
peedp
for progawme d Ilo -
Statue =
Tme to Yead stats regittn

Data tauten
Total pregaed fo lew= loouy

vertheod
Total time

wsne,

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

2 micrDsecec fo wtes-pt vehend


Cesid
a cpU urfich tlee
geenates wtsupt CPU, d

uter a
deice to ieviee ee
does
A 2MHz
sevie meicsDse.
2x L65
Clok rat 2MHz
4
2x Io6 45
=

Tutpt veead
.
total tumu
=

2+ 4:5: 6.5 us

DIRECT MEMORY AceESs (DMA)


Enalbles data
wthet wcterentien
Need hrdare DMAC
(DMA Cotolle)

CU Seit
data Ct
addres

Bus Dala cewt DMA


HoLD
sgal St

D MAG
DMA

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

addhes tantgo where


stanbi mem be started
addrex dada (tramt
bytes word to be traued.
Data No

Cout dopeuls
p
dde.
word
addeule

tuose aperatione
DMA trauy, CPU ca
la

wtiieh do uot astby bloched


bmeame CPU wwL be

s saved boz
bine
a wo weed to store t u a
tae
thene
preseut state ef coU in
stac

20f6 6 &aits
GteThe a DMA to
size c4 data couut hegstes from dile
pcenoY needi to gct
Ie catroller needi to
DMA
malo
o ner
tie
1he imim

traw emed
byt. taot cau
be
no o
Max
coutroles s
DMA
coutho
hat

be ded 24154
No
meedLed
2l6

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Modes ed DMA Transk


Entire data iu wot
taulued at euee trom Ho to memog
ere
DMAC as eontyo bue
O Foy semeti
gves &
bach to o DMAC

Burst Mode Wperwe


gee steating miode Seretrrey
wode.
Tderleading

|BURST MODE

burst data (B- 2ut tausgued ee t oefoYe CPU

talees back buiee

CYCLE STEA LING Mo DE


tales seme time to prepare word
device

CPU
to DMAC
u
traueed to meg

INTE RLEA VING MODE

CPU
w
nere watt wwode

CPU utenal eperabont and dou teue

wheewel
louses DMAC uill
loe giren cotho
e
tu bues.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

CPU bloched

to prepare feo dto


Time aegined tee dot
to tra
ime negured

CPU
tie Burt mod
blocded dueo tt ty
DMA

Cyele sealip de.


bloce d

dupend
tn OY

Ques
speed
Code
a davice eperatin

bloclieA

be
e data is to
l6 bytes to
tine tale

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
bloceed
<br>

tene dota wth 4o þs speed o


A device is
covulauly toaufg
Assune tht tee memort
DMA.
tone data (4 bytes)
Lpu bloched
tine
bloched

Data sizes
4
t S
Io4 loog
to4s
loeed burt wod:
lo

4.017
tui
wode :
t

202L
Cate
Couider a MA
snppest cowputs yst wittn bMA support
The DMA wodu ene B

bt cearacer ue e

rom a device to skeolig at


cyele
ugla tuterval
Hue dato tzunucte the
Second.
daxice is

crotey
per kecond
2 MHZ procexor 2x|06 yda
DMA
LOo DMA Per seeond

data
data

Data 80000 laitssec


Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
Memory Orqani3ation
<br>

Speed. Sze

Mo

aecess <pead.
maxim'ze cort geandon
To minimiye per lait stag HDD

Ter tiary
Freg of tpe
acces

|Memony
Represetation
= No
e cells X
Eael cell 8bi

lwcalt locatiem

= Bits ot qutun)

adásese ta ud 6
biti
u
ata bLs.
Couside a
PU wtth (3 bit $6
suppartec
size wticlh caw loe
Macium meo

accenel
addheR. to be
32bt twidi wAo
Mayeiwm
Locatien = 32 bit
Size e4
Loaties 22?
=
32. bits
Maxiwunm wemoy capacd :2X

perfor rendl write


tue req to L ocatu
Bperation

200 miec
a
wick
hat uiti addenosle
data i acceed
Motc:
200
5%|0yelsee
Role 20D

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

206
yate proesor ca spport weo
word addieuadole ( 2
bye word) e
size
e
addes
s at Ceast bels

locatun
Total meg Sizes 4Be 4
4ntu o
2x
us
No bit addhes

Moin mwOn
wsed to store cweuty hwuing pregims au teei dota
RAM Raude Acces Memony (vetatile)
RoM Read udy MeoyCw-vo latite)
rosT ( Power eu sey teit) htares cowuetd bo cou
Booting oadi 4 os)

Pco'srap progious ire gan repbuaitle for boetig

Rom accened ubt wt pewe


hee aceen ed wtl wet st.
0S Kom

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

RAM

Static Capacitors.
Mode: eup {eps
Soage

e
O Periodi e refreta required
O
No refrera

wwed for main


wewng
cache
eperatieual poue
Hige Powen Conmpteon

e biplicatin.
ue The aweunt
pom needed to store
teae tlole

wusigud cutegn .

4 bit product 4+4 8 biti


a) 64 lota No- bits
b) 28 bit
produet
k lbits
1
Size Rom =
!.
2K bte

talble of
wuttiplicin
Ques to store ttu
sed SZe

8 lbit
a) J56 Y l6 =
locta
Sze ef eacl cel 8+8= 6
b) 64K X8

prduct

Sze f om: 2l X I6

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Decoder hegyne to aecess


x 16 bits
17X 17
2. esdes

|28 K

RAM chip

Q
bit addeu
8 bils
clap elet veauied 4+8+ l+l+)
Read
20

dcs RD oþeratiom
X
No operoton
No eperalen
Wite
eren it WR
Read
botth RD 2
ne

faler

SI2x8 8
bts 8+4+)
ip sele ct
rnged

CS oferatuon
No epexateo
late ead
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

o p
Rom caip Hou
5 volt
opeater ro pocage? a

meeded
2
Cometn
req uied
addres uwe
=
pius
No. pouer - |bt
data bit
selet 4 ound -|

33

20t4 DRAM uip


Gat fo a cetain
TAe clip slee Iogie Als to Ao.
lines euotd by
t6 addes
linat

As
A4
A13

Ac

to CAFF
(B),CA00
c300 to CFFE to
(D) DA bo
() C8o0 to C8FF

to

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Mutple Cps i
Singe Sstn
Total

Hori ngovtal Arawgaut


Vertieal Avrangemet
No of
data hnes reqied Cne
wsed when me
addesses egied
s
thau mividal CPU geerts 7
bt addhes.
b4x8 bit
clipl RAM

Total Total capaty : 129x16 lkut


(28x8 bit

1 bit addreu bit

|1 bit 6
bit

LDecader
6lbit 8data
Data wi

wed

6
ore h

bt
add

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Ques be RAM Aips


128x3
2
No o cluips regned

bt addres
Xlb
256

pe
kybrid chipo chip2.
Anangamt
Buds

chipl clips

2o0g
Gat eded to
32K x| RAM ps provid
y capacty 2s3 kBytis
B) 3 2 No e RAM QS6Kx8 bta
(D) (29 dips
rgired

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Gateo3 a capaly
(024
A RAM cinip has wth enale
o! 2x44 dicoden
Te 1une
Côwstuct
eguired l6Kx 16
o RAM ips 32cbip
LKK8
Decoder veguired X22 Decoder

dcoder z decoder
Available

8deuodex

No

Po
DRAM Rethevbu
ereshed becaue t
DRAM
made
neRd
up
ko
peroe
be
t capaetars
caly store dot Hnee
electi
vereh operaben
DOD...1 et

Total
true Time taeu
eguired
tor refrese

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Time veguire

YouS
A DRAM ceiip e 512KX8 bts has lk tue
DRA M takes 20ns
9 micro seLonds.
DRAM

YOws chp DRAM

Time tor I redresh : 0ns


=
tiue

Reyest joriod be eart eie


w
wtich tHe DRAM ip ed
Tinne perioct

A 32 bit cude
Weg aS6M X 4
.
bit RAM
Tinee
The
clips

rdresn
awailaole
talen to
heuad 2wil seconds.
tee
bene
T peiakeons
veod/ oite

No x 5b ns
-0./8| 420o
one
Total redresh
Retve peiod:
H18 =
O 54 X ID

100D
for soling
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
ARR
<br>

men
Asso ciatie
coteu addreysallo
Cellu do not addesse

call
st pact is ue addeu.
agait t pat and ttaat matchu,
2ud paut tte l iu Sent.

The sennelg talle plaee parallely all te


cell.
Associatiwe
wet (taster
epeuiYe.

wed to npleuneut
TLB( Traslaton leotAhead Btt)

Sues
Tae mesy y
te a
mewy is 5b0see The maxinem
wic
addalses
Memory qe ù
- to read wyte operatitn
tie
mewo

loe osldrn

Sooxi69

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

valuu A Wina
Couide tuw 6
bts

A
auud
B
I6 +|= 19 bita
J. Addatr I6+l6 32 bts
2
32
2
Size additien talole
Size 84 wultpcaton tolole 32: sx32 bts

Qucs M
iü deined

nis needol
doto
imee needed
e addaens
No

wne 32
data

Ceden Size
acces tne cel

=
No addres inee : to4,
needed

RAM memory device retain dota


Statie
i sppiied pewer

Statewet2: Sttie fAm


X

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ues ane needed proide a

Heus mo RAn
64K x I6 bda Aud
4
Copactg
No e4 RAn

luylond
Bx2

Lows of ces
Cels in
total rresl ti
20ny

Tötal Tme to DRAM 20s 256


5-12S

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

docatcyReferenee
D (39

ene adess memo acces ) tee terot


has 44eqestd Se
It CPU
particular addess weaxbe tuill

looaldy addre Sa locate agan agn


porial
Teupo u seme
4uene bed
(

addeMes Locotn
Spatiat Jacayo ( loared on spaee)

Caee
Maiw
CPU

Cache Hit|
CpUs deaded oiteta preeeut cacee

Coche Miss
wot þreaewt
CPU's doaded cetet
=
Cache Hit Ratio 4) nenmort efone
Totl
Miss Rotio
to wa
neuo aceeS es
tee equied
miss, PU
centut and 4ere
wmenny.
meoyto Cacle
Centd) do eace

Avexag
Aceess
Memoy aceess
ti me or *- H)
Hey
tor eaca
ace
t
each
Time

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ypes ot
Cache Accese

ma at Hae

set o
beth cache aund
Siga is
w addrese.
Same

Seanc chd

Cac miss tIal

t wis,
CPU
tiwtaln SDns

H * t em t - H)
tmM

Hier arcil accer


Searh
Cache mics

+ (-ten t tu)
H*m +
tem t tmm

(l-) tuM.

acees tte
.
H > Cac wt
rat
Cacl mem accer

man meony aceeK

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
gwen epic
<br>

a ot

my aceen t
*

t * ocee
H

tt
(l-H)

else
word menttod
H) tmm
ten t

H* tum t(|-H)tmm

Cahe
look up tine

Aeluded.
whe

Slmutaee H* tem t(-H) tgsc

Hierarehial tem
t (I-H) t,Blo ck t ten)

ired to Blocd
teio ime regir
lbloch ize * tmw.
acces

Blode Traw ucludd

=
H* tem t -H) (tgoc t tem)
SimultaneeuS

Hiey aredial temt-H)tecket tem t tui)

Not
me acce
accested
Cace mmo

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ue Leguest tabee
5 n

a
a
cetin proceor Aead
wit.
Cace and (0ny
Suppose blosered, Eat aof
poeeno's ead hegests
a
cache
%eod acce nauosecond

Twg + -H) * Teac

l4ns

Su a 2
unel hierarey, teha tep level aceev tu
u

30n tie betom uvel Ccc


t top el equired t
it
e
bune 5ny
Top leel
*
tat l-H) ttmm loses t
to cpu

fort

tem: 3ons
H
tt (l-H) Lum

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Cache wtite
vale
w

cache
update tee etet
|Cache wnet ro blew| ' CPU
updad
Cevtet
n
ma wemt
tu oignat
Aluo uoun write propagatim

White Thvougl
Panalel update cevctet
u
both caclhe
Hhe CPU

Simutames wite operatien


aly
Adv [eache will hawe Sane vale
Data

Disadt
þ Time couuunming Po write
or
4 it
Hwerareuial
Simeltae
+ (l-H) timn H* tem t (-H)(temt tma
Read H*tem
wmaxl tem, tm)

Read t raleon
read wnte

tererg cale itin accet tue loo d

write access te
wa meO read.
Nati
= q0+50 juo
H)tMm b% l00 + olx S00
H tout
max( tCM, tu) 500
0.1% lot o3X 500 48t |5: 242n
ratio
Let H, be etectue i=
lo0+ (1-H)*
5D0 d
H* H= ug
l00H 4SD-
) 2023
DD 400 63
Priyanshu (GATE 2024 AIR 379, GATE AIR 384) @ https://x.com/Priyanshu__2109
<br>

CPU up dates polatedd

White Back
ro cac
hen o block u
to be
heoned ia
t
upaatin is doe te bock,

Adv
ime sowing

Dis adv
Data

Rend or (unte * H*temn +


[swtamou
H
tum +
(l-H) (tmm t tem t twnte
b)

Wite Alocatu
2 o
wNNte AUocate

FoY read eporatn wissed


a
cache i wa wewo

Cacle

foy wrte operoben

ite alocobe
write tss, ied
Cacle

o
write all cat
Eor
euittout col.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

pentor
FoY bette o alLeeoete cortte aloat
wnte aloale
wte bach

Cache Maping
addre
addhe% to tte ww meo y
adldsens

> Direct Mappu


set Associatie
Asowatiie

Cáche meorY locle Maw nme


Moer alo ce uloer
mew prescut
weiel lblock
t a
gieutu
mewo bloce wumer
|Maw
me
Cacu
boc unier

cache
bostr

(ache
CouholleY

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Blocle wulber BLocde oteet


Main meory addren :

Block
wed to tel
it a
wwc r
ut.
deutiy wtelu hit iss

Suer
Blocie size
Size e! Caclhe ewoy 64kE
wau addw 324e

tu cace Woce wluwloer

S) Bitr i =
32 -(4+12) l6 bits

metda

Ceusidn a
duiect woned ca ot
se
32 its addreei Tu wuwloer
Gddre are ?

Size cache : 128kb


32
232
128 ke

No

No bifs

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

bt

Cac Tnitaluzalen
, gabage valu preent cacu
Wen cemputen vetade
it
Posseble that geueatd tag mate
acceed
So
wtra bit CallL valid |iuvalid bit ú
preut
To swe teis þotse,
bloce.
witth each
memm
Cache
O iuvaud

Wn cPU stat
to a
iet too

White Back Caicamforbe waee


wprore y Leeep trale ot eacu
Perfosmamee not
updatd oY
Cache
ie cacle Called
e ore preed for eah boc
So,
bt
kodtd Dirty bt
read

+ Entra
Direcurg

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

multipu blocls,
moppe wiite bacle ache
ues addmy Tle caehe
A T6 kB diret Tlhe procexor eae blo ompn
32 bytes. Jor cacle
Cevctotlen jaiutaui fee
heeded to
1uiinn
Vali 'bt
bidt. cache
te
total s'ze
needed tu cac onteu to

tore ueta
(6kB

aeaalala.
Size
t
cae 32 B
-
metadata
Size
3o
Moe! bloces 25
2
9kbite

lavq tor wnte back cache

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

woin
Qdduess alsle
eneider Maelee with
and diret wuotpec
2

ines.
addeMy of 2 cenuetive
Let te
EtE2o20), hat 4ee cahe cd
(t201e 6201F),
or
e
addes lin hex)
=
Line size 6 bies
Block Size = 16

No Cache lnes 20 bt

addre Tag BLoce


mlo bloh ofret

Tag bots
Cache te
E201f
ofset
Line uber
(201 ) (F)

20)
Ltt, (B) F, 20)
(O E, E
20 D) 2
olf

Ques The men


wclh 32 byt blods
Ceiidn a 322b Cathe
mewor oddes Ox67A BIE w
tag,
The
mai
bioc ral
bytes
Size o cace : 32kB Mo
blo ch 32 bytes
blo cee
bloces
=
32-- (10+S) I7

=
Ox 67AB1E
blouo
(5*),
(oc)k
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

CAclhe Pre
witth Diree Mafp posten
Iob'e hare ted
b
is

Set Associatiro mafpu


blocs at an indlex.
O Mutap le at
set aoCatie Cacle
Asoc btintt
cet.
indiesl e
z
Mo
of kscouiatity

eoy addea.
CM- set blocty
Teg

bit i& preseut

Laits Lepned witta tag


eace blocen
s
4
wte, t a Cit, t n
200

uidau to et wociot

Man adden

Bod

widt waclui is Lolcty TLae

St efet tb
2

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
mappeing
<br>

Direct
Hardwae implemeuctatien
Noe coupanatos Hit Lademy Time
ize ef cowpator
No
comperakr
No
No ef Llocles x 1. sele ctien
Sze

Hardwaue wupwtaten
k
Cemp ar cton equired
No
bite Hit laewy tm
Size

No k* Noe tag nts dela

walkp lexes :
k-input bR

wpeeutatien ot
Hardwue cache
cowpatos regured
lbite
Size ed
epator
oR

Cache Mis Penaity


to cacle
uissed bocle
Time Ruqpuied to

vel coc
The cae bo ce size
procexor eye a
A
cetaiw to eceept.
Size coutslen
To

rea perab
rene

Bloce Size
8x4 32 bys
rat 6oMHz
Clocl

B word Byes 32
S
total Btl+3 32
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
160xoauto
<br>

wisS Wwss

Prst tn acce

Hapaty
Seuben to redce
inerease te size, e cache.
H
3)ouet Wiss
ika wot a
ced opacy Wss but duw to the set u
tullL

and OcLrs•
Sention to
redue Ducreale askOtvity

Lxauple

2 wey st acocoie clu

blocs 0,4,0 8,0,4, 3,1,5, ), 3


3L
ws
hit
Wwss

Coneept

Cacere

L. Minime Acces Tme wuttilenl


Rocte
Maxinyo

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Mutilevel cau Siuetaune aceen

L2. Main
tac Cache mewen

Hieyarcual accex
tmm.
Açcels
t t
e
laug H, *
t+
Hit
tatto

Poiit
Inciusin Buols
e
clo
prey eut
HErcusin Bocus LI need wwt be i L2boc in wored trou L2 tou

as
hueun victm cale.

ha
witle
a
wite baca aclh Te cachi
acces
maiw wmmort a Cce
cache te Tue Cocee
lolocu Size Calenate

ns
(200s
R5 tum 300

=
ntebace
+
tuorite dsae
H* tcM t
( es+120 + 240)
.9
* S
1-o)
yo)
25+ (20t

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

LI.

Moqucie Disk
Seek Time Rat atoual t Thamie
Disk Access Rme
z
cateet Tme

Time reguined T
to poteep readl to poccen read
wnt head & a

he,yottuen a
pautiwla trach pcutiela sector ratersetur.
ron
data

die sawus (oil lbe wentiod


Irotaten time
1T
Intasu t'w
RL 2
per fra

ee read- wit weod cau wot

osidn a
ded with l6 patt , 2 utaces pe
platha, k Arnci per sutface,
lk iectoM Pr hack aud
3000 pm

3) bise accen te

3o00 otnm Cose

20wy.
300D

lo ws

l6x 2 x Z
xx 20 4P 36

ad .2flels

204-0-2
20-02 ws

L
seutor datr 2048y

X
2
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
02
<br>

Addrexng done
Sutae
track wise
wise
$ectuys
ltroade uae.

Addrem Le, h,5>

No e4 ecoM per ycut


Sector wo

sectox per track Disl otle with 6000 >pm icce tue
Cosidu
a
dse witth
2k
Calculati dinle
accera iu
6000otatbw 6os Rotateyal
Seek bu 20s
Jrotaluo 60:
Bo00

D'005 m
200
Dis k acees tu : 25-005s
Sws t oo0S
-
20t

Vaualole sector copacaly


Constat Lineat Veloy Rctor
wgua veloy cowtat capaty
Coutaut

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Flynn's classification o Computer


Data Stheam
srea
sISD Single Iustruction reau
Pthelin Singee Lutruckon stean tpu Data
+SMD Single Dada stea (toretul)
MISD Mutiple Iweton ttrea utp le Dals Sreau
Mutple MIMD Muttipu Tututen strea

RiPELINING
uttipu mpute.
pyocess udo ubeper ationg
Rrpeing
Sq sibeperatiens
e

Time
al pertonw apecte
Miiww te iw wtieh Ca

suboperatn

qeueaal Conai denclien


a
Cewiie
cy e t
wlitlh clock

=
Time reguwned to jento st tback k* tp
Time requird to perfo euaining
toy a n
tasbs (ktn-) t
Total ti regeed

a tul

Sheedup (s): apipewta


Pevfma
ntn

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

fiw rejuired to perfm 1


taul 'u
tu
tp tf p
ters

hayad
peluue
lutrctum from beg ereeuld
tee next
Situatie tuat frout
dode

stuctual Hagard|
Resource Coyet
Data
Data Depuadt
Hoyard| Brauch
Coucl

|Structeral Hayand resorce at


to we Sa

)Iueur stall reyousLes.


Solutn
Iucreae wnler ef

Dele Kagord | bepeudeu


to tee ext
Rewlt DA ex
bepeut DA

not deteet data tete


wwtetion pel
d-peutet aftu
e
proi ded sold be
WB
[e sectien
copile"
Setwar
Delaged Load

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Ca detet and doda


used
Hardwa seetie

Hardw
e
uterloek
stalle w Caue Ata
oF wb
DA
DA

Jtal

Sferaund orarding
s
The reutt genated a lay ita utsucin thautened to E

DA X RIe2+23
DA EX
IF
no staleperaudcaube
exauple value ot
fonwarding epuotm val No
stali tor

wed
n li
ALU ifuelu Ru ao
acewulatr
because
botht
DA wB

caot

CONTROL HAZARD BRANCH DEPENDENCY

for loranc wituctn ,tee PU ha to


wt tl braucln otcme
availlole

canet ddtact brauch depedt


provider reutn Deloyd braucl
inerts operatn ustrucly helo Brauh betr.

IF DA

of
DA wB
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 DA
<br>

Hardare seuton
Brach Bre diten
Predicts tdn tee ret Loraw
cone poblen.
u wat corred Rell back to eoneet branel
4 predicten intthucton 2 eeec toy

ClaifeauPn Data Razard | Depudny J reads bebre witeu


y D.

Tsue
dependut RAW ( Read tttu loite)
RI< R2+ R3 writes in destwotim lbefore|
WAw nte Atn lort)
WAR (wstte Mlu Read)
Wwey iro

false
depedg
Seutiem Regartn Renauin
R{k- R 2+ R3

(wAR)
(wan

CPI yclea Per Dwtructio)


needed to execte
lo
because a hajands, total
for Fupolid
ktn-)
4 extral itat) yc

Su ideal care,
cae
Ju ideal

wit hazar d
,
e

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ipe ining Hazards


dutf segmeuts. ivur s tel
0
Structural Hazards 9 sawe Yesource
required p
nereose o

RAw lRead att True depeundeuy


Data Hazards wnt)
WAW
falie aepedg
W
ARo
Sll amt
foiwardinq:

astati'c
lpoi predict braelh
(8) Codyol
Control Hazard history
( breu
taley

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Amdahl's lau idnpoM


Used calulat peedup
1

Speedup Pant
Paa
pat unbe et pro uSSOYS

(rodu)

Pnog ram Statu oYd 2397ko

Word (Psw) a cellectien t data teat


Statu
8bit
Progmm
maintans
track at yetes
eperatiang
et state 223riA

Four asy an cald cencitiona Ras

bAC (Auxi liany Cay)


(0verpleu)
ve
Aelctin lait
RSO RSL
(LsE)
7

RSO OV P
AC RSI

auk Dvertow
cay Regut
statu Hagi2

PSW
mused
3cantrol
Hags
ed
6 statu hags incdudes

Cantol Pg
12-5,
,
3,S - umuied
DF birecte Fag

AF
3a bit

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Syskem uppo stng vasuiable length ofpuodetiN Jortno)


wutructon : m 2 address inthuchus
2 address addl adde supportcd

| address
1 addres instu ctwns: add
spported

Max :2-m). 2

address iu -
No -ef uu ed addres inihmlu
Cebinatiee 2

IEEE -754 Foatg Poit Repreuutotion


sign bit (s)

8 exponent
32 bits (E)
= |27 RSing Precisiev
Bjas
E-27
1-M* 2 23 mat issa lM)

Douole Arecisien 64 bits


Bias : |023 1 || bit exponst
S2 bit Mautsa(M)
Fos deoYmaized

M Number
+0
O00.-..0
O00---0

Mz0 Not a uer


||--0

000 Mo
Denormlned o
au be
Impit Nomaliyatn
EI.-|
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 (owal o)
<br>

Control unitg t
Jemerates contol word
by cU at
un
Colletton gals genetd
eu
Handuired MiCho pqramed |
Couto wwit
|Control Unit

aey
to reaage|
chamge eay

IR
Honigendal
DeLsder Vestial
Minpograwwng

Time -T ardwired Osiqnals divi ded ito


qeuer
CotyolL such tluat exeuy coutol
ator y
Uiit at t,
a
be
Cau
active
woYd
mtl wd
O

Smalu cotl
Contol
O Sower O Farten
wot used.
Decode wed O decoders

Hovizemal
Vertical
Miopog rawwed
Micoprogramuud < Hardired
CU

fasleb

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

RISC CiSC
less no ed
iutuctio O
Mre o

9boM
O
Fixed length i vauiasle leugh
(vanicldle opuodu)
(fned opLoda) olo

O Less addressing More addressi g wadeu


wode
Hardwired CU

Lctle euda
vegite byteo
operaten peratuon alio peat

Preenabte tor
Ppelinad

Mapped Io Iso lated IO


IO Mem. Read
Mew wile
CommOn data bu
AaAres bhus

nd addreu bul Memory

diferent contol bus CPU

eontrol sga t/o Read


T[o wne

Go watage of
meworyA ovw3M 59ri

Mevnony IO
Mapped

CoMmOn addyes bs,


databus, coutl Mewong
bu. CPU

Some addreeses

mennon

bu
u 2 sidad
<
Data

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Modes IO Transfer

To
tal Time to read Tìme to check Data
Time Statu t/o Stati trawt
deice is set or wot tie.

2. Tnterrupt
address Locatbion Suterupt
Vector address
Routine.
Service
|Maskalble Vectored (Device sendi temnpt
VectoY address
Iutenupt cau be Interupt} G dat bu att
accepd tjeckd
Non vectored (Device Seud!
Non Mslkalole ivderrpt
CPU alway has
(Scalenoe
to ccept te ( Defautt seun'e out
elotan
wtnupt addneu).
vector

Time Required or Intemupt


Overhead + JSerice
temup't o tie
timeho

Mewmory Access
3 Direct
Data Lount
Memo

mewwny addeH
bata naufea Stutg
)sed dat devie addres Ya to be
Count estufty dado
addres trautem.
Bus Reg. O DMA
HoLD Sig nal Requst
bus Qiamt DMA
Time saed tis
oabala not
HLDA Sig CPU ds
nal method.
preseut
ashawe to sfore H

to implement
DMA
Staca.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Time taleeu to prepae wa Coill be given in


tee data o
ty qehn

to trauteu mamony Pdepnds upm


Time te data do

cleck treql
ye time
Tp ot Tinme CPU bloceed
QATE
2022
Bust wode
tet ty
2 t

3- Interleaving

to store. fable
Size et RoM required n
bit
n.bit A talble = "* 2m
uttiplication
Size e
addition table.
Size

Static
feip ops
no retresh
RAM
(Random Access qs faster
expemsive
Meuoy) coWiupton,
Dyuami,
b data u
stored in fonm of ectrocge
H pesiodic refesh.
coweY
H lew expemsive
H
lowpower cumplion

rfretuoper otor entire row


Timo to refrese Time to vefrest caip
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Refre su Readwrite Totl


refrere
perod time tie

ivglomd
A
sso
ciatie meo to
Acide Butte)
TLB Transtation Look

stores
frequety wed pages
TLB Hit
Page iu retreived tom TLB

TLB MisS
ii vetreived from poge

2TMm
3Jd Time
T
at TintTMM Tet
COz page tulole is

Tawg H* TLA + (-H)(TLa t 2Tn)

Cache white
(SimuttavenA updation
Thsuouga
Wnit MiM.
to
(cache block tran fered
Wit Bach.
replaced)

mWss
wWwsed blwd heuld
wite cache vAeoy
Wite allo cat be
to
.M-M.

deve
wnite

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Ca.che Mappig
Mapping decide i it u a cac
Diret
ut

Tag Bock Bwck


Nuwer Dset
Cache
buoce
eo
wber
Maim mwony
cache me

Set Associ cte Mappig

Tag Set Boch


offset

Cace wwn Main mewo y

Caclie wenony
Set

Assoiatiwe mappiy
sel Stmilan to aeioiattine

Tag

met adata Extra Uneg


Size +
bits lbits
Tag diectony Sze

Type! ot cache Wiss.


Cowmpusory miss
) cold|
nereae
Seu
niss
Selh tnerese

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109

You might also like