Professional Documents
Culture Documents
Memory Management Part-1st
Memory Management Part-1st
Uso rograms
Uge Inteace
Syatm Calles
Harclae
h g emor lanaaemem cqred-
o c ae and dc qllcaBe
memo and
aftcr Oces execution.
*To
To Ke
Kecp rach o d memoA Apate
ocos.
*To ini mige men dalion issues.
To
Pog udili3ation of min memor
To manadin date àndgri ile
o exeeup
hocess
Suapp3
Swappi Js a machani Jm in shith
occss (2
roces s P3
30e fov o Laut
s
f-ocesef4|
ocess P Sapout
Sapin ce-P1
Cxecuthon of gn
ntcAon À done
divecl on
rd Lourt Oithout ng
qn intefevins
ard Laae
machine Qcceptin9 the
instuchen in
machinc languag, dåe
ho pcrSon Ono n Aufticient Knesleds
about Compter lcld a able
Com puter. Ope
Residen Moniter -
Intumup
Psocosgin
Deyice
Diue
Resident Job
Monit
Sequencin3
Contro
language
inttpdt
oun da
oam
Con+iguous Memor Alocaion',-
Management Techniquot
ogram gam- 6
PrgmS exit holc
o g a m 4- Pram 4
Progam 3 hole
eait
Pram -2 Pgm 2
oS
AdvatageS'.
Simple qnd iS ea to mplement
+A4Ppr multiproaramm a multi ple
Pcesses Can b tred insidehe mgm
memo
*
lanagcment JA
cas
Casyung his Schcmc
Variable Sige Par 4ition Seheme
dumemicolly
The Si2e o Dar h4ion is not Jeclarcd inita'y
OheneuCY an oceSS G iNcS Psri+1on
S i S3
3 Cqua! oHhe Sigc of the
CYattd
Cattd
andhun allocatcd +0he psocess.
procesS
OS
ProceSS
oceSs Pas ition
3m6
focc 3 2
ocesSP2 Pasti 4ion 2
SmB
Poccrs-P3
PoLcSS 3 MB fartition 3
Adwandag,
No ndeanal
ragmnq lion
Deqvec o multipogvomming i
mamic
to Limidalion on Si2e
Pro ccss
ngmic memoA Alocation. ttchniquet
-Cinsti4
fi4bes fiQmd onSt it anc
most Comman &ae ics d+o Adet re
hole rom h tt o quaila be
E
20KB
OCe SS A
SK8
4o K8 Hole 40 -2S IS KB
Next 4 - ame
i
Aaveh a aM allocaion hole
BeS414 . Allocationihe Smalles holc 4hqt
SS bis cnough
SkO
occSS o kB
Hole 19 K0 o: 9
Ke ITA
4o KB
SokB
1 2 kB
orSit Aleation the lgesa holc.
rcc SS o KB
Hole So-lo 4ok8
oblem
Ciiuen memo asti tions
o ook6, 4oo Ke
GooKB,Soo ke ,3oc kG qnd So KB3
Thes
arrtHtions nccd o b
allacatee Ao our
Pces3 ofSi2e 3s
4
k6 ,210 KG KB
ane 431 K n hat od6.
BcA it& oYifit akoihm.usima fi fi+
SoluHon'.
The main memo no been dividtd antoiied
Po ionS as
Sook8
3oc ke
AsokB 60oKG
9ook
i c n poces sS Gt
ce SS P 21o k
oceSs f3 4c8 K8
ocess P4431 Ke
P2
00KB3 4ook Sooke 2Soke
Stp-3.
2 P3
Qoo Kg 4ooke
Shp- 4, -
oce SS P Can hot be allocqd
he mum e ca no
pasition e
Sae ga than
Cualo h
Sig PocesSS
p4 aalale
Sp-2
P2
P4 P3
Tota Auailale
Memar fatiHon 2QSo KB
Total d P
+2 +3t fq
3S+210+ 468+ 4 81
Step3.-
oceSS f and P4 Can ho be
qllocqhee -he
memo
This becau
r +han
poraitio9 o Si3c
squaSqua o he
Paroce SS Sige o
P qnd
pocess p4 iu Quaila ble
Thus, dfeyn} as
o hAame ore6 Can
an be
be
Stend at dif {oent
Placcs àn e main
memy
Non- Contauous -Memery Aloca1on
Technigues
Sgmentahon
*
Ohat is
aging
aginsa is a
fixed Si2earti on Scheme.
*In
8in Sccondary qnd man
memo e
diuidcd na o
equal fixed S2e avtilions
The
astitionS ofSeconden Memo
Called a g s.
The astitlomç o
smeme
Callcd o ams.
*Eaeh poocess uided anto
pasts h nescSize
Size
O Cach part J Same a Paae Size
yameS
Main mcmoy
Scconda ems
The Pages o process c SAort in ihe
ams ot main memoY
dependins upon
her
auaila bili
CPCPU
aloays ncaad a
logical addre s sS
*Aphysical Address i needed to
main memoX cce SS
Qcce SS hthe
Sp- CP enevades a
logical address Censisting
o oo
ting
age Humber Spcciies h
Speilie of
oce ss from Shich Pa3 he
cpU Jans o rcad
cad thc
he
Page o idset Specifies -th Spectic vd on h e
Sp-3
Th ame numbrCombined caithth Oageofsc
amá th qutdphytical address.
Fams number Spefie ame OhcR
Aerd. hetquied
Page o4se Spccis the Speciie LOesd
erd thathad
hat hos
b rad rom a t page
CPu-
Local Addvess
Franc Hoofsen
Phyical Addms
PT BR
n -iume
Paeabe Rretr (PTBR)
Table
kPage gble a data Ctuoc.
able AA stoved n jhe man memo
*Each oces a i oom Ande pemdtny 91ai
*
P18R Conhcins he ba addrers oo page
gblo
corkina
Raferenced Page Ho
PTBR {- PSam He
Pagc lle 8t Register
Page Table
apional Fiold
compuls
Field
ma,
r n mm®
Phybcal Addess Spacc =Size ofMmn
Size of Pm ToBal Ho o
om Page ize
Fame Size age Size
Ho. o emc in M 2 4hen
Ho of bits
pame no. y bit
Pag Size 2 ytS, thun
Ho. o4 bis n
paq ofscr =x bi tS.
Si2 MM =2 byes, hen
Ho: of bitts n phyical Addhess x bis
Ler Proce
Virtual Addrs5 Space Size o PoceSs
o o Paqehe ocess is
diyided =Pvocess Size
Page ize
proceSS Size es 4hun
no o bisn uirtual
addre s Space bi4g
Soh haue
Number oj locaions possitle ith g2biks
2ocations
T S2 o On locahon -2 bitC
22
x 2
ns
Si2c oo Meme
2x4 bs
4 bks16 mB
x4 1 G
h
2x4 934
2" 32
nz 32 6its|