0 ratings0% found this document useful (0 votes) 131 views95 pagesOS (Notes) (ŠÆHĮŁ JÆÑGÎĐ)
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
ark - 2
eo TH perating Syste isa
_|_aallection_of set_of_progvams’ Wuhh}\da_smn ouagges
@ll_the vesources of tae _Cosmputt& Sy Stem Y
__+ || T+ is am intedimediattey, between the used
@nd__hatdlwaxe-
_* | Chayacted@istics >
Sched ing:
FI pole
7 Memory rat ment:
S ce dv
e '
| Tate tna with diffedent Sofhuaxe.
- Device man ent:
BG
File won aye en
Ls pK
in | FY
ata
{
| Patch 0-5.
| Distyibutes ac’
4.) Network OS.
ee
Real time OSbk
Advantages > _
“cls patties O ANnUT interface for
the users in the Or of Menus icons
4 bottong -
LPL
Lula _ottneg . Piet be
—Thelps uses to Undedsiand Hae funchime
Of Conm puted. |
w aging tne verources
taal eae = Ay very Cagy +o use.
©. Te con be Yaar, updated.
x Visadvanta geh2
Ae : i Shon tt will
affect tniire System aryl re compvres
System Will No} Coy ks
imA Styuciures of 0 exasing
A. Simple Ghructwre > PP Syste
= The_inte:
Such pp erating Systeme da ad
_ howe tuell_defined_¢ sen ot ate el
—t Simple pnt eel pst pool Ome
PR a eae pag —
2 neers application
to _acces tre basic Bea ee
ete aflpenco: Pos 8 systems Cayce tae
Onitive Sewn cxaslh VF Cone of He us e%
OT TOG device daiver< ]Advombages= -
Wee betes, Application
Peocforman ce because of the few interfoceg__
ay peter the c1pplicasion_miogvown and dhe a
hosuwase
— 4 hoped to_develop aud,
1am Operating System
oS se SS
&_structyyt is ve
Complicate) boundases exjcpe _
behueen modules.
1} does mot enforce dat “hilly i
opel ae. ( LCL Angin tne2 Loyemed Gtructuve 2 —
| _ Ta this stuchye the OS
_is byoken_igto_cnumbe%_of orl :
p——_[ This_siemplifica_the_debyg ging pro. 4
po ee? Devel —agte.—debus ged _Oond_aa
p—— enor. Occurs duns deby, g exneé_e
— 2a da.och
| wt Aeiace
| [Zing =
laye \
i rc nia) |
YSSee
podem of con be hong fl
yn y odfectig ra CPAs
: +V is vi €asy+o~ perform y
Pe gy eae Peron seb
Hips! ey neh YY
Comp aise +0 le
the pete oe Daytli Use the
‘| funds oa+ Micxo- ee >
_ This er esigns the ___
———dperanng system —t by _Yemoviyg Ault nom = ee Sention
_Compon ie Pom 2 the keane h cosas
| then as Syctem Ond_use?._ pO
“| Moc Os_ ae an example _of Hais type of OS.
lp coless| Wives
\ sl de
_ } | Se M
Use fie. | eit, of en |mo
j ; : T
Molt fy = iNe ve hay
i] ta J
|
1 Vern) | as Mico Re9nel
» Moad E re —__—_——
! lla id Ob
y
,_* | Advantages
povialle in vabious platoon. PO
He
HITT ITITITTTA-.| Modulate Shuctuve > =
| At is cons idesel oy
sthe best approach for anos.
| hovolve designing of a_cmodulaa kernel.
+} The kernel_has of! Get of cove Components
th Gin —Setuther oe _adied_as dma ically.
—leadable_aotules ty the Kesencl Bites Oo
-duning Yun_time Oy book tyme.
— 1 ecemblen dv
| She fark that acd keanel hat define)
flexible oom the eked Suche aaa
mmovle Can COL ary othex module.
ln, ice_amnd |
[eu Driveds [Eve cy TAL
| - | fovmate |
NX 7
TI, T N 7
{Miscrl lonenust ——
LenibWles | > | Gy |
I Sy tenn |
| Cx ons [ \ loadable \
IH weno Les | Sy slew alls. \“ElUpemnncet 06
—1 Process - Mosnage-ment >
“The OS ‘Ss Yespmsible
—| -ho_pyoce
for mewn ) the process assigning the processor
oot ato time. Thi Oc called pcos
~Schedulinng -
Wd
Q).
FI
{Process Schetlig Ayaan
Fix.
GEC £5 (First Co
1 Semve): ose
Ese £ (Choytest Job Fiysh).
saat TW) Ratnd ann Salgg
Mernory “Managemen? 2 A
eynory amar a
gC. G
os on Om _impoviay+ Haya jo. ¥OLYy —“S4 Ste. _
+) TE deals ith senewnoty and tne YZ .- Gravi
Lok sere i
een Ov
ememory for. Se. cu¥ionaal back ageigs 7
Q
a)
racpotien
Grsr ft - i
qu)
LJoxst fb.5: Device Nonagement >
—————p- Ne he _e _om a
L/0 devices handed oy oe ope —
eos Lboan, disk
ve OFC.
Th ee abe different devi PAVE ds we canbe
ee ee ie natty of —
hhodle OL specific dence
“The device controlled is an_mhedtoce
——_hetween the device and the device daived
| The 1 ications com access al
Lhe Slo devices using the device drivesu,
File Manager lent >
ed oO
———___________Flles_age_us,
movile. a uniform view of data Gtnxage
bye opetany —Spesem,
—_— devices that _oure._usu 0
go data is safe in thd cose of_Sy stem
Failuye..
—+| The files com be aces.
Lin two ww >
Gal Sequential Acc, _
Ihe intonation in a
file is piocersed_in_orde%. using Sequedbial access.
Divect Acces
e files _Com_be_accessal
in YOndowm oy Yead ond waite apévoctiong.| | | Proce Sse, =>. 5
| A process is cc _progvam_in
——|-exe.cution including the _cuntentsalues.of dae
——_Pllogrvam courbes. dee iSAe Ges ond vasriables-
1 The diffexence hehatel ae ied pogo
—ty ig faat_the_prvogvaya—t
i teal pa a
our Compute. progvaums iIN_a
5b ;
| ito four oe CtHiows =
te SYOUKs-
ODM
di) te
[W? Dako:File >
Be
A fie is a collection of Gelated
at r ¥ Oo ig na
win device :
ection Of Yecrds Where
4H €oUh %eCord contains Some Field where
pate Del d Kepyeac any Some data
A. Name.
9.) dent theg .
3)! ype
A Cation -
51 ne.
G- Pyote con:
4-1 time, Date ans uses ident ication:oh I ney process © Commu micatones
___ | Pro. ce
——_ executing _concunen he ben peradiggttyctem—
| may 2i thea __imdepemdent pyro J .0y
——Castperating- process
Independent Po. cecs>
|or_be affected “by the og procesces
execuliog. tne. ystems: ss
| Copperating px CES Sek >
EEE ET, confessor
ee sae e DMG Apyncesses exe cueing
_in_the
Sy STEM
Tien ain Cer) ae chants that wat
—— OL Hem _te_exchongededct and _informadion
Thee ose dun fundamental model of inte
I Com, po Coo ya
4. Ge A a
ete cee tet sel
eLoh yy js esorbbishel - |
— Bigeres Darton
Coling Oma basing data’ to the share
BeMessage Pas. iD
“In oe mess 5 passing
[a eee ‘Coton sakes place |
hese cea ge ee ehween 220th Cas mopcag
7
Process fi
Shaue | tA
| Gq. Sh
U
Process a IMF)
Py G Inls
| rt
| 1
|
H
j |
oh
kernel AE
Figs Menage Pa
oeis aoa Segrne-at_ hot _Occessies chased
—___vasiiables an
Critical Section Pyoblems
I _CxiNcal Gechion
haga be executes ax An,
Oxtom).c Action
1
|
| OMe process must be exe CoH ibs
|
Cyitical Section ata gen ame
__¥) SoWwtion criterias
4) Mutval Exclusions
| - Only one process should
2) Progress > ; |
| ty mo process is eutin im its
Vth. {
the critical secon then ony Mose PIOLEIS 2
| Brot Oke ot exe cutie in its aemalndeh |
Bounded (s oltiag =
Thete is a Dimi} on tre
I 7 ,S >
Semaphore \S an_} i
aaa that _golve& the critical st
: teen Uilamoia eae
——Laccessel_ty hun atomic opetatifeys
| yr $=)
f pat ® Signal CS)
gz
(nile S<= 05 =Grl;
A
G= S45 000
Q, %Sowtion. of “auical_- Section
Fate
M _Semaphores >
y
ta D, Pr, Oy, Pn Orbe
alts dog:
the pxocesse
| it S=\5
| do
wait(S) >
|! Le maind Je% Sech
“5 while CE)
wot CS)
Gahile (S<=0 ) 5
g=S-4;
r
F
7
i
, a
7 | : Siomoal CS) 3
’
’
’
’
'
’
r
L
Lhs
aul pr. Ye img is 40 Vove some
precel. Prunnin Otol times, to
ouiwni ec p vilizodion: a
e_Objecive of, dime shazu' IS -t0.
Susiteh \ne aah Genoa gp dees 5
| frequent + _useks “con iwtevack
| with eK, Pxoproun whjJe i+ ts wp) y=
O mect these Objective »—the
—— scheduled selects “an owailable process |
toy -PAogram execution on he cPV- :
+ Fora “Single _puacensox Tein
ime vel he
move than ove rumsng Piocers«
3 Ty thé&e Qde._movk_pro(egseg, the ve%+ arith
shave +o wait Unt! the cpu is free
1 Qud_comn be yes chedulel:
x dulinng Queue >
4. | Tob Qube >
| A\_pyocessex ented jre_System,
I Ake put into _o sob queues Whi,
7 2. Read y Queues
| —_____The_processez thod_aae_v7sidi
Lin main meroyy Om One_teody_ onda —_
—__| to_execute -0%e—Kep} on _O_“Wist called?
Me ready queueS duling>
fo Ch
Hips bern sec Hh ms
ar ee ya _Cota_amole ne
oe. [OMVOs i pe
ae
Tra Sing\e.- POCESSOY Sy skein, oonly
One HyoleSS Com ~ Yun Ot OL kyng.
Pi YS MSY Walk un). are cpu ts
Lye ound Can he wesched Wels
: of multi
have “Some eSs) ry ok an timed,
to maximize Pu UH \izotiky.
prunceas \S executed tnl kb must Guait
\ °
To” vequesr.
Mhen one pxoiess has +o wait, the Opekatting
System —tnkies theo 4 Oc Een aca __
preteas Ang “this Pattern Contimues-08 chedvli ig ‘Cxiteyias_ eg
ea ‘UNlizaton> wed iy FS 4
it We want +o Keep ecu,
ee rv Possible. fy
|___+| Conceps ally CPU “utilization. an_vange ——
w__o107_\oo peice}. ____ 1
“a, O_XeC System, i should xcange fram :
—_——-40_peswent to go percep _________
a_i Tha ee
fe CPL : :
3: Wuxnavound me >
Turmayound mej :
lols _spen} wating
Lqueve exec utiyy on the _c
doing 1] 0
«| Exo’ a of view of a poi
process the _jmnportamt yiteylon_is_ how
Song. it_takeg +p exec .
The intedvel from Hie time of sub-m
____ | of 9 process 40 the He 0: ‘
[ts Yor uynevound tyme: 7—4 Waiting time
The cot Scheaulin
— | dows mot ctfect the Amoun} Of \
——_}_— proces s__
+ Waiking time te Whe sur of Ane_pemiols seen}
| watt ay iv Wne_recady “queue:
>
Uwhich_@_process executes 0: , does TO 4 je
affects Only the oynoun of aye Mood Ou
penis. cacti _ im Yhe_yead :
5: Respon ce mess
| jurmayound_limme “may. aaah e dhe best caitexjon
“Tn _on_intevative system
Ton hE.
| O.pten,o process
ie he Se %-
Thus. Omothes meacuye is Ye He from the
subyissio ofa yenes+ Unit de fiys}
nse Mme, is She Yim ix *Aokes AO
_srox+ vesponding mo} tre me it +
H we jhe 9% Be. i
‘The 4um ayound Hyme ts Gene Qin ted
| ‘by Yoe speed OF {he Ovo sdevict.
'
'
'
,
,
’
i
i
L
i
i
H
—
r
r
'
F
|
|
|A [Sched ling —Agorns 2
! Se exe OYE Some.
pes a schelg alates
A. Fis Come Fivst Sewei CE CFS) >
fay the simples _cey ched uli alg til ns
~The process en request ee Ayst
1s__allocatel ne cpu fir.
z The implemeniation - of Moe CES Policy
1
(
(
(
4
Tall D1) Wn oveod - ‘
! 4
‘
‘
4
]
ii
| .
Fivst in - Gys out
Seay
When o oyocess eyteys ne Yeady.
i—queve, js PCR js Oinker onto We tail
0, © que e-
| the _ceu js
Yo the PyOce ot the heat of the Quc.ve.
: Th j ess iS Men xe moved
| Ne eee em xe noel Fy ma
4
1 4
|
1
1
1
(- —_TThe_averoge age wailing Tajele tudes ate
_ECES policy howevts is _often_quite tony.
—Gonsidet the folowing Sek of process rot
|_oovive od _time.o-
“Process ha G Geew )
Q Spel V4 Execution ¢
Qo 3 Aime
Pa o
— eager BST
phe Soe schealty igen ts on pete
I On mie Yhe_ce ie bee allLocoute
——to_o._ process that pracess Keeps the CPU unt ik
___| ye deoges the CP i eno
7 Bequesting tho:Shoxiest Tap Fist (Sar)2——
This algoxithn, i
~Aissociates with €odh protess the leng bot
the processes ext cpu buys),
Ihe the —cey_{ Avollable, this \gye4
to the prac thar has the smallest
Next _C PU buvst-
Tt the next ceu bysic Of 4wo P¥oce
ore hy ome, CE -cheduliiag ts used
> os the site.
Th Algor Ham cay be _vishek
ee SAO ‘pateam privé.
AL move apenas om 4h sche duliny
method tious
I depend ou ne Leng Ha of Mae wey
Buys} Ay thee Be cous Che duly ye
RS OE Pinte thee tay
* [Consider the. following Se+ of _pyo
+a clemg Ha
Sse
Lith the MOF Sthe Cpu buys}
4 ‘ i econds:- (Non-Premphve)
| Process Ls Burs} Time (ms?
| 1 6
I Par 8
l 2a 3
2a. 7 %4 \G
| Pa | & | Ps ] Pz]
li {oi ting time foyr Pr = 3
fox ae Léa
chime
ar Hae 2
L Laitivy shine for py = Ooms.
Avetage ( alsin Ame = Gln ee ms.
p |
Bx Conside x the follo wing fovy v PYocessek, Lull,
7 the Leng Ha of the” cpu jven ily,
; millisecand Oni the ‘omive ak
p the Yea 4 queue. Ot +he stivn 28 Shown: -
p (Pyeempyive) >
)
p Process 14 Poxivol Hime Buyc} He
’ : ° 38
, Pu ) er berof 3 e Ae
f 2 3
, 4 3 5
| Graytt chow >-
. 5 lo + 26
| (P, | Po] Pe | fal Ps |
process Oxrecutel — Piyival Hynes ;sf Waiting time hy )
Q0-1= 90 = 9 mc
\=o-\|= Om
Cutan ‘time foy 3
| \}- 0-2 =l5me
__* | Bvevase —-
= Q+94+1542)/4 = 6.5 me.
ache luling A4 | Pyobleras. with SIF Sch duling >
! !
ith (with “Ane ste —aikga siti iS Row 9
| Ane Len’ of the ne Ae cou YEQucbs.
js
aitaigh tye SIE a gout
Cova sox be {ya ptementel ok the tevel_of
Short ten eu sch duly
Theze Is yo 4
mext “CPU bursy:
SIE scheduling. i
| not 2 you a steng th io “the
next cy post, b
pYelict Ves value.
MeR-
QO
“Thus . nh.
the Len ody he ext dey bUSt. Wwe
k the pvovss (with the shorteet
Corm—pickPriority Scheduling =
este
highest i
LEXal =p pial processes. ave ached! vel
in_Ece
Pay STE ee ts Sin ply opel
ae tt the -P¥0 yveFor
{
Fe mext CPU buyst$
Me < PO burst, the # Jowek
and vice yebsor-
can be e\Wnek
ox Noy reemoryjve —>
A.| & E rempnve ow
a scat om P pena ot — oe ue
pales emer ‘ove.
Yshne :
7 5 currents, “anand pxotets.
4
|m07) = prcempyl €. psiontty, eer {
pale OF Pre Veal of tne re od
See
Jal a dao od tdd(ore EST et of pyocessen.
|_ assumed to _hawe conmived ak ime fa)
___ | ty the orde%® Pi, Pr 2» Pa Pa
, Pleagila Ob. she Plast given in.
om NS ve
Fan ane Qyocess: Li:
| 3 \o PB f
\ y e2 i
a 7 Pa
& \ Pe
2 5 : Ps
\ in Pia ce eg
Mnete moce fee
| Droamtt host = tutes)" ¥
|
teal on ee i. et t
Las ime for Pua Came
: time fox _Po_= Ome
: t Koy Ox Vms a i)
ty Mime Fox Pe = 1B me
“Tati, ‘ime oy 25 = \ms
= Prvetinge, (ssaitiay inne p=
atte otlt+jstt is
= A/S
= _%-2 ms:
HURRAH eonoerrr reel TyProblem tail. zt pMorihy “Scheluliv 3 _ :
Mtoe a ietetie Sa oi
\S {yy define. Blo « ren esse
VA puacen Nae
tis yveady to yun yo tun but ‘but
ep ‘cal be_Consideze}
: cl a Scheauli
Some
Lots priority matty
o_o sea tole sta
Oa
processes J Con prevent a dau a taen
“prac 28s from eve
gh Oy the cpm
|
Solution 4 eH oll ew:
Pel A gclution to
Lam do ak am Fm | mt om
e_probley . of_indefuile Lio age of
Pa ty pace He jy.
Pain 0g \ O_techajque of 4
——Lintiebsing the paioyly of fa te
Uso} inn
: Aes
yssem Sov Oo Long in| el
S
is
54 Round Robin Sched
s
| vling = “the, Youd Yohin
5 __s.chedvling ol via_is designed especialy
| Foy, yp Soren be
ee ee
s——-prcemption is _addel_to_sisi
pyoce Ss
a "8 gmail Unit ok Aime._called_ a
_—hne_ quam tumor me slice ,1S defied —_
e | Clnenexauly yom _\o_+0__\o9 xn} \iSeconds).
>. The yeady queve iS ‘Weatel Qe a
> Lo ciyvey d a i ‘
>
>
= +0, *¢
S 2 as L
> Ps roe
» £ L ,
2 aw
> - f P+
> . ~, one
> TF a)
>
2
— “Te
oo ime time Ponteieval a: coh pnb
> qUontom
a osc =
a“Leer mentale Gowns Weliyaacl Do
: ing spate any ete ae j-queue (a
oO FT Fo_ queue oO
New processes. oo Added _+o0_he +a _
Lof the ve
e CPU led ick he tat
S From Jae veo
a_Hyne%& 0 inkeyvupt Sy 4 ‘yuhe
[quantum . Oni dispatches the Watts. —
yn \ a
U__buys
| of ree dHoan—a~ hme _quantym:
The pyocess it ef ui|| veweage dhe
——Tebu
|
|
|
«| The CVU echedu Gu will then pYocees
| 45 Yhe next Ovocess in the red
Years queue:
-| The C0 urs af the cuenta map —
Nae timed. ull” go off and tail oese” co se
| On IteSecupt” We 0.5:
Laitch caill be ex ecutel andthe
Process_Wwil! be pur ad the +ail_of Are yey
eue =
Pu Sche dulod Cail] Jnen select MWe
| next process in Ine veady que. Weewe
BS
is
— 2 =
p | Threads 1,
B I A threal is Q basic unit of cou
5 Uri fizotfon
p—_ | Th Compyises
>— po yey TD
jaan px yom Gountehel
; | Vedi +9. Sed _-
— peg
|
BT FT chases with othe%e Jnvecus beloapirg ta
the _scune_process_its Code Section
p a Ce
ly alittona/ hea ogee process Naso
Single Hyeod of cory tvo.
1 Lf op
Contos, V+ Co. peda amore Wom, Ore
‘oak at -o time. |
=|"
Ea Benefits > ;
ym; |
' | -Conbe broken down iro rae ainogov
| Hulishvending —c om _ntedavive_|by default, thveads chaxe
the mem _awad the sources of the_process
to_hid® Shen belong -
3 Uae U
4 ih nd
aka is Thor i+ Allows a Cnppli Couy sv _
i Y.
sto_hoave
Activity within the Some aulive ss gpaice .
>
Allocot: memo and
Yesources fy yo ce iS cocHy..
Gecause threats shake yeasources of 2
the paocess—sto—twhicle Vey belong. je __
is "move _€Comomical do “create Y and
Cowtext = 5 witcl, dyes »
A Wilization of ‘mutipvacessor onchitectus
The
benefits af -multifevead: n_be j
incensed in i ;
| whe%e hve : {oe_-vunning in_pa culled
on_diffeken} procé ssovs. ;
2 | A single = thveoded prod xy.
Lom _ovie cpl, Mo matted how many
. Munsitheading 0:0 _o._amul -¢ me
Nacieones CoN Curr oye=
or
hl
|
(|
i
L
;
l
Svs Thyeods 2
|
| Process a
System calls involved in Py0cegs«
Noe
OS treats different processes dittetentty .
| Data, 4
Diffedent process have different copies “of
Glen, Cale etc « nfl 2
bSuitching is Siowe%. ____arpeess
Blo ci vo :
Leal i
(ote :- Sxni) Amcion is used for create
pyoce
Threads=>
4 .
Ai use% Yevel “threads 4tveaed og Single
dako-
Nah a ch
Content Switdhivg ts fasted. ‘
ocki tvead Lill black _ewlive exoce ss.
“Tote Plepanient :Multi toreading
Muli tnveading is pyoce
Fo_exe cute onultiple thyeats hy the Same
Ame witout dependency of olheo._thyeais —
Calle) moulitarealing -
Thread is a PYe-defined class
uhich [Ss available in 4 .
Thyeal is o basic unit Of cpu At
{4 IS well knoun for independent
LXE cirtion +OOECH
6
ee
“—-
e
w
—nmust_exist ag_a_single block of Contiguous —
adiyess: oy See
| Gone Kmes i iS imnpas sie tm —find ang —
Nn block.
dow ~ overheads — —__—
eB Mans cons ous “Fema —lacasinas 7
— ‘The
Pngion divided_into_chu be
ment cam be Placed jv dl at
Pages ot ‘Memory. - ;
Le will Gy -
(S |G | |G | &) @ Gi &
geFaging >
iS _O mem Og Mandy e.ment
scheme that inminates the need heed toxe Comlipuous
-Alac ation of
“| Thét gcheme pcdumite the ysicol_addvess
Space of o PCELS to he sox = Contig yous:
| agical Addvess oy Mivtval Addvesss
Br_addves
fencvaked | by Yhe cpu:
i Logica Addves: ces
am The. ce+ of all
Nop cou addvesses jeneccase| by Oo puogrvcun »
Physical (less
Tin_odlyPas Cue avoiloble
on “mesmo unt
Physical Addvess Spaces
e Set of all
oddvtss.@ ~The map viv err
S ease by tne mena amasngge.nnen unit CPM) tuhicl
5 is a haguduone dev
i i ledice ante 4
$— a8 ke danique— - =
@——- |The Addvess Space fs c A
— fait Ou i : ‘
.— «Logi cal_oldvess space is also coplitted into
= fixed=Size blocks, callel ag ea-
Page ize = Frome Size. i
a
Ge
‘Aduiess generated by CPU is divided inte» —__
es die wat >
Yu :
Q Numbe%:-
y
6 9./ Page. offset-Cd )'>
»
the
F
| Frome offset Cd) :>
Nuvbes. of oe oe tn
- =
>No. of ages»
‘Ne =of page Bass fae
Process sire = 40,
aye sia = 9f-
Nb. ofp = 4
Popa Sh = —Lepages
gle! frame Memoy Sf
Frame: Qize a
e Memo Sie = 16Q
“4 Frame” Size = 98
No-of frames = ~. = 2 Pyomes-—
&
Chyuctuye of the Page ae i 1
we, Yee
oDvypvyree
t
eC ie toble:2
pes ope Aah
Has
e | 2
- | Tnverted oye Table -
aa?
=H Menoy Spe A ape oma aes
shraighnt = foxword_methods>
Qn madexn _C ompltexs.-
G6 Oo
“Tatal Size Clegical aaa
wR Ca)
-? toble tsould thas Lt
6 |6 |6
Cumbe® -of Poges =F 7a).
Gnur=
Stove ik oe sable clone enh
halen Sask ta alla cate, te aye Soe
Contiguou Sly i _ *
jons >
geoouneee
Hh
| 5 TPT ae oR " : i
Boge Tablegeh iain i
+ Tayesxed
v9 598¢
RB oe tan pagel
Break-up dh [ \
m le
1A simple technique ie a tw
We Wem: page the. page Jrable-
~ | Hash =
| Commo in _addves
Spaces > 39 bits.
| The io pope elle eS
hashel ining feje 4
table.
elemernts hondlivy. do Yee ane Rein
Each Siement— Contains: (2 tae virtual page _
onuynbeS. p, C2) the value of He am
Frome £, ond 6) a oolwted 4p the mex}
Clement @ +
ani :
Virtual Oise numbehs abe
compaked in Wis tic? Seaxching fora
teh,=
Lovertes Page Tables.»
Nocmpally. each process
has 0. piye tole hide teens “hack of All its —
: hack the table Contains cmillios of ennies...%
“Too Costly
|
Mmemay 5 fre. x Frame:
O
5 ,
no. say 33 \ / i
; -| Th _Contoivs_one ent fav oo seo page of
: \ MA A CS
) . 3 ° :
owing hls Snhy ax ent Houma
’
5
>
»
b
>
b
»-
»
>
B
-
¥
*—
-
z
5Demant aging = -
e_NyOCes ses_yeside fy
Secondary memoyy ond pages ose loaded
HL
Onty on demand mot itn advance: _
“CAL tansfeas Conhal_Rram_| program to_OS
to demaint ne page. eee
Doge aeplace mene algoithmg >
Algorithm isn wee edie iid hee
ena mnew page Comes
im-
Qose_Foult: >
A_page fault hoppens when Q
“soning —Progproun fon the Viton et Pai —
tout not Soaded in oysical amemoxy-
Vv 10
- Tn wt
Case of o Poe, fault Sr Sy tena might
+ | Different te ocement oe ae a
Atte kent bo Pe whid
The. i ee
Munber “OF vgs eehe
cE
Daye placem ey Algosthms=>
G9DDDOEE
Est In Fyst out (F160) > _
i
[poy apiaioner aye
zea
Tn }hi —calsoxitlarn je Opevatity Syste Keeps —§
track of a pages, iy the smewmiow in a queue,
tye olledt Page is inthe front of he queve «
| Nhe. pogeenee4 tobe poye ‘iin the
front _of te queve (Ss Seley fry removal:
@
faults
Beg. Concid ps ve fer i G3
~ _ityith 8 page frames. vinb E
Cw aa
© © © © 6 6 65559 6 &
eral g She
| Rebdtence
a3 og 63S 3
T Lf°l Jel Jo] Tol
3f (3) fala] vet [6
aj [ty Ws tisL{2 H= iss
Mm Oo WH Ron cw he iE
| “Totol_poye Fault = 6
VYoO,
ra he
time im the future.
Cx c poge—refevences $0,120, 2
aren 3,2) 3 “Lait 4 Page Froune-
End ELA of page Pault-
a 30,1210, 3,04,42,0;3253.-
leas
: No: of page frome = 4
+o 1 2 3 2 4 Qi:
2) [2\J2\ [2 \{2z V2
Wh ya yy U(\4 (4)
o| jo| Jol foffo o | jo | lo
a) 14) (apy +T[s 3 3 | \3
mum wh A Hn HOM OY
Q 0 a2) 83 t
21 {(9\ ol {zt [a
4] \4|\4]) +) [4+
0 9 0 0 oO
SCSHSTS Te}
HH OW RAI Recently Used >
Least emily 5
na Mai ligase ~
——_| Lill be replaced hide is m3
Pase 4,0,1,2,0,
ce
C4. Consite% ne page yefevonte ginny 3, 0)
2,0,3,.0,4,2,3,0) 5.9.3 ith A page.
«Find yumbea of 2
Dey 2, 3,0,.3,2,5°
No- of Page FYame = +
9 ) 2 ° a ° Gnd ap
1 y] Ja a) [2 fo Ya) | al.
Ef Wy } 4{ [4
o| {9} |? o| | 9° 9 ° 0
+ LFf a +] | 3 ie A 3 3
tora oR
ey ° 3 , 2 Se
| jy lz Ane
; + 4 a . 7
0 0 0 0 0
SP 3 3 3 a
H H 4 H H
Total. Raye Fault > -¢
-™~ 7 979 9 7“
4
* 2
i 1s Gorm . vi:
smemsty—OX othe” me ___—_—4
opexadions- 1
‘ \athem Anjs \nappens a Potted +,0i cally develop. “4
in _tuhidh .ar_yequest_is mate Hae “ope retiing —,
ystems by _o processor progam. the se xaig—~
Reve fyom__Some othe _proless Whi Oa v ‘
“4
(
(
{
tun makes ety ve quesis ood cant be
cosisfed -
Tr a virtual Storage Sy skew Washing 4
a_comditon in whic excessive pagging
operations ate place. ve.
A Sy stem that js +a \ i
ac “eWned, co Vey stow “Sy.ckeim OY oye AhOd !
haa come +0 lait: g
7S te
—~
eU
Utilizahon wa
(\ hye hingBeg mentation - 2
pew ae inf | pincess ie delta. Seprera
: The _chuncks Hout ot progyoun—{s_4i
>| While Ahsan een al po
— 4am Sizes one _coul
2h —+| Segmentation CX A re
~———-pracess which “pag oy cock ask give
| These ate two ty genicaitione
[is divided inte a_numbed of “Sepamewts. oot
— a Sa a
| polne in +me+Segment Table =
snaps wo =dirnens ove
T+
iyo One - dimensJonaA___
\Cal_addvess
\S) Cod Odd yes.
“HT AS ean kab
a! Base Addivecs »
wiht
>
Le_entny hos rad a
7 Lt specifies the length of
the segment
eel
“Sra vent Nuywalets
Esrn cyt
TU
[ “7
f Base alivess Liyat oo] Saree Z
° 500 | 600 | neal
ql 9.500 00 aca | SOirntnd J
2 500 400 | ~
Z
4 * ane, Qo0 800 (=
41 3600 400 | tel
| 4f00[] Gorse Add.
Cae Addl
Min _|
Phusicnt Maddy Space.
“| Add yess genesoted_by tre CPU IS divided tito. |
Segment umbed Cs) : yy
ES
Nurmbe% of bite i
Ze sepyesent dhe Sesame at- |
Segment offset (dy>
: Num
4p Sxeprbdegt Yhe oize of \ne SegmentAdvantages
Hic it ws Non intemal ore frag mentation
Segment Table Consumes leas pate tn
Comparison ts page table in_paging-—§
—£ Disoavantages a
A Ane Vary a
—— 1 0inJ_vemoved Fyoy (Ee
Ameo paces
Tce ciheg “saenalBgyeacataina —
: Hlunv=s ——
str! Shaved vesources >
_____ Example& of clawed yesources:
- Men “ghavel yesdurces do =)
|_cimultane ous acess but yvequire amutuos ex clusiov»
These Yesources Ou
Sta this cose. Y
40 _opevate _On_the eee at the came
: | +e.
. |
Be Theve ave several omethais available +o pyite c+
2 Rear era nr
J 1+ Disabling interupts amd _papemp'or oy —§
S |_Usivg Con tept Ke semaphores and anvter
> | that “pul Woveads iain the blacked stated -
> \€ Necessawys
dg
=>
2 i
2
2: Ai eta
7 rm [=
ofa ey wn
>. \ ~~ Preemetion
; Signa. blocked Walt
a
a
7Se auatie eo ee
Pourtiro entoy tnclule_vowtous vegaurces Loy
Exoumple-j_ me vnoyy a4 eee 22 ais of blog. 4
The yt allacatts” cng sesairce. pave 4
4o_endla y6e% Pogo before the py’ mis 4
I inihextion « 4
+ | fl yesource table vecovds he vesouvce pastitioa 4
Resourte Toble
;
| Resource Mame Class ll locodion Slob 5
"Disks. Disk Alllocaiel jo ba,
Printed 9 Pinter Ree :
Disk _L Disk _ Free:
4
4
4
4L|
|
2 : . mI ement
pee Overhead <
> —¥| Disadvantages =—
7 sl Lacks FI, iy - i
: oe ay
y——Move_vesources Jhon what _o1_panti cla —__
y——__priacess_¥ » the adiiiimal vesouries ne
requives.
a ;
5 exec
7.1 oF
32-1 Pool based appyoach> were 3h
> Tn_this Lp P¥00Un :
d H f
b Qveraky ae Ye allocation stad
OP 4 Syston
> | nekes _o. equess for a. eens at the
b Yesourte is free, it allo cates the ~vesourieg. “ip
v Ve. PY ofproum:
b
Fi Ady Wonbay ek >
: Allocated
| finy vegource Yequivement -Corin, he full-fiiled if
Moe vesouyce ts free.
> "1D isadvamtagess
Ovetheod of ing nd
- =e CULL coding aRecouyte Allocation Lap ;
[he “yerour a
— Lalo [apicaskion—ptaph is the_pictx vic epresemtotion —
take _of a System .
ne Mame suggests, Ahe_yesourte
lean graphs ts Complete normal
| chaste. holding
QU She instances of ot the resources
ar __being
Sed bathe” proc See.
| Im Resource < 1
}S_xe prekened by a ci¥cle while © yesour ce,
——H1s_ represented”
Le} e the 4ypea of extices and
e a ava) Jebor | @ i
[Nertices |
Process Vertex | Resources Verte x | !
@y)
1
I {
= \ tance uliple elastance, (
O ¢
DoOwU--ase: "vertices aye we mainly “of - “hua
and _pycess- Eady of them Swill ‘be sepsesentel
___by oa ditfoen slap —
+ Ciycle Yepresents process while 7 ie_re cane
— repent Ss -vegouyce:
a AD _Yesousce_can_haxe_Mmoxe c_thon One indane..
Each inStance_will be. Spaniel ya OQ
dat inside Vhe ye Cangle.
t T
| [Assign edzel WRequess elge\
| OQ) Qi
rt ¥
) l YR] &
d |
» il Edg ex iM RALA Ate also oF two types
b She walt of a near O resovYCe -
b
r Cpxoces2) py
7 =
Vv \
7 H | Resource] Resource]
,—1 Foy A yesource te ame
y |
7 |5 ;
Bis Pt Gok Pal andi tye types of
5)
x
hauin ims tance ead.
Recnls Jo Gi hay used
R ‘ fox ‘
L Pa Vs Wait RQ, ac wth
Gn Qo. a
The HOI, \S deallock free Since ma
ple i —beins foxmed_jn jne_grapl.
® @_@.
{a
PeIf acycle 4 being formed
B
>
>
>
atl jon>
cs
ee
the yesources have the ingle —S. instance
ln Case ‘of Resource alla Catina graph tila —
multi_imstances _vegource types cycle is a
dition of eau lock but of __
7 then he System +i deadio cked
F
F
7
TE we analyze She eal
out that Were ic a Sycle -fimet iy Mae pa
since the “ays TS Saticfyi the
| Gonditions_of deadlock: i— \ ource allocation. pl,
jel iy Ba —9rap
——anade for_eoch_of _the_yetourte—assigne|-—
: Fox_CXarmple,_jn_ne_fol\s sing omadik , On
emty is bein 4 below
Qs kince RO Ossignel to 0.
Proce R, Ro Q
P ° ° !
2. 1 0 0
P. o ! oO
Will be made fr each Of the -reroure vequested._
ho on . an
hag mae
Process R Ro R
|e, \ oO o
Or 0 \ oO
Qa Q 9 \
IZ
EKEGA
sine (0,00) >
ee -Hhev
u
fay resource availa sle_jn_4
o— Yoces ty veleages
S
: Each of the. ps pYocess eels oF —Leda+ single
@——_ttoure_to_Comp|ete. there fave ney will
g@—— continuously abe_holdivy cots nn_Oe “OF nem. —
+ | We comnos- F Rca fhe! demaml of Seo one
S| Ptoteas using the available vesource
os
ial
the sys! tem” is deadsoc | le
ed ou _detelemined Cater
shen ve detectel or cycle Mae geval. ____
Jeadlock Avoidance >
!
li
rmethod ts ysed by Ho opeeuattt np Serena tq
corde to check ‘alate ti system 1s
So |G | 5 | | © &
in_ovded% tO avo} J “the deadlocks, He proces
eee
mud nee sto +e the Opeleatiny sys tsta
alot the maxi mum ny YROUYCE,
Bb la PYOCEZs Com request jn avde%. “tO Gmplete
® i execution:+1 fly process Continues ike exe. curion ui
Hoes steam is_ na safe state: -
Once — the Sysrom enterc into _on_unsafe
S* Mae
Oe, ne Spevaly. Sysvem ‘noe do +oRe_
— With 4 help_of,adeadlock= avoidance
+ Alyovitam , you _Cotia_d
vehouvce = a ge sexe the — zl
ciyculas = Lolt Su odin __
Recconding, 4o the simplest omd_use ful
Wnoull de close __
She Maximim onumbes Of aeCourcrs of
oda type jt till need —_________
The algenitom of Leadlock ovoldance smnoth nly —§
CX) ne Me Ye
Thede Com ever |e an occurrence of
CY Culox puait Contin 4
Deoddlack Avoilouce Com anally be ston
width Yoc help of -Banke®'s. Algo) HasXGofe ami Umcofe crates —_
-| Soft. sraie>
AL erate is sofe © Ane cue
——|-Can allocate yesouvces to 00s provess "mn
>
Some _ovded Od shi! AVOL A deadlock.
[foemaly Ol Systeel isin d-Sakeetata—
e_exists Ol Soke Sequence
‘| So “a safe sitate_js nota deadlockel 7
—_| state and conveh: fe
is_an_uncafe etateé
‘|
Unsafe ¢tate>
In an unsafe
“At the job Qevel »
\uhen dhe job ts finished ound the
device _j¢ permanently Seledred=i sews ALL the t/o devices /os
peripheral devices can be Classifier into
neo the follouing. Vhene += on
Dedicated Deviceg>
Goch type of devices in
| She device mama ere dedicated on
— Ta fot seleaues :
ne job_ok A time oriil __
Z| Chased Devices >
“The devices Dike jaa, dsyurns
Lond othe dived eee devices Ose_shaned
\ evencl fob’ ut_a_sime. Hany yobs com
Lbé_vedut Frown ne Aya ot oO +time. “Were devices
Che eficienk but dF cull tp ‘Manage. .
\ G e
| Combinction of esi tel + cyase.s) and
| they Ane dedicated devices not have
beta tvansfovmey Vito Shanes devices.a
| Device Drivers >
| Device dyiveas ae 2S ke Aettoke
| mnodudes hy
yom_device_dvivtrs 4p Wnduatle al / 0
1
| devices.
=e
Sp
wi
Device drives encapsulade device=dependent Cole onl
foe _tya_bucla Oty __§
S5-——_Liny 1 mapleynend ot slandast_intesd
S53 [thas Cole ceonatan, desi cellapecl fy. wepitina i adsitak
Vint ctuyey and “Jelfael alan itl the
. gon:
devices om a CD-
Device | Device! |Device| [Device
i Wve! LDaiver anil
L L L
L Display Punter | Icp-ron |———
|Advice driver_perfaxme tne following
To_acept xequear from the device inde penlent,
ware abo
i OV to_jt-
“| Tate vat (itl fhe_device Controllex +o take __,
fameli L/o and Perioem—reeuiel_excem——,
+ re } ve —
| Gully :
See _veods or _bleck —*
ee ig idle at He i a ‘
equest ‘nex se-p—“HE Ane
Dee ea etapa
i Yequest, jt P1ocer thi
queue of pentling Yeques:
Aaoanm a aw @ eo ia le le lewQueeivivy the _digk—
Disk Boretuting is oso komtn oS HO sched ing
Disk Scheduling is im portant becouse—
Multiple “Lyo “ve quests may_omncive_ly Li Chexent
——_|_processea amd on
exved ot a kim the dish contollers Thu
by rar s
_ othe. “to requests nee.
€ be &chedviel- i
o_O Move Yequest Moy be for fram each
Othe 20 Can —xehurh in greates. dish Om_mavtrnent:
Hows drives Oke one of jhe 2 Somes parts of the
Comouitt Apyn Gna Snus Need toe accessed.
La
M_An_efAicient manne
Come important berms =
Spek Time s=
Cook -bime_la tne time ‘taken to Lacose
The disk om 40 0 Seecifyed rau whete Yoe_dader
Horn What Gaver emi imvn Ove vage. Acek tyme
ig _be trex -
WII]akionol_Lakency
athe hime taken toy Woe derives secre of -
Ae to yoboke. a {yp aes =_position
So Shak_it can access the vead/orite
ends:
——| So the dick scheduling algovi tam that gives
“minimum yotakinnad Loteny Vo |
3-1 Transfer Times
Transfer tyme is the Him
Ao_tvausfey the data
——| Tr depena om_the “okakiny gpeet_at the
Disk fheceac Times
Disk Acceas lime ic:-
pat
| Disk Queviny | Seek Roroxonol | Tomes |
Time L_Laten \e
(ae ee
Disk Necess Time
Dis Response Timea
SPSS Ho
eal:
“Disk Response Aime: >
Response “Time is the
Average of tine spen + by a_srequest salting
|_to_pevform is TJ _o persion + ____—__
: ver Response time 1S Yhe veaponsé tne of
Yequests+
* | Naxianc Response Time is measure OF Morus
indi vidugh vequest Ake Cericed Ute, erect
eee
bh
erage _Yerponse time.
Bion e eeapon se time ia better: :
!
we
B ¥ Agoxi :
= Yhys: >
w Atl ECES+ '
s FECES is the simplest of cll Yoe dint
ae hom:
wo
onde ney Qyrive in Ye disk queve.
| Advantages!
* Evey + Gets a faiy chance
|* No" ina eGite pastPone mest -
el
Disadvantaye:-
Does not yy 40 optimize seek mes
EE—tt Stand {oy on,
lovalver Yondom ouktyjbutes sucha tu womlen,
cet —Hime,— emda due. Ais. xomdom _§,
Hic __smacatne breakdowint,
—— Hat _algoritams t's itn ais perfed +
IWhichs “is (wloy ik ts usel_ for onl
——— Orn.onysis Oni’ aimulation. 7
-ILTEO>
Ones ive. vy ovder of viquents Yaak get 0
gedwuiced the job thai is newest ov Lata
emtehes iA Aedvicea Ayst ond Moen
dhe vest im the Aame over:
* _
a
-| Lym v
+ Can 2
ond if nets yequesrs Keep Coming tn,
|
Om eb.zi N= Srep Scan > >
TE a alo sna ion Ob Step
; Look _alsovi Hawn -
Tn this o buttele jx created for a vequestie
—__ Axe 4 ests. belon gin _+0_a_byffee till be
Treenicet JON.
‘| Aisa Once the ttlea_ is Sulla Ao Ae ko egrets —
ade Kept Haj s_buee. cond_os.e Senko
; | On Hoek one. -
<——_| Mow, When nese N_—vequerts Ge cofuiced, Wve —
: _Aime comes for anothe& 4 rs
: | this Woy au gph nequests acho So.
af rant. eB o Buice
BE SCAN
» iS b -
b {During the con PL eeqais te - yor queue.
b | Ade £eGNice) And Hae ne hacoming eQuUeAYS.
» ake. added to the second Queden f
pI Al mew rewests oxe Kept on holt unt) Ye
#) Rava Sa otge& > ________—
7 ESCA with _N-S:
t cep -SCAIV.
7 prevents “aym_stic Rad hbsomdoe ate aie
to penvice Yequesrs OF O% Ne.09. the Comet
rf ‘Poros
Eile >
: | file iso collec of velodel- ae
| Information that ts -yecovded/etoved On
iSecontavy %tovaye.
+ Files is7 O_S2quence_of bike, by tet, ner ov ecole ge
+ pA fle —nes_a_cerl Fal destined StaUchne onlay gt
ek
= ee =
SS =
inte Qines. =
| &
2. Source File =
| . =
(oy tten \n Yogev AI Jonguaye « &
i jon gulaye =
&
3-| Obiect file pObject files
\win_blocks Un eackemndabl tld ay stage
i Dinkea-
(i
A. | Fyecutable Cle
! Tt contoins code thot iS
PADD DDADODIDM