0 ratings0% found this document useful (0 votes) 17 views28 pagesUnit 5 Os
Operating System Notes Unit 5 AKTU
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
EE Ns ee ee eee
ae co)
Toput - output Managment £ dick s 7
Disk Scheduling
EE Oth : aah nt Disk oe 4
esminolo es: ‘|
Triersupt> ts thr mechanism which modules ”
Ky TP oy ‘mer, ma intevwer tu novinal eo
cPU, at be eithor ebicking @ Mouse y
oto CWUOY , painting a doc,
with Sreyupt | - .
Suppose ep astautts painter to pont o wxtain doc,
whib pride does me task, CPU “engaged i) ene
wing ohh take, i
Mand painter ta done wea us guar WEAK, , ih tells
a ye Pe wick cae ef cru
op. wastage [ tnofeuctlon nels
wel svanead 1 end bas ch de let of wot
OUN(* chanacen Athiam ot b ob blo > a characte stacy
duvice trandurs bytis one by one whyouas o block
AWICR —- EAANKEOLS Oe oor bytes as a Unit,
* sequential oy, Random accuss > sepunbod dr
thanghors data ina ma peed ed arclta whuuas vse of 2
wandom, olevice can instauct why duvice te aeek to OMY
q thu awailable data xtowage Location.
thanable device can be
% sharable or dedicated » a
pauses oy thads,
used coneurAunt: Ly by acral
a dedicated duirice” cant,
ae Bynchaonous oy Asynehonous > 6 nous olwict
is one that porte data + pos with pAt~
dictoble ubense time wih ah chronous dice
exhibit imuguiar oer adictoble Msbonse fine.
sation > device speeds a
si a iad oe fej
we RDLWR , RD only wk > sore curices feyorm,
bow Xp and or , but of! ory ene dy
ae tae patter fo es, veg
wpene AHHOUNUS wu hiclden os,
uoted Mae Sno my:
ae |* Blocking and _Non- Qlocking T/0 >
a Oapett a ah ayer call intesyace sselarfes 10
choice iw Blocking. & Non- singe
Nous) fp, when an app calls @ blodkin
the eweeution ef +h abp™ ww spun
1% moved from thr 05's Aun ya Ee
# KERNEL FO, SUBSYSTEM
Beourieas aAuatid to To Uke
Kesunels oe
“fp sihuduling , puylng ah ues
AUeWation and Woh tna
* Schedulin
- To preaull a set +
mine a oo «= OAL.
con improve overall ee poyormanct » 2m a
esses %& Ca
pie acess fell ane
i on siting time o tomplte,
+05 aac implument aphid Oo sohan ae
queue fos cath
te ae eo etal od
ploed on the que that “device.
fo seherlullr th orden ef thr queue to
athe 4
improve thu oveyae a ieeney & oud Aud ponge
Jo Aequests meang fo detei-
vc to txteute them,* eB Suyangs
7a b 1s a men, aa that stores data while
ou trans pion Pho » dwias os bw a device
7 app, Ousgoring ig done tps 3 seasons ~
) To cope with @ speed mismatch bj thr producer
2 eonsumen a a aata. Stream,
2) ood dup hol while pout buffer 16 wade +o
disk, A Second Use ey bute is 4o adapt
Yo qeviees Pak howe pet data “Haneje ee
3) To li topy semantics pene Ho,
a casni
, aC a mem, tat has coer
a a cached vopy 1g tore of
gent than ime to the onginal,
* Speoling an Device Reservation +
. spook ti a buy shat hott ofp. jor 2 anit
such OA printer that cant aceept Srdedeawed alate
enearns, The sposling sts copies the quel boo!
fv 4 th ea ore at a time.
_ In some 0S, Abe ue man ut
pre while In oe 0S, ‘to, Gs by kegel
yp Exe Handle
eopeee em, 09e%nst aifhy finds ane.
(or : fe Hy ® Opp |
iTeas Pat
* device Potivens > is o tmp. pry igush
highu- Jevel womb, pragen, to ee with Huo duit,
“a daver ' communicate with shy duice
acu thy tomb bus oy - comm ub - bby
tka ae Huy comes, hin ol py:
invokes a Aouting tm the driver, thr dive isculb
commands te the dwile,
One te divice sends data back to thy dyiver 5
tu daive, ™t. invoke Aoudings th the ity
peg: prlves Hio~ dipendurt & 08 ee
Categosins a4 _To_devias
© Human Readable -
sp suitably for ea vsty.
” pounten, torino 5 sty "yb mouse
© Me Readable - .
y suitable foo communicating with eloetronie ear ep -
ye disk duUves, vs, Aendovs , controulerrs
@® Cornrnuns catlon -
sy suitable for coremnyu ca woh yermstt devia
yp moderns ig Line § dsduergThree techniques py peporming Yo :
a Faogharim ed Yo
YU pAOULoy ® issuls ah Hp command on behalf Bf Oo
ss foam Fo module, that proerss then b wonils
for thy 9" to be complied before ae
x Intevuyst- duven Yo
“thy paoussos dsULs a Fo cmd om behary of 0 proUrrs.
TH Non blocking - prowssos continiws fo exrtucts beh -
chon prom shy prouss thot Bsurd To und
4 blading = ent ingiaue, Hy rrourses executes 4s
pam ty Cos) whch Pha pune ss
) blocked Atote & schedule, anotr pArouss,
ye DIAL Meum Arceess (DMA)
a DMA medule conteols tty xchange cs data Hew
mm ard an Yo module. :
No Infomupls | ese. snteuagts
o¥ To to mem. In - dt
Crono Omagh» PRpenmred | NOT
pee”
y piseck Tfo- te SMO
mem, tron, 7 ioIn aa
eS
a) No bupyyoung
—OS Usey process
Device 4
b) sing ouyyeng
~ Oo usey_process
a c.
oevice
© Double ouyeeg
a prowss can “hanstr data to oy from one buffue
while are 0S emphits or” ills. th oF buyyer,
miso Wow ab buff Suopping.
= |
Fo, » (5 Move |
Pe ade
a) Chaculas Gugfesing
cath dividual bute 4s one urict tn 0 Groular
buyfol, used when fo apy muak keep up wre
ioeSECONDARY STORAGE AND DISK ScHEOULING
See, pred cleviets Cou those duviws whose men: .
Non volatiles abo Ka Auxilian tiovage
sto RAMS
Wwe expensive compared
* Le spud = & magnetic dik , magnetic, TSP »
semoval thumb drives tt. wu
An
Magnetic Disk Sauer: i.
3 WN
7 ert
= o
track
8 eUtOy
Saas —rh RIW
te head.
plaster F
Stuer of clés
toehTrack ao thy darme distance fom trdey fom a BY
Gnd, A Rtad- walt head ¥ used to read data
orm a SedOR. + thy magnetic disk,
thy du 4s Ceauned as 2 posts —
Randory atts tien,
mang an 2 i
The — speed of
Prange, Ratt and
Seek time ss time taken th locati
a specified jrack, whir
be wattspfed,
Rotational Latency > time taken by thr dudived 4edor
to Aobake ese! to Hy posttion fon whrs 7 an.
acess thi Rw heads.
rans _fime > ene taken bo txansr ty data.
pick Acuss tine > Rotational , seek 4 TARDE}
\ + time fame
pisk Rusporse time > Og. tiene spent by earh
August sali fos the Ho &.
Purpose dick, weed
al gust fre hy queue a TO
uurk 0 disk ibe
mguists & duce dh schedule when this Aeques
wy be paowséed ,
Goals! + Fatinuyg ye High TRaouphput
* mini™ weapns head Heme.EX Givens no Of ‘platers= 6,
no. tarks= Q56, nb, stor, = SID
cata stered on each Uttoy= 542 kB.
iaaerii Total Awartg = Ox 2 = AG
caer (kh= Ox 2" 956
(2 sides) tote) Fraeks
y total dettors= OH 2* Q56 % SID
THOLK, ) 4
ce a pick IZ
swyaer * track + Sedoy
Sectors 9 Pl = we Data
v
poia 2 B*¥ VX 2sG # S12 Mw SI2ZK
le oe mnie,
; disk Aze
No, Of bus vega. to aloe |
> © > fo bie] | beDisk _Seheduli ng Atgonitthma @
UW) Fleet Comme Fivct Sewe (PCRS)
snacks (9 - 199) Reamest
wh A disk contains 200 ;
“queue eontaing txaek mo. 62, 140, 43, 140924, 497
190 cuban pest RIw head = 50» caveats
total no: ab raack movement by Rw Head,
140 190
° 4 0
4 ta ued Pe
i : ® ;
(
( ‘ ‘
! om) | '
é | |
!
;
{
4
\
/
{
©
j
4 |
fp
4
82-50 +32 140 - 43 = 184 typ -24 = 116
1zo- 62 = 6B Iyo- Y3= OF 4-6 = B
so-ss= 94 at» [6],
(140-50) + (190-43) + (140-43) + Ciyo~ aarig) 4
C190 -16) 3 [642 gw
ody): NO EHOINOLLON
ied 2% Poor performancs. x not epi dent
== —
(2) Shortest sek Time First (SSTF) |
ee A disk, consains doo taacks (0- 197) Requedt”
que epntarng — EAADK No BR, 10, 43, 1H, ay, 16,)90°)
ewnint position ef Rjw head = 50. % Rw
cokes dans to move from one wack to another,’
tun botal «terme taken P
° 24 4s 50 2 140 190 go 14
rt j \ 2 ~ | Tt tT |
\ { ’
14 O% ; { { \
1@ \
Sel |
8 4 @ | |
j\ 2s
{ }
‘ |
{ {
fotal time = (50-16) + (igo-16) = (208) ,,
aga" oe optimal Ruut =» Sek UMe ryeduesal
yi SHO aLLON, + yome Acq ™t wait for
Lo duration
4 overhead 4 Out wwemy step , qnd which one
: tre INO8) SCAN nithm. eS)
SK 82, 140, 48, 440, 24, 16, 190, cworent Rio head =
din® towards the Langer value.
Dg 2H 3 50 82 No yo?
Scania oO mes i i
4 ee! 5 s
( ( _ 9
: ) 1 | a 2 g
' 1 1 <
; ; i ( © ! : ;
: ( er ual : ) {
© | @ +4 fy
{ ‘ 1 4
eee GH, | HI
«4 tiagtse) + (199-16) = : oa
af y4 exteucty
aody once te du, qu tant
a Tod = Cs unt, gous fincthed te -
ofners,
(4) ¢-StAN Ath
: ra ia t 50 $2 Yo Re got
i +
1 * aa ® \ f (
ore! ‘ [ a)
( 5 {_ __—
\ ¢ [ace
\ Se \ { VT
it
_ ; / bai
keri |
© ! ! ! \
~S
‘
\ (
(1 lense) +! 99-94! (49-0) 9 ‘waz |rimproued — v ertston G SUN algo,
x head move Jaom one end to thr ofhes of Hy
ak shite stung al squats In bro
wallet time “um acciterd wompaud to SAN
». beter musponse teme
a move Seek movements
ye th the Oe ho veg. ft
head ust tL KL to th
Jo be Sexwied the
ed 8 cuk,
(5) LOOK algoritam
62, 140, Gi iyo, 24, 16, 190 Cowands ordi)
° 1G 24 43° 50 82 Yo 0 yo. (7
+=}
=u , Toe een ese a!
1
(
| @ {4
‘ \ ~O,
(
é
; ‘ ©
i: @ ant
a
ns cep
Lal 7 { | {
+ i. ke ' : r ( \
it \ j '
aNo aud ty 4 the end hoe |
(190- 50) + (90-16) = [au],
rook 4s bette, thay SUAN ae che Rutter
[Link].
a No ¥tasvali ov
anode + ovdduad nding ord weg, 33 preset oy
not,6) C- LOOK a @6)
pee Cees ah aor ie Ee
+ Se
\ } ie
S__@®
{
(
(
(ig0- 50) + (190-18) + (43-16) =
np nud te move, bil thr ond.
me woe HME
4 Petter _ pete aU co than Look
spade overhead - findiug ond wg ib pousenr
RAID (Redundant Ayaays of pa
Dieks) ¢ 1g a technique which yu vse “a
comb” of mudtiplr disks ingtead wang “tn
disk jos Ved ee data Raia:
why data s&rdundane
alrough takin vp peel Apa , adds to disk xuia—
, pitty: cnge of disk YOiLUAL, “Y sam data
1 5 out ip en Sh dw ah aie
p au data & go on with the op On shu oth hand,
eethr dota
Si ty RAID Cee ee a life
tan affeek tht thing doa,
ne waluation peint for RAID !
* Ruiohitity > how many disk faults avr thi s _ folevats?
¥ Avodlabi li iUity > haw qwailabl, & th ay. jor actu) use?
‘ah DMANL > How good Ls thy Atgbonese time ? How
is tty ua
+ Bi sin 2a N disks eath with B
put wdypul wpadty uw aundlabte tony
RAID lwels
RAID deviod WL make ude of diff. youdonds » Cauled
revels. § 6 Lwels - o + 54 ;
© raid-o stsiping ) Blocks au ‘striped’ aernes LUKE.
Se PORE AR |
0 4 Os 3
4/5 6 #
8 | 4 to n
2 | 13 14 15
Bloke "01, 1," "2 and "3" for 0 xbubesnetead of plash just one block, thty a disk
a a Hoe, we can “work wiih tayo (oh. move)
| blocks patra into a disk, before roving ontp thi
Rert Prove,
Avawation ¢ > Relicbiity +0 ) {No [Link] ) lune,
ta block once Lort cast} be, veeovend ,
* tapasity, N& ® A eT
bton data, Xiner, thie ke no duplication, y N disks
eorh having B blocks ase Se udilitd,
® RAIw- 4 into) move than one copy of
each sh block | a Auparote disk, thud, even
block has 2 oy move , eobies y ot 2 a disks,
[Dik o| Owns | ouk 2] ObkS |
4
9 0 a
2/2 | 28] 3
| 4/ 4 |. 5 2
[ el 6 + | t
Evaluation ; ‘ : ‘ }
* BUiobiUty + £ to N/2.. disk O and 2 Jails then,
vu can be handtd Oisk 4 and 3. to, IN
pur se , . Nio dk gould ean be handled,
w apottty 9 N# fp anne ahaa
Stove dada othr haty ts put minor to alatady” sstorgal@ RAIM- 2 W sowed sw wrveting code on aadi-
Bonal disks, alvowi fer ony d d data to be
Aonstrtted, Wubtaccetion — from hemor undo
ql data, this! honey xeybus only Ae eae.
aUKS to protect 4 disk date vasooing ait }
® enld-3 atmitag to Mwel-2.,4 eats acluondage
enn atk thot eath disk is Au dofng. ts aon
don adetion, tinge parity bit iy a
netdel to Abcoutd tht Lort data fromm an anirG Sf
Wk, The downeds with th pasdhy approach *
wey AK, muse Na disk Ot 9
i pity pus mut be eonstande ealelatrd anol
' ew
chekid, mauting — pexjormanct,
© raid. 4 (eid Level aiping with uAleatad
pasty ) anétrad auptteating dota, thas - adopte
a pastity based approach,
SS
pisk O
one LolUunnn task) 5 dulftated +o pathyTh bie ok (0,0, 0, £) panty hips 4 @)
(x0 (6,0, = 4) en on op #5
in parity © and ead no, of onds weulis £.
Y allowS us to Alsouth {out data
ewoluadkon
ao ReLioblUty : 1 RAID-4 allavs setov atmo 4
AR gallant, of move than 4 disk sau y thoy
Mo way to Auouer. the data,
+ tiby } (N-1) #6 ip
ap ‘y yeuewed tr ashing 4
one disk th ty
tN-4) daks ae made available or
ity. Hones,
Pa rowag 5 eath dK houkng B blocks,
@ eow-5 (worke wet Helping with, Ouibuthd
Parity) ath sight modf{eation a RAID: Y ays.
ae only dif Ah party Antony anna
uy dives,
avKO | diskt Jake [dik [disk 4]
o | it 2 | 3 P
5 6 + | PR 4
JO 1 Po, 8 9
15 m | 2 13 UW
Py 16 \, \9 10 | 3)ds Utroduutod to make. yandom whit pecformane.
betes, .
yaluatior + * RWabiity 241 RAIO-5 allows
AULDUDYY Gtrost 1 disk fal. Solenbicat to Rap.
+ capacity » (N-4) #R :
moo 4
8) RAID 0 No Aldunolars siaipi ng
Aaooo ta
oooo aa
HRAID 2D! memory sbyle erry corvetind weg
aoc0d
d).RAID 3: Bu ntecaved pasty
sera.
e) RAID 4 + Block ‘whedeaved pasty
gooood
$) RNP S + flotk wntenteaved dudibuted pouty.FILE SYSTEM
File AuiAibutee: diy. OS keep Anaek of dify- sie
ant a4 burs including -
se Name > exentinsions (. tet, »exe de), Borne Os gle
spel sige ficou to nares % dome dod t,
Tauifitr = ey inmode number
* Type > tet, exeetable, other binasuy otc.
xe Location y on te haxd doave
a size > ty bytes ys EB id a fey OUBtOY |
wR aces, exer
» protetdion 4 RD attlss, a
Last medi pi
xdatr .
% Time % Date» pL cuation time y
“File _operadions + _
creating se NII a ReadIN x Reposition |
: a * ern caching yu
' 5 |
File THRE peual e-rension qunction
executable exe, com, bin oY yeady -to-YU
” none myc } popam
eormpiled , Mc lan
yw obyeet ob, , 0 pile rte b
gout tot =e, Ce, JOA, = — > sowter wot ny
at ped, ase Vartous Lang.
‘ emds to thy und
ae bach dt als 4 yaa masckup xt, renal, tex textual dado y
dou tends
x word xml, Ath , docx varies worl
Prouscor b» prousses formats
x Hbrrosuy Ub, a, so, dU ats sen hy
oe pay gibs Pay, bg ; 3 ow vy i
hinang oy viewing
a onehive Aon py Ear —> Auated pus groupe
i coruprasctel gos, awchiving «
tovege ,
4 Mudtionedia meV, i
. we he “ing bu pes venta
Act “CESS METHOD 5
File ones Tmushanum Airs fe the mannus fy which
thi Attoncls of su peal Be teres
Aoweral wang to AUK files ~
* sequential = pirveet/ Ranclom a Sn dled
sequential | Picetss > aecovde axe acerserd iin Some
Seqner ie, thu ‘info. ty thy furs prowssed Sr
ordi, one Attond aftzr the oth, ex. cern pilerg
usudlly orcs ies ty thy fashion,dy Dink / Random Acewls > @)
ae provids anussing the Atcords diaretey.
* eath xatcord has i own add, on wu +l wlth by-
tu help which it an be directly aceuscecl {P
Atadi ov wm
a the “Auovds nud not be in Sequence within the
fue and thu nad net be in adyacerst Ancoctions On
th srohayt medi,
3) dndixed Sequential Access »
se this muchanism is but up on base aq) sequntiol
se An indig created for each file which contains
pointers to various blocks. ; .
ae Sno “Ue Geancheol Sequerky 2, ud pointe, 44
used te ates tr He di ; j
SPACE ALLOCATION : juss’ @u allocated isk apace’
08. 05 deploy — fello. 3 ways auocate disk,
spares to files,
* conkiquous * Linked
Contique allocation > eveupus conbiguouwt add, spac
on abk, arston add, in Lnean , to
wpument, —.cA@cnod spragnnental™ - Mager issue.
Linked allocation » » casos a, fist of Links, is \
~ No exseunay pragmnented ; locks
+ sneptioent "wy cue “dy pheeh aterss file
4 SndexedIndexed atlocation > Sol” ton tld
Pike bol” for ontiquotis and Uinked
Ra ardu blouk & woatd having ay pointers
each eb has Us own indie block ushieh loves
the addisy. of disk sbaee oceupled a thi feb.
a dihtttony contain, thy aalder). af oelex blocks Of
Fxte__ Space Management re .
onothu omy, ob olisk, maint ts keeping tk,
of and = allow free spaee,
) BE VEttor’s use bie Utetor approach. » in which.
earn bit ents a disk block, stb fo 4 th
gree oh OO 4 ALtocated., : ,
3) Uinktd List > used to ktep tAack, of au qr locks.
* Enawensing khe | List oF fndiurg a block, 4s not easy
but not 2 Yas well,
% add] Aermove block prom hy bepinnitg
4 FAT babu fueps teask of any YM
( Fle olocation +N) an : ; a :
3) Geaping variation on Lunked Lost quo lish 4
to ube Hinks ao blocks 4 indias 4 fue blocks.
a, 0 lock holds upto N° addes}. « then {ou ble
in the Unkid- 22st wontaing upto N-4 adden § pee
bloeKs a poidte to thy nent block of thy 4rter adds,
4) courting > when thoy an muitiple eontiquous
a du Haxting adds. tay grou % no, of
bh fut,
mi aesconti tau blocks, AS Long as ahi cwsg ten, Gi)
a mi Us Neo blocks & quae.
os dhe eh oa soul in pace ruedact
for the tau ist,
Ghoup of fuLs combined; iit
A didtetony eontaing all ‘info, about, plu % ee
aatatbutes, can be viewed a4 a symbol ta
that taansbates ily names into Thuy eee
Typ: + 3h Level diretto
ye sd
* —Taee Stauttued
© singe tevel ; au ty fu belong t 0 single die,
adu. * e te implement.
a acdiun
~ dvd. yay pilus belong to one same due
st ad a hau nd a with Maten find
se ysene doesit+ have aption ts ee eles ee
the neds,
@ Two level: eath usen has Us own ust fue
aunestory (UFD), the UFDs have simelat stAue,,
inet ste ae Any fs Of aingls 02).
when o user gob pross! or usey Logs Wy thy sys.
porns Master ti (MPD) is seasethed, He,
se att ee a eS) apotheke
FILE DIRECTORIES :
p as known a4 piaittonyomits to th ~UFD. fos that Use,
aga! > cepfidend — > more ateuune
wb, As soled,
ve aus wens ps
vse “on bal Au ate eoume Name An.
en own Aiseetorl ed,
spo);
— No 2 fulus for single us
+ Gaouping problem.
pw to kb wvels, tres a pa name for PG
yu te toca that fH.
Aas
en ean HWE AONE 9
® Tace Atruciwteal +
pincerony ts mainkeuned in tht form 4
qyident and wwu bs
a ee
a=
seanching is
pability. we have absolute or suiatve path ame
et He wh | ,
od tan haye sune Names, | au
np He abs ae v4 a
* Mqpouping pessitle.
Dyredory eee
Linear List Hash Table
gf Bend conan i oe NUK aearith time
To creaky new Py » ¥ Unseition) debetl easy
arenes Ou aber be . Problem | aaa
foo me ey y gicced size
Borne ohne ete al w Hash table ic ifarden ban
(Bares fpr dat) ys ygstath AP on hed she,File. a
| _Shoaing : is tht pubte / paivale shoring d @)
comp dada ‘oh spate wa nw witb ees
A Ones ivilege,
> allows nOv { pp
by come comb” — of being
Wr", waitt oF modify ‘thy PH
pactowle ; FTP, SMTP
did geeuntty 4» snconsisteney RecULne)
% unantivpard queries > cant hand. udder qulrus
* coneuakenty ae drougaity .
Examples; y AIM (AOL Instant Messenger)
¥ e- buddy y TRM LOTUS 4 Meebo
Windows® Live Messengor yw Yahoo Messenger
File System « *e an abstaattion to Ate, petnieut *
pao a fet a fs. at 1s atapondile for ov
% 4 cuovies & kueping. | taark which.
so e_, teng fH Gls EN
mae ma dota
i . ed cuntess to th stho
" erage gwailable spore ©} ut duiees
we
puts *
pshich aang
o*# So file syatem (HPS) par yy
yp y File aumcation 7 UAT) < FaTIg
rar 32
a new Technology File sytem (NTFS)
Y to use thy 4arne 4 gle
able to Atad oF vied
it ov print 4t,Atraxks on thy fir Bystene :
y» Rare condition
a using ADS (Auiernais bate” Bikar) to hile plas
- sity tacuvebal.
How cloes thy fl x wm ensure cata entry 5
%& —Precess eoretaol
% Encayption encryption ; ae
ih Ten mee (DFS)
CeeS fu 8
* RAID
: Roeovesy when data is wossupted
Lphecksum codes
[portly schemes
—_—r% —