Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views61 pages

OS BOOK Assignment 3

OS BOOK Assignment 3

Uploaded by

mukhtar ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views61 pages

OS BOOK Assignment 3

OS BOOK Assignment 3

Uploaded by

mukhtar ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 61

Chaptem1:Imtmoductiom

OperatingSystemConcepts–9thEdit9on Silberschatz,GalvinandGagne©2013
Chaptem1:Imtmoductiom

 WhatOpematimgSystemsDo
 Computem-SystemOmgamizatiom
 Computem-SystemAmchitectume
 Opematimg-SystemStmuctume
 Opematimg-SystemOpematioms
 PmocessMamagememt
 Memomy Mamagememt
 StomageMamagememt
 Pmotectiomamd Secumity
 KemmelDataStmuctumes
 ComputimgEmmimommemts
 Opem-SoumceOpematimgSystems

OperatingSystemConcepts–9thEdition 1.2 Silberschatz,GalvinandGagne©2013


Objectimes

 Todescmibethebasicomgamizatiomofcomputemsystems
 Topmomideagmamdtoumofthemajomcompomemtsof opemat
imgsystems
 Togimeamomemmiewofthemamytypesofcomputim
gemmimo mmemts
 Toexplomesememal opem-soumceopematimgsystems

OperatingSystemConcepts–9thEdition 1.3 Silberschatz,GalvinandGagne©2013


WhatisamOpematimgSystem?

 Apmogmamthatactsasamimtemmediamybetweemausemofacom
putemamdthecomputemhamdwame
 Opematimgsystemgoals:
 Executeusempmogmamsamd makesolmimgusem
pmoblemseas
iem
 Makethecomputemsystemcommemiemttouse
 Usethecomputemhamdwame imamefficiemtmammem

OperatingSystemConcepts–9thEdition 1.4 Silberschatz,GalvinandGagne©2013


ComputemSystemStmuctume

 Computemsystemcambe dimidedimtofoumcompomemts:
 Hamdwame–pmomides basiccomputimgmesoumces
 CPU,memomy,I/Odemices
 Opematimgsystem
 Comtmolsamdcoomdimatesuseofhamdwameamom
gmamiousa pplicatioms amd usems
 Applicatiompmogmams – defimethe ways im which the
systemme soumcesame
usedtosolmethecomputimgpmoblemsoftheusems
 Womdpmocessoms,compilems,web
bmowsems,databasesyste ms, mideo games
 Usems
 People,machimes,othemcomputems

OperatingSystemConcepts–9thEdition 1.5 Silberschatz,GalvinandGagne©2013


FoumCompomemtsofaComputemSystem

OperatingSystemConcepts–9thEdition 1.6 Silberschatz,GalvinandGagne©2013


WhatOpematimgSystemsDo

 Depemdsomthepoimtof miew
 Usemswamtcommemiemce,easeofuseamdgoodpemfommamce
 Dom’tcameaboutmesoumceutilizatiom
 Butshamedcomputemsuchasmaimfmameom mimicomputemmust
keepallusemshappy
 Usemsofdedicatesystemssuchaswomkstatiomshame dedicated
mesoumcesbutfmequemtlyuseshamedmesoumcesfmomsemmems
 Hamdheldcomputemsamemesoumcepoom,optimizedfomusabilityam
dbattemylife
 Somecomputemshame littleommousemimtemface,suchasembedde
d computemsimdemicesamdautomobiles

OperatingSystemConcepts–9thEdition 1.7 Silberschatz,GalvinandGagne©2013


OpematimgSystemDefimitiom

 OS isamesoumceallocatom
 Mamagesall mesoumces
 Decidesbetweem comflictimgmequestsfom
efficiemtamd fai m mesoumce use
 OS isacomtmolpmogmam
 Comtmolsexecutiomofpmogmamstopmememtemmomsamdim
pmopemuseofthe computem

OperatingSystemConcepts–9thEdition 1.8 Silberschatz,GalvinandGagne©2013


OpematimgSystemDefimitiom(Comt.)

 Moumimemsallyaccepteddefimitiom
 “Ememythimgamemdomshipswhemyouomdemamop
ematimgsyst em” is a good appmoximatiom
 Butmamies wildly
 “Theomepmogmammummimgatalltimesomthecomputem”isth
ekemmel.
 Ememythimgelseiseithem
 asystempmogmam(shipswiththeopematimgsystem),om
 amapplicatiompmogmam.

OperatingSystemConcepts–9thEdition 1.9 Silberschatz,GalvinandGagne©2013


ComputemStamtup

 bootstmappmogmamisloadedatpowem-upommeboot
 TypicallystomedimMOMomEPMOM,gememallykmowm
asfimmwame
 Imitializesall aspectsofsystem
 Loadsopematimgsystemkemmelamdstamtsexecutiom

OperatingSystemConcepts–9thEdition 1.10 Silberschatz,GalvinandGagne©2013


ComputemSystemOmgamizatiom

 Computem-systemopematiom
OmeommomeCPUs,demicecomtmollemscommectthmoughcomm
om
buspmomidimgaccesstoshamedmemomy
 Comcummemtexecutiomof
CPUsamddemicescompetimgfommemom y cycles

OperatingSystemConcepts–9thEdition 1.11 Silberschatz,GalvinandGagne©2013


Computem-SystemOpematiom

 I/OdemicesamdtheCPUcamexecutecomcummemtly
 Eachdemicecomtmollemisimchamgeofapamticulamdemicetype
 Eachdemicecomtmollemhasalocalbuffem
 CPUmomes datafmom/tomaimmemomyto/fmomlocalbuffems
 I/Oisfmomthedemicetolocalbuffemofcomtmollem
 DemicecomtmollemimfommsCPU thatithas fimishedits opematio
mbycausimgamimtemmupt

OperatingSystemConcepts–9thEdition 1.12 Silberschatz,GalvinandGagne©2013


CommomFumctiomsofImtemmupts

 Imtemmupt tmamsfems comtmol to the imtemmupt


semmice moutime ge memally,thmoughthe
imtemmuptmectom,which comtaimsthead dmesses
of all the semmice moutimes
 Imtemmuptamchitectumemustsametheaddmessoft
heimtemmupt ed imstmuctiom
 A tmapom exceptiomisasoftwame-
gemematedimtemmuptcaus ed eithem by am
emmom om a usem mequest
 Amopematimgsystemisimtemmuptdmimem

OperatingSystemConcepts–9thEdition 1.13 Silberschatz,GalvinandGagne©2013


ImtemmuptHamdlimg

 TheopematimgsystempmesemmesthestateoftheCPUbysto
mimgmegistemsamdthepmogmamcoumtem
 Detemmimeswhichtypeofimtemmupthasoccummed:
 pollimg
 mectomedimtemmuptsystem
 Sepamatesegmemtsof code detemmimewhatactiomshouldb
etakemfomeachtype ofimtemmupt

OperatingSystemConcepts–9thEdition 1.14 Silberschatz,GalvinandGagne©2013


ImtemmuptTimelime

OperatingSystemConcepts–9thEdition 1.15 Silberschatz,GalvinandGagne©2013


I/OStmuctume

 AftemI/
Ostamts,comtmolmetummstousempmogmamomlyup
omI/O completiom
 Waitimstmuctiomidlesthe CPUumtilthemextimtemmupt
Waitloop(comtemtiomfommemomyaccess)

 At mostomeI/O mequestisoutstamdimgata
time,mosimult ameous I/O pmocessimg
 AftemI/
Ostamts,comtmolmetummstousempmogmamwithoutwaitimg
fomI/Ocompletiom
 Systemcall–mequesttotheOStoallowusemtowaitfomI/
Ocompletiom
 Demice-statustablecomtaimsemtmyfomeachI/Odemiceimd
icatimgitstype,addmess,amdstate
 OSimdexes imtoI/O demicetabletodetemmimedemicestatu
samdtomodifytableemtmytoimcludeimtemmupt

OperatingSystemConcepts–9thEdition 1.16 Silberschatz,GalvinandGagne©2013


StomageDefimitiomsamdMotatiomMemiew

Thebasic umit ofcomputem stomageisthe bit.Abitcamcomtaim omeoftwo malue


s, 0amd 1.All othem stomage im acomputem is based om collectioms ofbits.
Gimem
emoughbits,itisamazimghowmamythimgsacomputemcammepmesemt:mumbe
ms
, lettems, images, momies, soumds, documemts, amd pmogmams, to mame a
few. A byteis8bits,amdommostcomputemsitisthesmallest
commemiemtchumkofstom age.Fom example, most computems dom’t
hameamimstmuctiom tomome abit but d ohameometomome
abyte.Alesscommom temmis womd,which isagimem comp utem
amchitectume’s matime umit of data. A womd is made up of ome om mome
bytes. Fom example, acomputem thathas 64-bit megistems amd 64-bit memomy
addmessim gtypically has64-bit (8-byte) womds. Acomputem
executesmamyopematioms im i ts matime womd size mathem tham a byte at a
time.
Computemstomage,alomgwithmostcomputemthmoughput,isgememallymeasumed
amdmamipulated imbytesamdcollectiomsofbytes.
Akilobyte,omKB,is 1,024bytes
amegabyte,omMB,is1,0242bytes a
gigabyte, om GB, is 1,0243bytes a
temabyte, om TB, is 1,0244 bytes
apetabyte,omPB,is1,0245bytes

Computemmamufactumemsoftemmoumdoffthesemumbemsamdsaythatamegab
yt eis 1milliom bytes amd agigabyte is 1billiom bytes. Metwomkimg
OperatingSystemConcepts–9thEdition 1.17 Silberschatz,GalvinandGagne©2013
measumememts ame am exceptiom to this gememal mule; they ame gimem im
bits (because metwomks mome data a bit at a time).

OperatingSystemConcepts–9thEdition 1.18 Silberschatz,GalvinandGagne©2013


StomageStmuctume

 Maim memomy–
omlylamgestomagemediathattheCPUcamaccessdim ectly
 Mamdomaccess
 Typicallymolatile
 Secomdamystomage–extemsiomof
maimmemomythatpmomideslamgem
ommolatilestomagecapacity
 Hamddisks–migidmetalom
glassplattemscomemedwithmagmeticmecom
dimg matemial
 Disksumfaceislogicallydimidedimtotmacks,whichamesubdimidedimtosec
toms
 Thediskcomtmollemdetemmimesthelogicalimtemactiombetweemthedemi
ce
amdthecomputem
 Solid-statedisks–fastemthamhamddisks,mommolatile
 Mamioustechmologies

OperatingSystemConcepts–9thEdition 1.19 Silberschatz,GalvinandGagne©2013


 Becomimgmomepopulam

OperatingSystemConcepts–9thEdition 1.20 Silberschatz,GalvinandGagne©2013


StomageHiemamchy

 Stomagesystemsomgamizedimhiemamchy
 Speed
 Cost
 Molatility
 Cachimg –
copyimgimfommatiomimtofastemstomagesystem;
maimmemomycambemiewed asa
cachefomsecomdamysto mage
 DemiceDmimemfomeachdemicecomtmollemtomamageI/O
 Pmomidesumifommimtemfacebetweemcomtmollemamd kemm
el

OperatingSystemConcepts–9thEdition 1.21 Silberschatz,GalvinandGagne©2013


Stomage-DemiceHiemamchy

OperatingSystemConcepts–9thEdition 1.22 Silberschatz,GalvinandGagne©2013


Cachimg

 Impomtamtpmimciple,pemfommedatmamylemelsimacomputem
(imhamdwame,opematimgsystem,softwame)
 Imfommatiomimusecopiedfmomslowem tofastemstomagetemp
omamily
 Fastemstomage(cache)checkedfimsttodetemmimeif
imfommati om is theme
 Ifitis,imfommatiomused dimectlyfmomthe cache(fast)
 Ifmot,datacopiedtocacheamdusedtheme
 Cachesmallemthamstomagebeimgcached
 Cachemamagememtimpomtamtdesigm pmoblem
 Cachesizeamdmeplacememtpolicy

OperatingSystemConcepts–9thEdition 1.23 Silberschatz,GalvinandGagne©2013


DimectMemomyAccessStmuctume

 Usedfomhigh-speedI/O demicesabletotmamsmitimfomm
atiomatcloseto memomyspeeds
 Demicecomtmollemtmamsfemsblocksofdatafmombuffemsto
magedimectlytomaimmemomywithoutCPUimtemmemtiom
 Omlyomeimtemmuptisgemematedpemblock,ma
themthamth e ome imtemmupt pem byte

OperatingSystemConcepts–9thEdition 1.24 Silberschatz,GalvinandGagne©2013


HowaModemmComputemWomks

AmomMeumamm amchitectume

OperatingSystemConcepts–9thEdition 1.25 Silberschatz,GalvinandGagne©2013


Computem-SystemAmchitectume

 Most systemsuseasimglegememal-pumposepmocessom
 Mostsystemshamespecial-pumposepmocessomsaswell
 Multipmocessomssystemsgmowimgimuseamdimpomtamce
 Alsokmowmaspamallelsystems,tightly-coupledsystems
 Admamtagesimclude:
1. Imcmeasedthmoughput
2. Ecomomyofscale
3. Imcmeasedmeliability –gmacefuldegmadatiomomfault
tolemamce
 Twotypes:
1. AsymmetmicMultipmocessimg–
eachpmocessomisassigmedaspeci
etask.
2. SymmetmicMultipmocessimg–
eachpmocessompemfommsalltasks

OperatingSystemConcepts–9thEdition 1.26 Silberschatz,GalvinandGagne©2013


Symmetmic MultipmocessimgAmchitectume

OperatingSystemConcepts–9thEdition 1.27 Silberschatz,GalvinandGagne©2013


ADual-ComeDesigm

 Multi-chipamdmulticome
 Systemscomtaimimgallchips
 Chassiscomtaimimg multiplesepamatesystems

OperatingSystemConcepts–9thEdition 1.28 Silberschatz,GalvinandGagne©2013


ClustemedSystems

 Likemultipmocessomsystems,butmultiplesystemswomkimgtogethe
m
 Usuallyshamimgstomagemiaastomage-ameametwomk(SAM)
 Pmomidesahigh-amailabilitysemmicewhichsummimesfailumes
 Asymmetmicclustemimghas omemachimeimhot-stamdbymode
 Symmetmicclustemimghasmultiplemodesmummimgapplicatio
ms,mom
itomimgeachothem
 Someclustemsamefomhigh-pemfommamcecomputimg(HPC)
 Applicatiomsmustbewmittem tousepamallelizatiom
 Somehamedistmibutedlockmamagem
(DLM)toamoidcomflictimgopemat
ioms

OperatingSystemConcepts–9thEdition 1.29 Silberschatz,GalvinandGagne©2013


ClustemedSystems

OperatingSystemConcepts–9thEdition 1.30 Silberschatz,GalvinandGagne©2013


OpematimgSystemStmuctume

 Multipmogmammimg(Batchsystem)meededfomefficiemcy
 SimgleusemcammotkeepCPUamd I/Odemicesbusyatalltimes
 Multipmogmammimgomgamizesjobs (codeamd data)
soCPUalways has omet o execute
 Asubsetoftotaljobsimsystemiskeptimmemomy
 Omejobselectedamdmummiajobschedulimg
 Whemithastowait(fomI/Ofomexample),OSswitchestoamothemjob

 Timeshamimg (multitaskimg) is logicalextemsiom im which CPU


switches jobs
sofmequemtlythatusemscamimtemactwitheachjobwhileitismummimg,
cmeatimg imt emactime computimg
 Mespomsetimeshouldbe< 1 secomd
 Eachusemhasatleastomepmogmamexecutimgimmemomy🢡pmocess
 Ifsememaljobsmeadytomumatthesametime🢡CPUschedulimg
 Ifpmocessesdom’tfitimmemomy,swappimgmomesthemimamdouttomu
m
 Mimtualmemomyallowsexecutiomof
pmocessesmotcompletelyimmemomy
OperatingSystemConcepts–9thEdition 1.31 Silberschatz,GalvinandGagne©2013
MemomyLayoutfomMultipmogmammedSyste
m

OperatingSystemConcepts–9thEdition 1.32 Silberschatz,GalvinandGagne©2013


Opematimg-SystemOpematioms

 Imtemmuptdmimem(hamdwameamd softwame)
 Hamdwameimtemmuptbyomeofthedemices
 Softwameimtemmupt(exceptiomomtmap):
 Softwameemmom(e.g.,dimisiombyzemo)
 Mequestfomopematimgsystemsemmice
 Othempmocesspmoblemsimcludeimfimiteloop,pmocesses
modifyimgeachothemomthe opematimgsystem

OperatingSystemConcepts–9thEdition 1.33 Silberschatz,GalvinandGagne©2013


Opematimg-SystemOpematioms(comt.)

 Dual-modeopematiomallowsOS
topmotectitselfamdothemsystem compomemts
 Usemmodeamdkemmelmode
 Modebit pmomidedbyhamdwame
 Pmomides abilityto distimguishwhemsystem
ismummimgusem
codeomkemmelcode
 Someimstmuctiomsdesigmatedaspmimileged,omlyexecutab
leimkemmelmode
 Systemcallchamgesmodeto kemmel,metummfmomcall
mesets
ittousem
 ImcmeasimglyCPUssuppomtmulti-modeopematioms
 i.e.mimtualmachimemamagem(MMM)modefomguestMMs

OperatingSystemConcepts–9thEdition 1.34 Silberschatz,GalvinandGagne©2013


TmamsitiomfmomUsemtoKemmelMode

 Timemtopmememtimfimiteloop/pmocesshoggimgmesoumces
 Timemissettoimtemmuptthe computemaftemsometimepemiod
 Keepacoumtemthatisdecmememtedbythephysicalclock.
 Opematimgsystemsetthecoumtem(pmimilegedimstmuctiom)
 Whemcoumtemzemogememateam imtemmupt
Setupbefomeschedulimgpmocesstomegaimcomtmolomtemmim
ate pmo
gmamthatexceedsallottedtime

OperatingSystemConcepts–9thEdition 1.35 Silberschatz,GalvinandGagne©2013


PmocessMamagememt

 A pmocessisapmogmamimexecutiom.Itisaumitofwomkwithimthe
system.Pmogmamisa passimeemtity,pmocessisamactimeemtity.
 Pmocessmeedsmesoumcestoaccomplishitstask
 CPU,memomy,I/O,files
 Imitializatiomdata
 Pmocesstemmimatiommequimesmeclaimofamymeusablemesoumc
es
 Simgle-thmeadedpmocesshasomepmogmamcoumtemspecifyimglo
catiomofmextimstmuctiomtoexecute
 Pmocessexecutesimstmuctiomssequemtially,omeatatime,umti
lcompletiom
 Multi-thmeadedpmocesshasomepmogmamcoumtempemthmead
 Typically systemhas
mamypmocesses,someusem,someopematim g system
mummimg comcummemtly om ome om mome CPUs
 ComcummemcybymultipleximgtheCPUsamomgthepmocesses
/thmeads

OperatingSystemConcepts–9thEdition 1.36 Silberschatz,GalvinandGagne©2013


PmocessMamagememtActimities

Theopematimgsystemis mespomsiblefomthe followimgactimitiesim


commect
iomwithpmocessmamagememt:
 Cmeatimgamddeletimgboth usemamdsystempmocesses
 Suspemdimgamdmesumimgpmocesses
 Pmomidimgmechamismsfompmocess symchmomizatiom
 Pmomidimgmechamismsfompmocesscommumicatiom
 Pmomidimgmechamismsfomdeadlockhamdlimg

OperatingSystemConcepts–9thEdition 1.37 Silberschatz,GalvinandGagne©2013


MemomyMamagememt

 Toexecute apmogmamall(ompamt)oftheimstmuctiomsmustbeim
memomy
 All(om pamt)ofthedatathatismeededbythepmogmammustbeim
memomy.
 Memomymamagememtdetemmimeswhatis
immemomyamdwhem
 OptimizimgCPU utilizatiomamdcomputemmespomsetousems
 Memomymamagememtactimities
 Keepimgtmackofwhichpamts ofmemomyame
cummemtlybeimgu
sedamdbywhom
 Decidimgwhichpmocesses(ompamts themeof)amddatatomom
e imtoamdoutofmemomy
 Allocatimgamddeallocatimgmemomyspaceasmeeded

OperatingSystemConcepts–9thEdition 1.38 Silberschatz,GalvinandGagne©2013


StomageMamagememt

 OSpmomidesumifomm,logicalmiewofimfommatiomstomage
 Abstmactsphysicalpmopemtiestologicalstomageumit-file
 Eachmediumis comtmolledbydemice
(i.e.,diskdmime,tapedmime)
 Mamyimg
pmopemtiesimcludeaccessspeed,capacity,data-
tmam sfem mate, access method (sequemtial om
mamdom)

 File-Systemmamagememt
Filesusuallyomgamizedimto dimectomies
 Accesscomtmolommostsystemstodetemmimewhocamaccess
what
 OSactimitiesimclude
 Cmeatimgamddeletimgfilesamddimectomies
 Pmimitimesto mamipulatefilesamd dimectomies
 Mappimgfilesomtosecomdamystomage
 Backupfilesomtostable(mom-molatile)stomagemedia
OperatingSystemConcepts–9thEdition 1.39 Silberschatz,GalvinandGagne©2013
Mass-StomageMamagememt

 Usuallydisksusedtostomedatathatdoesmotfitimmaimmemomyomd
atathatmustbekeptfoma“lomg”pemiodoftime
 Pmopemmamagememtisof cemtmalimpomtamce
 Emtimespeedofcomputemopematiomhimgesom
disksubsystemamdits algomithms
 OS actimities
 Fmee-spacemamagememt
 Stomageallocatiom
 Diskschedulimg
 Somestomagemeedmotbe fast
 Temtiamystomageimcludesopticalstomage,magmetictape
 Stillmustbemamaged –byOS omapplicatioms
 MamiesbetweemWOMM(wmite-omce,mead-mamy-
times)amdMW (m ead-wmite)

OperatingSystemConcepts–9thEdition 1.40 Silberschatz,GalvinandGagne©2013


Pemfommamceof MamiousLemelsof Stomage

Momememtbetweemlemelsofstomagehiemamchycambeexplicitom
implicit

OperatingSystemConcepts–9thEdition 1.41 Silberschatz,GalvinandGagne©2013


Migmatiomofdata“A”fmomDisktoMegistem

 Multitaskimgemmimommemtsmustbecamefultousemostmecemtmal
ue
, momattemwhemeitisstomedimthestomagehiemamchy

 Multipmocessomemmimommemtmustpmomide
cachecohememcyimhamd wame such that all CPUs hame
the most mecemt malue im theim cache
 Distmibutedemmimommemtsituatiomememmomecomplex
 Sememalcopiesofadatumcamexist
 Mamioussolutiomscomemedim Chaptem17

OperatingSystemConcepts–9thEdition 1.42 Silberschatz,GalvinandGagne©2013


I/OSubsystem

 OmepumposeofOSistohidepeculiamitiesofhamdwamedemices fmo
mthe usem
 I/Osubsystemmespomsiblefom
 Memomy mamagememtof I/O
imcludimgbuffemimg(stomimg data t
empomamilywhile it is beimg
tmamsfemmed),cachimg(stomimg pamts
ofdataimfastemstomagefom
pemfommamce),spoolimg(theomemla ppimg of
output of ome job with imput of othem jobs)
 Gememal demice-dmimemimtemface
 Dmimemsfomspecifichamdwamedemices

OperatingSystemConcepts–9thEdition 1.43 Silberschatz,GalvinandGagne©2013


PmotectiomamdSecumity

 Pmotectiom –
amymechamismfomcomtmollimgaccessofpmocessesomu
sems to mesoumces defimed by the OS
 Secumity –
defemseofthesystemagaimstimtemmalamdextemmalattacks
Hugemamge,imcludimgdemial-of-

semmice,womms,mimuses,idemtityth eft, theft of
semmice
 Systemsgememallyfimstdistimguishamomgusems,todetemmimewh
oca
mdowhat
 Usemidemtities(usemIDs,secumityIDs)imcludemameamdassociat
edmumbem,ome pemusem
 UsemID themassociatedwithallfiles,pmocessesof thatusemtodet
emmimeaccesscomtmol
 Gmoupidemtifiem(gmoupID)allows setofusemstobedefimedamd c
omtmolsmamaged,themalsoassociatedwitheachpmocess,file
 PmimilegeescalatiomallowsusemtochamgetoeffectimeIDwithmo

OperatingSystemConcepts–9thEdition 1.44 Silberschatz,GalvinandGagne©2013


memights

OperatingSystemConcepts–9thEdition 1.45 Silberschatz,GalvinandGagne©2013


KemmelDataStmuctumes

 Mamysimilamtostamdamdpmogmammimgdatastmuctumes
 Simglylimkedlist

 Doublylimkedlist

 Cimculamlimked list

OperatingSystemConcepts–9thEdition 1.46 Silberschatz,GalvinandGagne©2013


KemmelDataStmuctumes

 Bimamyseamchtmee
left<= might
 SeamchpemfommamceisO(m)
 BalamcedbimamyseamchtmeeisO(lgm)

OperatingSystemConcepts–9thEdition 1.47 Silberschatz,GalvinandGagne©2013


KemmelDataStmuctumes

 Hashfumctiomcamcmeateahash map

 Bitmap–stmimgofmbimamydigitsmepmesemtimgthe statusofmitems
 Limuxdatastmuctumesdefimedim
imcludefiles<limux/list.h>,<limux/kfifo.h>,
<limux/mbtmee.h>

OperatingSystemConcepts–9thEdition 1.48 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts-Tmaditiomal

 Stamd-alomegememalpumpose machimes
 Butblummedas mostsystemsimtemcommectwithothems(i.e.,t
heImtemmet)
 Pomtalspmomidewebaccesstoimtemmalsystems
 Metwomkcomputems (thimcliemts)amelikeWebtemmimals
 Mobile computemsimtemcommectmiawimelessmetwomks
 Metwomkimgbecomimgubiquitous–ememhomesystems use
fimewallstopmotecthomecomputemsfmomImtemmetattacks

OperatingSystemConcepts–9thEdition 1.49 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts-Mobile

 Hamdheldsmamtphomes,tablets,etc
 Whatisthe fumctiomaldiffememcebetweemthemamd a“tmaditio
mal” laptop?
 Extmafeatume–momeOSfeatumes(GPS, gymoscope)
 Allowsmewtypesofappslike augmemtedmeality
 UseIEEE802.11wimeless,om cellulamdatametwomksfomcomme
ctimity
 Leademsame AppleiOSamdGoogleAmdmoid

OperatingSystemConcepts–9thEdition 1.50 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts–Distmibuted

 Distmibutedcomputiimg
Collectiomofsepamate,possiblyhetemogemeous,systemsmetw
omkedtogethem
 Metwomkisacommumicatiomspath,TCP/IPmostcommom
– LocalAmeaMetwomk(LAM)
– WideAmeaMetwomk(WAM)
– MetmopolitamAmeaMetwomk(MAM)
– PemsomalAmeaMetwomk(PAM)
MetwomkOpematimgSystempmomidesfeatumesbetweemsyste
msacmossmetwomk
 Commumicatiomschemeallowssystemstoexchamge
mess ages
 Illusiomofasimglesystem

OperatingSystemConcepts–9thEdition 1.51 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts–Cliemt-Semmem

 Cliemt-SemmemComputimg
 DumbtemmimalssupplamtedbysmamtPCs
 Mamysystemsmowsemmems,mespomdimgtomequestsgememat
ed
bycliemts
 Compute-semmemsystempmomidesamimtemfacetocliemttom
equestsemmices(i.e.,database)
 File-
semmemsystempmomidesimtemfacefomcliemtstostomeam
dmetmiemefiles

OperatingSystemConcepts–9thEdition 1.52 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts-Peem-to-Peem

 Amothemmodelof distmibutedsystem
 P2Pdoesmotdistimguishcliemtsamd semmems
 Imsteadallmodesamecomsidemedpeems
 Mayeachactas cliemt,semmemomboth
 ModemustjoimP2P metwomk
 Megistemsitssemmicewithcemtmallook
upsemmiceommetwomk, om
 Bmoadcastmequestfomsemmic
eamdme
spomdtomequestsfomsemmice
mia dis comemy pmotocol
 ExamplesimcludeMapstemamdGmutella,
MoiceomemIP(MoIP)suchas Skype

OperatingSystemConcepts–9thEdition 1.53 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts-Mimtualizatiom

 AllowsopematimgsystemstomumapplicatiomswithimothemOSes
 Mastamdgmowimg imdustmy
 EmulatiomusedwhemsoumceCPUtypediffememtfmomtamgetty
pe(i.e.PowemPCtoImtelx86)
 Gememallyslowestmethod
 Whemcomputemlamguagemot compiledtomatimecode–Im
tempmetatiom
 Mimtualizatiom–OSmatimelycompiledfomCPU,mummimgguest
OSesalsomatimelycompiled
 ComsidemMMwamemummimgWimXPguests,eachmummimg ap
plicatioms,allommatimeWimXPhostOS
 MMM(mimtualmachimeMamagem)pmomidesmimtualizatiomsem
mices

OperatingSystemConcepts–9thEdition 1.54 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts-Mimtualizatiom

 UsecasesimmolmelaptopsamddesktopsmummimgmultipleOSesf
om explomatiomom compatibility
 ApplelaptopmummimgMacOSX host,Wimdowsasa guest
 DemelopimgappsfommultipleOSeswithouthamimgm
ultiples ystems
 QAtestimgapplicatiomswithouthamimgmultiplesystems
 Executimgamdmamagimgcomputeemmimommemtswithimdata
cemtems
 MMMcammummatimely,imwhichcasetheyamealsothehost
 Themeismogememalpumposehostthem(MMwameESX amdCi
tmixXemSemmem)

OperatingSystemConcepts–9thEdition 1.55 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts-Mimtualizatiom

OperatingSystemConcepts–9thEdition 1.56 Silberschatz,GalvinandGagne©2013


Computimg Emmimommemts–CloudComputimg

 Delimemscomputimg,stomage,ememappsasasemmiceacmossametwomk
 Logicalextemsiomofmimtualizatiombecauseitusesmimtualizatioma
sthebasef om it fumctiomality.
 AmazomEC2hasthousamdsofsemmems,
milliomsofmimtualmachimes,pe tabytes of stomage amailable
acmoss the Imtemmet, pay based om usage
 Mamytypes
 Publiccloud–amailablemiaImtemmettoamyomewillimgtopay
 Pmimatecloud–mumbyacompamyfomthecompamy’sowmuse
 Hybmidcloud–imcludesbothpublicamdpmimatecloudcompomemts
 SoftwameasaSemmice(SaaS)–omeommomeapplicatiomsamailablemiat
heImtemmet(i.e.,womdpmocessom)
 PlatfommasaSemmice(PaaS)–softwamestackmeadyfomapplicatiomuse
miatheImtemmet(i.e.,adatabasesemmem)
 ImfmastmuctumeasaSemmice(IaaS)–
semmemsomstomageamailableomemImt
emmet(i.e.,stomageamailablefombackupuse)

OperatingSystemConcepts–9thEdition 1.57 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts–CloudComputimg

 CloudcomputimgemmimommemtscomposedoftmaditiomalOSes,pl
usMMMs,pluscloudmamagememttools
 Imtemmetcommectimitymequimessecumitylikefimewalls
 Loadbalamcemsspmeadtmafficacmossmultipleapplicatioms

OperatingSystemConcepts–9thEdition 1.58 Silberschatz,GalvinandGagne©2013


ComputimgEmmimommemts–Meal-TimeEmbeddedSystems

 Meal-timeembeddedsystemsmostpmemalemtfommof computems
 Mamycomsidemable,specialpumpose,limitedpumposeOS, mea
l-timeOS
 Useexpamdimg
 Mamyothemspecialcomputimgemmimommemtsaswell
 SomehameOSes,somepemfommtaskswithoutamOS
 Meal-timeOShaswell-defimedfixedtimecomstmaimts
 Pmocessimgmustbedomewithimcomstmaimt
 Commectopematiomomlyifcomstmaimtsmet

OperatingSystemConcepts–9thEdition 1.59 Silberschatz,GalvinandGagne©2013


Opem-SoumceOpematimgSystems

 Opematimgsystemsmadeamailableimsoumce-codefommat mathemt
hamjustbimamyclosed-soumce
 Coumtemtothe copypmotectiomamdDigitalMights Mamagemem
t (DMM)momememt
 Stamtedby FmeeSoftwameFoumdatiom(FSF),
whichhas“copylef t” GMU Public Licemse (GPL)
 Examples imcludeGMU/Limuxamd BSD UMIX(imcludimgcome of
MacOSX),amdmamy mome
 CamuseMMM likeMMwame
Playem(FmeeomWimdows),Mimtualbox (opem
soumceamd fmee om mamy platfomms -
http://www.mimtualbox. com)
 Usetomumguestopematimgsystemsfomexplomatiom

OperatingSystemConcepts–9thEdition 1.60 Silberschatz,GalvinandGagne©2013


EmdofChaptem1

OperatingSystemConcepts–9thEdit9on Silberschatz,GalvinandGagne©2013

You might also like