You are on page 1of 13

61.

di
ff
erent
iat
ebet
weenexoker
nelandv
irt
ualmachi
nesst
ruct
ures

62.di
ff
erent
iat
ebet
weenmonol
it
hicsy
stem andl
ayer
edOSst
ruct
ures
63.br
ief
lycompar
eMOSDOS,
Uni
x,Li
nusandMSwi
ndowsOSsi
nter
msoft
hei
rst
ruct
ures
MS-DOS(Micr
osoftDi
skOperat
ingSyst
em):MS-
DOSisasingl
e-user
,si
ngl
e-t
aski
ngoper
ati
ng
sy
stem.I
thasasimplefi
l
est
ructur
eandacommand-
li
nei
nterf
ace
UNIX:Uni
xisamul t
i-
user
,mult
i-
taski
ngoperat
ingsy
stem knownforit
shierar
chicalf
il
esy
stem
andmodulardesi
gn.I
thasakernelati
tscor
e,wit
huti
li
ti
esandli
brar
iesbuil
taroundit
.
LINUX:Li
nuxshar esmanyarchi
tectur
alpri
nci
pleswit
hUni
xsinceitwasdevel
opedasaUnix-
l
ikesyst
em.I thasamonoli
thickernelandsupport
samodularst
ruct
uref
ordevi
cedri
ver
sand
syst
em uti
l
iti
es.
Wi ndows OS:Wi ndows i
s a mul t
i-
user
,mult
it
asking oper
ati
ng sy
stem withalayer
ed
archit
ect
ure.Ithasaker
nelthati
nter
actswit
hhardwareandprovi
desserv
icest
ohi
gher
-l
evel
component s.
64.writ
eshortnoteont
hefoll
owingMSWi
ndowsOS:i
.PnPmanageri
i.Cachecont
rol
leri
ii
.
Objectmanageri
v.I/
Omanagerv.GDI
PlugandPl ay(PnP)manager:ThePnPmanageri sacomponentoftheWindowsoper ati
ng
system t
hatall
owsuser stoi
nst al
landconfi
gurenewhardwaredevi
ceswit
houthavingt o
manuallyinst
alldr
iver
sorconfigureIRQsett
ings.ThePnPmanagerworksbymaintaininga
databaseofallhardwaredev
icesinstal
ledonthesy st
em andt
hei
rassoci
ateddr
iver
s.

Cachecont r
oll
er:Thecachecont r
oll
eri
sacomponentoft heWindowsoperati
ngsystem t
hat
managest hesystem'scache.Thecacheisahigh-speedmemor ystoret
hatstor
esfrequent
ly
accesseddataandi nstr
ucti
ons.Thecachecontr
ollerisr
esponsibl
eformovingdat
aand
i
nstruct
ionsbetweent hecacheandthesystem'
smai nmemor y
.

Objectmanager :Theobj ectmanageri sacomponentoft heWi ndowsoperati


ngsy stem t
hat
managesal lobject
si nt
hesy stem.Anobj ectisasel f
-contai
nedentityt
hathasauni queident
ity
andasetofat tri
butes.Obj ectscanrepresentav ariet
yoft hi
ngs,suchasfil
es,processes,and
devices.Theobjectmanageri sresponsibl
ef orcreati
ng,destroyi
ng,andmanagingt he
rel
ationshi
psbet weenobj ects.Theobjectmanageral soprovi
desacommoni nterfacefor
accessingobjectsfrom differentpar
tsoft hesystem

Input/out
put(I/
O)manager :TheI/
Omanageri sacomponentoftheWi ndowsoperati
ngsyst
em
thatmanagesal li
nputandoutputoper
ati
ons.TheI/Omanageri
sr esponsi
blef
orprovidi
nga
unifi
edinter
faceforaccessi
ngallI
/Odevi
ces,regar
dlessoft
hei
rtypeormanufacturer
.

Gr
aphicsDevi
ceInterf
ace(GDI):TheGDIisacomponentoft heWi
ndowsoper
ati
ngsystem t
hat
pr
ovi
desagraphicsprogramminginter
faceforappl
i
cations.TheGDIal
l
owsappli
cat
ionsto
dr
awtext,
li
nes,shapes,andot
hergraphicsonthescreen.

65.Wi
ththeai
dofsket
ches,
showt
her
elat
ionshi
pbet
weenaf
il
e,amachi
ne,
adr
ive,
dir
ect
ory
andavol
ume

Fi
le
Afil
eisacol
l
ectionofdatast
oredonacomputer.I
tcanbeany
thi
ngfrom atextdocumentt
oa
vi
deogame.Fil
esareorgani
zedint
odi
rect
ori
es,whichar
eli
kefol
der
sony ourcomputer.

Machi
ne

Amachineisaphysi
cal
devicethatcanperf
ormtasks.Computer
sar
emachi
nes,
butsoar
e
ot
herdevi
cessuchascars,
refr
igerat
ors,
andwashingmachines.

Dr
ive

Adri
veisast
or agedevi
cethatcanstoref
il
es.Commonty
pesofdri
vesi
ncl
udehar
ddr
ives,
sol
i
d-st
atedr
ives,andopti
caldr
ivessuchasCD-ROMsandDVDs.

Di
rect
ory

Adi
rect
oryisalogicalst
ruct
urethator
ganizesfi
l
esintogroups.Di
rect
ori
escanbenest
ed
i
nsi
deotherdi
rectori
estocreat
eahi er
archi
calst
ruct
ure.

Vol
ume

Avolumeisalogi
cal
uni
tofstor
agespaceonadr
ive.Adr
ivecanbedi
vi
dedi
ntomul
ti
ple
vol
umes,eachwit
hit
sownfil
esyst
em.

Machine(Comput er)
└──Dr i
ve( StorageDev i
ce)
├──Vol ume
│ ├──Di rectory(Fol
der
)
│ │ └──Fi le
│ ├──Di rectory
│ │ └──Fi le
│ └──Fi l
e
└──Vol ume
├──Di rectory
│ └──Fi l
e
└──Fi l
e
66.Defi
net hef ol
lowingter
ms:i
.I/
Odr
iveri
i.Ker
neli
ii
.Har
dwar
eabst
ract
ionl
ayer
I
/Odri
ver:AnI
/Odri
v eri
sapieceofsoft
warethatal
lowsanoper
ati
ngsyst
em tocommunicat
e
wi
thahardwar
edevice.I
tprovi
desastandar
dinter
facefort
heoper
ati
ngsyst
em touse,
r
egar
dlessoft
hespecifi
cdetai
lsoft
hehardwaredevice.

Kernel:Thekernelisthecent
ralcor
eofanoper
ati
ngsyst
em.Iti
sresponsi
blef
ormanagi
ngt
he
system'sresources,suchastheCPU,memory,
andst
orage.

Hardwareabst
ract
ionlayer(
HAL):Ahardwareabstr
actionl
ayer(HAL)isasoftwar
elay
erthat
pr
ov i
desaunif
orminter
facetotheunder
lyi
nghardware.Thi
sall
owsappl i
cat
ionstobewri
tten
wi
thouthavi
ngtoworryaboutthespeci
fi
cdetai
lsofthehardwareplat
form.
67.Whatar
ethekeyi
ngr
edi
ent
sofanoper
ati
ngsy
stem?

Thekeyi
ngr
edi
ent
sofanoper
ati
ngsy
stem (
OS)ar
e:

 Ker
nel
:Theker
nel
ist
hecor
ecomponentofanOS.I
tisr
esponsi
blef
ormanagi
ngt
he
hardwar
eandr
esour
cesoft
hecomput
er,
andpr
ovi
dingapl
atf
ormf
orappl
i
cat
ionst
o
runon.

 Pr
ocessmanagement
:TheOSmanagest
heexecut
ionofpr
ocesses,
whi
char
e
programsinexecut
ion.Thi
sincludestaskssuchasschedul
i
ngpr
ocesses,
all
ocat
ing
resourcest
othem,andhandlingprocessterminat
ion.

 Memor
ymanagement
:TheOSmanagest
hecomput
er'
smai
nmemor
y,al
l
ocat
ingi
tto
pr
ocessesandensur
ingt
hatt
heydonoti
nter
fer
ewi
theachot
her
.

 Fi
lemanagement
:TheOSpr
ovi
desawayf
orappl
i
cat
ionst
ost
oreandr
etr
iev
edat
aon
secondar
yst
oragedev
ices,
suchashar
ddr
ivesandsol
i
dst
atedr
ives.

 I
nput
/out
put(
I/O)dev
icemanagement
:TheOSmanagest
hecomput
er'
sI/
Odev
ices,
suchasthekeyboar
d,mouse,anddisplay
.Thisincl
udest
askssuchashandl
i
ng
i
nter
rupt
sfrom devi
cesandqueuingrequest
sf orI/
Ooper
ati
ons.

 Net
wor
king:TheOSpr
ovi
dessuppor
tfornet
wor
king,
all
owi
ngt
hecomput
ert
o
communi
cat
ewi
thot
hercomput
ersov
eranet
wor
k.

 Secur
it
y:TheOSpr
ovi
dessecur
it
yfeat
urest
opr
otectt
hecomput
erf
rom unaut
hor
ized
accessandmal
i
cioussof
twar
e.

68.whati
stheusef
ulnessofsy
stem cal
ls

Syst
em cal
lsareessenti
alfort
heinter
acti
onbetweenuser-
levelappli
cat
ionsandt heoper
ati
ng
sy
stem ker
nel.Theyprovi
deawayf oruserprogr
amstorequestser v
icesfrom t
heoperati
ng
sy
stem,suchasper f
ormingI/Ooperat
ions,managi
ngprocesses,accessi
nghar dwaredevi
ces,
et
c.

I
tsusef
ulnessi
ncl
ude:
Abstract
ionofhar
dwar
eresour
ces,
processmanagement
,fi
l
eandI
/O
oper
ati
ons,memorymanagement,communi
cati
onbet
weenprocesses

69.Whati
sthedi
ff
erencebet
weenpr
imar
yandsecondar
yst
orage
Pr
imar
ySt
orage Secondar
ySt
orage

Al
soknownasmai
nmemor
yor Al
soknownasext
ernal
memor
yorauxi
l
iar
y
i
nter
nal
memory memory

Exampl
es:RAM,
ROM,cache Exampl
es:
har ddiskdriv
e(HDD),soli
dstat
e
memory,PROM,
EPROM,regi
ster
s dri
ve(
SSD),opti
caldisc,magnet
ictape,
USB
f
lashdr
ive

St
oresdat
atempor
ari
l
y St
oresdat
aper
manent
ly

Di
rect
lyaccessi
blebyt
heCPU Notdi
rect
lyaccessi
blebyt
heCPU

Vol
ati
le(l
osesdat
aincaseofa Non-
v ol
ati
l
e(dat
aisst
oredev
endur
ingapower
poweroutage) f
ail
ure)

Cost
ly Lesscost
ly

Madeupofmagnet
icandopt
ical
stor
age
Madeupofsemi
conduct
orchi
ps
dev
ices

70.expl
ainthefol
lowingter
ms:i.mul
ti
progr
ammi
ngi
i.mul
ti
taski
ngi
ii
.mul
ti
processi
ngi
v.
concurr
encyv.paral
lelpr
ocessi
ng

Multi
programmingistheabil
it
yofanoper
ati
ngsyst
em t
oexecut
emulti
plepr
ograms
concurr
ently
.Thi
sisachievedbykeepi
ngmul
tipl
epr
ogr
amsinmai nmemoryandswi
tchi
ng
betweenthem fr
equentl
y.

Mult
itaski
ngisof t
enusedint
erchangeablywi
thmult
ipr
ogr
amming,buti
thasamorespeci
fic
meaning.Multi
taski
ngistheabil
i
tyofanoperati
ngsyst
em t
ogi
vetheuserthei
l
lusi
onthat
mul
tipleprogr
amsar erunni
ngsimultaneousl
y.

Multi
processi
ngist
heabi
li
tyofacomputersy
stem t
ousemulti
pleCPUst
oexecuteprogr
ams
concurr
entl
y.Thi
scansi
gni
ficant
lyi
mpr
ovetheperf
ormanceofprogr
amsthatcanbe
paral
lel
i
zed.

Concurrencyistheexecut
ionofmulti
pletaskssimult
aneously.Howev
er,concur
rencydoesnot
necessari
lymeant hatmult
ipl
etasksarer
unningatthesamet i
me.Forexample,t
wot askscan
beconcurrentift
heyarerunni
ngondi f
fer
entthreadsorprocesses.

Par
all
elprocessi
ngistheexecut
ionofmult
ipl
etaskssimul
taneouslyonmul
tipl
eprocessor
s.
Par
all
elprocessi
ngcansigni
fi
cantl
yimpr
ovetheperfor
manceofpr ogramst
hatcanbe
par
all
eli
zed.

71.howdohar
dwar
esendsi
gnal
stot
heCPU
Har
dwar
edev
icessendsi
gnal
stot
heCPUi
ntwomai
nway
s:

 Memor
y-mappedI
/O:Thi
sist
hemostcommonwayf
orhar
dwar
etocommuni
cat
ewi
th
t
heCPU.I
nmemor y-
mappedI/
O,eachhar
dwaredev
iceisassi
gnedaspeci
fi
crangeof
memor
yaddr
esses.WhentheCPUwantstor
eadorwrit
etoahar dwar
edevi
ce,i
tsi
mply
accessest
hecorr
espondi
ngmemor
yaddr
ess.Thehar
dwar
edev
icet
henr
espondst
o
theCPU'sr
equest
.

 Por
t-
mappedI
/O:I
npor
t-
mappedI
/O,
eachhar
dwar
edev
icei
sassi
gnedaspeci
fi
cpor
t
number.TheCPUcanreadorwrit
etoahardwaredev i
cebysendingasi
gnaltot
he
corr
espondi
ngpor
tnumber.Port
-mappedI/Oislesscommont hanmemor y
-mappedI
/O,
butiti
ssti
ll
usedf
orsomedev i
ces,suchasseri
alport
sandparallel
por
ts.

72.expl
aint
hedi
ff
erencebet
weenal
ightwei
ghtpr
ocessandanor
malpr
ocess

Ali
ghtweightprocess(LWP),
alsoknownasat hr
ead,
isaunitofexecuti
onwithinaprocess.A
t
hreadhasi t
sownst ackandsharesaddressspaceandresour
ceswi t
hintheprocessandot her
t
hreadsbutlacksauniqueprocessident
ifi
er.Thr
eadmanagementisdonei nuserspacebyt he
t
hreadli
brary.

Anormal process,al
soknownasaheav y
weightpr
ocess, i
saself-
containedexecution
envi
ronmentwi thit
sownaddressspace,memoryresources,andprocessidenti
fi
er.Processes
arei
solatedfrom eachot
her,
whichmeansthatonepr ocesscannotdirect
lyaccesst hememory
ofanotherprocess.

Themai ndifferencebetweenlight
weightprocessesandnormal pr
ocessesistheirmemor y
management .Light
weightpr
ocessesshar ethesameaddr essspace,whil
enor malprocesses
havetheirownsepar ateaddressspaces.Thismeanst hatl
ightwei
ghtprocessesaremor e
eff
ici
entwi t
hmemor yusage,buttheyarealsomor evulner
abletoerr
orsifonethreadcrashes
orgoesrogue.

73.whati
smeantbyt
hecr
it
icalsect
ionofapr
ogr
am
Acri
ti
calsecti
onofaprogr
am isasegmentofcodet hataccessessharedresources.Shared
r
esourcescanbeanythi
ngfrom amemor yl
ocati
ontoaf i
letoadev ice.Cr
iti
calsecti
onsar e
i
mportantbecauset
heyensurethatshar
edresour
cesareaccessedinasaf eandconsi stent
way.
74.whati
smeantbydeadl
ockandwhati
sthei
mpor
tanceofdeadl
ock
Deadl
ockmaybedef inedasasituat
ionwherei
neachofacol
lect
ionofprocessesi
swait
ingf
or
somethingf
rom ot
herprocessesinthecol
l
ecti
on.Si
nceal
lar
ewai t
ing,
nonecanprovi
deanyof
thet
hingsbeingwai
tedfor.

Her
eisasi
mpl
eexampl
eofadeadl
ocki
nacomput
eroper
ati
ngsy
stem:

1.Pr
ocessAacqui
resr
esour
cel
ock1.

2.Pr
ocessBacqui
resr
esour
cel
ock2.

3.Pr
ocessAr
equest
sresour
cel
ock2,
buti
sbl
ockedbecausepr
ocessBal
readyhol
dsi
t.
4.Pr
ocessBr
equest
sresour
cel
ock1,
buti
sbl
ockedbecausepr
ocessAal
readyhol
dsi
t.

75.expl
ainwhyr
ound-
robi
nschedul
ingwoul
dnotbeappr
opr
iat
eformanagi
ngapr
intqueue

Round-r
obinschedul
ingisnotappropr
iat
eformanagi
ngapr i
ntqueuebecauseitdoesnottake
i
ntoaccountthesizeorcomplexi
tyofpri
ntj
obs.Thi
scanleadtolongerwaitt
imesforl
argeror
morecompl exjobs,ast heymayhav etowaitinthequeuemul ti
pleti
mesbef or
etheyar e
completed.
76.Devi
seacombi nat
ionofFCFSandSJFschedul
ingwhi
chwoul
dbet
he'
fai
rest
'sol
uti
ont
o
schedul
ingapr
intqueue
BLOODOFJESUS,
THEANSWERLONG(
LMAO)
77.Whatar
etheessent
ialel
ement
sofaf
il
esy
stem?Whati
sMFT?
Essent
ial
element
sar
e:
i
.Fi
l
e i
i
.Di
rect
ory(
fol
der
) i
i
i.Fi
l
epat
h i
v.Fi
l
esy
stem met
adat
a v
.Accesscont
rol
MFTstandsforManagedFil
eTr
ansf
er.I
tisatechnol
ogypl
atf
ormthataut
omat
es,
secur
es,
and
managesthetr
ansf
eroffi
l
esbet
weendif
ferentsy
stemsandpeopl
e.
78.Whati
snet
wor
ksecur
it
y?
Network securityr ef
ersto the pr
acti
ce of protect
ing computer networks and thei
r
component s—such as har
dware,sof
tware,and data—from var
ious t
y pes ofthr
eats and
unauthori
zedaccess.Thepr i
marygoalofnet worksecurit
yistoensuret heconfi
denti
ali
ty,
i
ntegri
ty,and av ai
l
abil
it
yofinfor
mati
on byi mplementi
ng a combinat
ion ofhardware and
soft
war esecuri
tymeasures
79.assumeapage-basedvir
tualmemor ysystem wherepagesizei sf i
xedto8KBandt he
physi
calmemor
yis2MBofwhi ch256KBi soccupi
edbypermanentr esidentprogr
ams.Ifthe
remai
ningmemoryspacetemporari
lyaccomodatesprogr
amspagesbr oughtfr
om disk.Upto
howmanypagescanweswapbet weendiskandmemor yatanypart
iculartime?
Physi
calmemorysize:2MB
Per
manentresi
dentprograms:
256KB
Remaini
ngmemor yspace:2MB-256KB=1792KB
Numberofpages:1792KB/8KB=224pages

Ther
efore,t
hepage-
basedvi
rt
ual
memor
ysy
stem canswapupt
o224pagesbet
weendi
skand
memor yatanypar
ti
cul
arti
me.

80.supposeweupgradethesy
stem memor
ywi
th1MBofaddi
ti
onalmemor
y.Woul
dthi
sbe
tr
ansparentt
othesof
twar
e?
Yes,upgr
adi
ngt
hesy
stem memor
ywi
th1MBofaddi
ti
onal
memor
ywoul
dbet
ranspar
entt
othe
soft
ware.
Theoperat
ingsyst
em isr
esponsi
bleformanagingthememor y
,andi
twil
laut
omati
call
ydetect
thenewmemor yanduseitt
ostoreprogram pages.Thesof
twarewi
l
lnotbeabl
etotel
lthe
dif
fer
encebetweentheol
dandnewphy si
calmemor ysi
zes.
Hereisamoredetail
edexpl
anati
on:

 Theoper
ati
ngsy
stem di
vi
dest
hephy
sical
memor
yint
opagesofaf
ixedsi
ze.I
nthi
s
case,
thepagesi
zei
s8KB.

 Whenapr
ogr
am i
srunni
ng,
theoper
ati
ngsy
stem l
oadst
hepr
ogr
am'
spagesi
nto
memor
yfr
om di
sk.

 I
fther
eisnotenoughmemor
ytost
oreal
loft
hepr
ogr
am'
spagesi
nmemor
y,t
he
oper
ati
ngsy
stem wi
l
lswapsomeoft
hepagest
odi
sk.

 Whent
hepr
ogr
am needst
oaccessapaget
hati
sswappedoutt
odi
sk,
theoper
ati
ng
sy
stem wi
ll
swapi tbacki
ntomemory.
81.Assumeapaget ablepoint
ercontai
ns5120andt hepagenumberi s128.Whatisthe
start
ingaddressofthebl ockwhichspecif
iest
hei nf
ormationforpage#128?Supposethe
pagei salr
eadyinmemor yandhasastarti
ngaddressof65,536.Whatist
hephysi
caladdr
ess
gi
v enthewordnumberi s64?Howmanypagesof2048by t
eseachcanweaccommodat eina
256KBmemor ybank?(THISONENOBEPROBLEM)

82.AFDDr otatesit
sdi sket
teat300rpm.Theempl oyeddisket
tesaresoft
-sect
oredi
nto26
sect
orshavi
ngdat afi
eldsof128by t
es.Calcul
atehowl ongi
ttakestoreadthedatast
oredi
n
asector(
aft
erlocati
ngit)giv
enadatar at
eof200kbs.

Tocal
cul
atetheti
mei tt
akest
oreadthedat
astoredinasect
oronaFDDr
otat
ingat300r
pm
wi
thadatarateof200kbs,
weneedtoconsi
derthefol
lowi
ng:

 Thet
imei
ttakesf
ort
hedi
sket
tet
orot
ateoner
evol
uti
on.

 Thet
imei
ttakest
oreadonesect
orf
rom t
hedi
sket
te.

 Thet
imei
ttakest
oreadt
hedat
ainasect
or.

Cal
cul
ati
ngt
het
imei
ttakesf
ort
hedi
sket
tet
orot
ateoner
evol
uti
on

Thet
imei
ttakesf
ort
hedi
sket
tet
orot
ateoner
evol
uti
oni
scal
cul
atedasf
oll
ows:

r
otat
ion_
time=60/r
pm

r
otat
ion_
time=60/300=0.
2seconds

Cal
cul
ati
ngt
het
imei
ttakest
oreadonesect
orf
rom t
hedi
sket
te
Thet
imei
ttakest
oreadonesect
orf
rom t
hedi
sket
tei
scal
cul
atedasf
oll
ows:

sect
or_
time=r
otat
ion_
time/sect
ors

sect
or_
time=0.
2/26=0.
007692307692307692seconds

Cal
cul
ati
ngt
het
imei
ttakest
oreadt
hedat
ainasect
or

Thet
imei
ttakest
oreadt
hedat
ainasect
ori
scal
cul
atedasf
oll
ows:

dat
a_t
ime=by
tes_
per
_sect
or/dat
a_r
ate*1000

dat
a_t
ime=128/200*1000=640mi
ll
iseconds
Tot
alt
imet
oreadasect
or
t
otal
_ti
me=r
otat
ion_
time+sect
or_
time+dat
a_t
ime
t
otal
_ti
me=0.
2+0.
007692307692307692+640=*
*640.
2176923076923*
*mi
ll
iseconds

86.AHDDr ot
atesi
tsdi
skat3000r
pm.Theempl
oyeddi
skhas17sect
orsof512by
teseach
pert
rack.
i
.cal
cul
atehowlongi
ttakest
oreadt
hedat
ast
oredi
nasect
or(
aft
erl
ocat
ingi
t)gi
venadat
a
r
ateof2Mbps.
i
i.Cal
cul
atet
hemaxi
mum andav
eragel
atencyt
imesoft
hedi
skassembl
y

87.thevir
tualmemoryofami cr
ocomput
eri
simplement
edbymeansofaharddiskhavi
nga
for
mat t
edcapacit
yof16mb.upt ohow manysegmentscant
hesystem handl
e,gi
venan
aver
agesegmentlengthof64kb.
88.A31/2inchfl
oppydiskdr
iveusestwosideddisksandrecordsdat
aon80t r
ackspersi
de.
Eacht
rackhas9sectorsandholds512bytesofdata.Thedi
skrotat
esat360r
pm,t
heseekti
me
i
s10mst rack-
to-
tr
ackandtheheadsett
li
ngtimeis10ms.Calcul
ate:
i
.thet
otal
capaci
tyoft
hef
loppydi
ski
nby
tes
i
i
.theav
erager
otat
ional
lat
ency
i
i
i.t
heav
eraget
imet
olocat
eagi
vensect
or(
assumi
ngt
hatt
heheadi
sini
ti
all
ypar
kedatt
rack0)
i
v.t
het
imet
akent
oreadasi
ngl
esect
orhav
ingl
ocat
edi
t.
v.theaver
ager
ateatwhi
chdat
aismov
edf
rom t
hedi
skt
othepr
ocessordur
ingt
her
eadi
ngofa
sector
.

89.writ
e shor
tnotes underthe fol
lowi
ng usi
ng di
agrams where necessar
y;i.addr
ess
tr
ansl
ati
onschemesii
.pagingi
ii
.segmentat
ioni
v.combinedpagi
ngandsegment at
ion
Addr
essTr
ansl
ati
on
Pageaddr
essi
scal
l
edl
ogi
caladdr
essandr
epr
esent
edbypagenumberandt
heof
fset
.Logi
cal
Addr
ess=Pagenumber+pageof
fset
Fr
ameaddressiscal
ledphy
sicaladdr
essandrepr
esent
edbyaf
ramenumberandt
heof
fset
.
Physi
cal
Address=Fr
amenumber+pageof fset
Adatast
ruct
urecal
l
edpagemapt
abl
eisusedt
okeept
rackoft
her
elat
ionbet
weenapageofa
pr
ocesst
oaf ramei
nphysi
cal
memor
y

Pagi
ng
Acomput ercanaddr essmor ememorythantheamountphy
sical
lyinst
all
edonthesy stem.This
ext
ramemor yisactuallycall
edvir
tualmemor yanditi
sasect i
onofahar dthat'
ssetupt o
emulatethecomput er'
sRAM.Pagi ngtechni
queplay
sanimportantrol
einimplement i
ngvirtual
memor y.Pagi
ngisamemor ymanagementtechni
queinwhi
chprocessaddressspacei sbroken
i
ntoblocksoft hesamesi zecall
edpages( si
zeispowerof2,bet ween512by tesand8192
byt
es).Thesizeofthepr ocessismeasuredi
nthenumberofpages.

Segment
ati
on
Segment at
ionisamemor ymanagementt echni
queinwhicheachj
obi sdiv
idedint
oseveral
segmentsofdi ff
erentsi
zes,onef oreachmodulethatcont
ainspi
ecesthatperf
ormrel
ated
funct
ions.Eachsegmentisactual
l
yadi f
fer
entlogi
cal
addr
essspaceofthepr
ogram
Combi
nedPagi
ngandSegment
ati
on
Both segment ed and paged impl ementat
ions have t hei
rr especti
ve advant
ages and
di
sadv ant
ages,andneit
heri ssuperi
ortot heot heroverallchar
acteri
sti
cs.Somecomputer
syst
emscombi nethetwoappr oachesinor dert oenjoyt hebenefi
tsofbot h.Onepopul
ar
approachistousesegment at
ionfr
om theuser ’
spointofviewbuttodivideeachsegmenti
nto
pagesoffixedsizef
orpurposesofall
ocat
ion.
Sol
vedexampl
e:
i
)Assumet
hepaget
abl
epoi
ntercont
ains4096andt
hepagenumberi
s128.
Whati
sthest
art
ingaddr
essoft
hebl
ockwhi
chspeci
fi
est
hei
nfor
mat
ionf
orpage#128?
Supposethepageisal
readyi
nmemor yandhasast
art
ingaddr
essof65,
536.Whati
sthe
physi
caladdr
essgi
vent
hewordnumberi
s32?
Howmanypagesof2048by
teseachcanweaccommodat
eina256KBmemor
ybank?
Sol
uti
on:
Thesoughtaddr
esswi
thi
nthepaget
abl
eis4096+128=4224.
ThePhy
sical
addr
esscor
respondi
ngt
othegi
venpagenumber#128i
s65536+32=65,
568.
Thebanki
nquest
ioncanaccommodat
eat
otal
of256/
2=128pages.

You might also like