0% found this document useful (0 votes)
63 views26 pages

OS HA3 OS HA4 Merged Compressed

Virtualization allows multiple operating systems and applications to run on a single physical machine. It plays an important role in operating systems in the following ways: 1. Resource optimization by enabling better utilization of hardware resources through consolidation of workloads. 2. Improved manageability as virtual machines can be easily provisioned, backed up, migrated, and updated without disrupting hardware. 3. Enhanced security by isolating different environments from each other so that any security breach or crash remains contained within the virtual machine.

Uploaded by

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

OS HA3 OS HA4 Merged Compressed

Virtualization allows multiple operating systems and applications to run on a single physical machine. It plays an important role in operating systems in the following ways: 1. Resource optimization by enabling better utilization of hardware resources through consolidation of workloads. 2. Improved manageability as virtual machines can be easily provisioned, backed up, migrated, and updated without disrupting hardware. 3. Enhanced security by isolating different environments from each other so that any security breach or crash remains contained within the virtual machine.

Uploaded by

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

Home Assigoment -3.

,LPlain in detaii about data integvity ard Protertion


mha integriby,rerers to aCcuray, consis tency , and rel iabiity
e data througut its liecycle.k ensuves that data rerainr
unchanged dui ng storage, tYonsmitson , 0r Protessing
are used to maùntain data integrity. .Severarreth
1. Checksums and Hash funcions.
These kechnivues generate uniue
fixed-sie strings of Charato
(checksuns oy hash velues bared on the data's Content.
2 EncryPting
Encryting ugorithms transform data into unyeodable
Can oniy be accessed using a
text,which
decryPtion key
3Access ontro)
Limiting access bo autho e uses ensurec that oniy thase wth
ProPeY PeYmission can view oY MOdify Sengitive data
4 BackuP and Disaster Recovery
Dogulay bac kues heips in Restoving data to its
( originau State io Chte
of accidesta deretion,
CorYuPtion, 0r Cybev attacks- Disaster reevery
Plang Prsure that data can be
recovered and Systems Can be rectare
apter a Cotostrophic event.
S- Seeure transmittior Prototo IS
Using seeure communication Protocos ike HTA ensures that
dota brarnS mitted over networks remains eneryeted and
fotectal
From inkercefti on by maiicious arbies.
b. Oata Validation ond
Soniti2ation
Validation and sanitizatien dota infuts can fevent Common attackS
like so imeckron ad
croSSSite SoiPting whih (old othe rwise
(ompromse data inAegrity
ExPlajo io detait abouk Nebwork Pie SYstem and distrihi
Pile system
Nebwork Fine System.
Network Pie SNStem (NE) ia dstributed Piie system Protoco
alowing remote Systems bo acceSS Fiies over a network
were io cau Key asPect OP NES ase Hhe
inqude
* Client Server Architecture
NES oPeates
or aciient-server Mode uwhere a server
and Ci fents Ccn accoss these hacts the Pies
kite over the netwoYk.
* TYans Parency
NS Arovides transParency to users and
apPications, enabiing themto
access Yemote Pites without Con(erina
Ehemselves with the nderiyn
0etork compeUties
* Scalabi tity
NFS Qou)s foY the easy Qdditíorn of
Ciients andewexs, aking it
Scalable PoY various networK Sies.
Oistributed fiie sstem.
Distributed FieSYem (DFS) íS a mOYe Jenerou term that
reers to a
eiie systern Seread across muitiple
Machines or Servex.
Redundoncy and load Balancing
DES Often intorforates
redundancy and lod bolancing techniues.
Dedundancy enures that data (s duPiicated atrosr
Pay ackuP od lood balancing multiple servers
Cient reuests amongseverou Servers
koofinise prporman ce.
* TransParency
DES oftern tofPers location branr
Parenty,meanig
AXe unowware Of the Phys*coL l0cat ion oR ot.
urs ond aPPicoto
Salabitity
DSSiS highty scala ble, aC (ommodoting a 9rouoi Dumber op
Riis.As more resOuYCeS aYe needed. additiono Severs (an be olded

.C. Onio in detait about Arotoeol and


network Pile Sastem distributei
Protocon

Aobocol
A Protocol iS a set of rules and Conventions that define
bow dota it
Lyansmitted and Yeceived overa netork: lE acts a Communication
Quideiine ensuring that devices Canunderstand ad inter pret the
ineomation being echanged Protocos overn Verious aspects of neburrs
(oMmunication, inuding daba format eror handingnd security
Measures

Netuorkfile SHtem ditributed


NMotuork Rile System distrìbuted Rototoi is a
Sfecieic Protoco desna
toallow Yemote accesr to es over a netuork.
Ciient -Sever model
NES oPerates on a
ctient-Sewer Mmedel.The server hasts fies, and Chiere
Con Y2uest ad
Manipulate these Piles bver the netork:
* Authenti(ation
NES inCudes mechanisms PoY
Quthenticatioo
enSure that ony authorned users nd
and Qutherisab'on to
Sover.
System Can acesr ites or the
*Worsforenty
NES Provides lccotBon
the Physical location of tranNParercy, Meaning users are unawaYe oF
fiesThey can Qccess ec using thesae
Hle Paths, YRgardiess of
where the Piles are Stored within
the
ExPiain in detai abo ut caching and Buffering in o:s 9
Coching in os
Caching io the context of os invoves SEoring CoPjes of Preauetly
acessed data in a farter, Cleser Storage location, Suchos RAM
Ora hgh-seoed diSk to expedite Puture accers' when a
proranreuert
data Ehe os Axst checks the cache IP the data LS
foud E'sa
Cache hit and it is deiveved
ucikiyavoidig
OP fetching it from he ori9inau Sorce, like a
the Slower Process
havd disk.
Caching enhancer Sstem Prformane by Yeducing
data acesc times
asd minimizin9 dkays in Procesing.
Bufferin9 in os
Bufferig is atechnjue where data is
ternporaniy store in a nemory
bufper whie Its being transpered rom one
|n the ontext of os, locakion to ayo ther.
buPering is
whon data iS written to a fie or Commony used in yo oferaticns
device-(t's initiaty Jtored ina buffer
bekore being tranSPerred- BPfering
Srnmothens he interockion between
Past and Slouw devices oY Proceses, as it allous them to
oferte at
diforen SPReds ttoPtimises dota Eransper by
direct intactions betueen Partnd
reducng the numker
slow comPonents, iMProving oveya
System ePPiieney and rerPonSivenes.
r Kaplaio in
deoils abaut Yole of inter
inSystem
Protess (ommuni cation 6
1ooProcesr Communication (IPc iS a CYeuciau Mechanis in
Lt erabes Communication a data exchange heteern i
dieyent Processes. 1PCPlays everou Key Yoes
1 Data sharing
JPe allouwr Processes to share data and
Sharing can oCuY between
iNPormation witheoch othe,
Pocerer Yuoni g On the Sorne
(omuter or difkerent ComPuters
Conected via a network
9. Coordination
Aocesser Often need to coordinate their
ackivities-IPe mechonisn
as
Suth SemophoYes, mutuaes and Messoge e ues herp
Proceres
hronje their e1ecution ,ensuring ordeny
access toshared
reZources and Preventing ccnftics
2.Reseurce Sharing
faciitateS the sharing of resources,
devices, among ProceSs es-muItiPle Suchasiles Sockett, ad
these resouYcer CONcurrenty, Processer (on
access and use
nhancing SystemePicieny.
y. Inter Procers
1Pc
Snchyonization
mechanisms ike semaphores and
locKs erabie Arocesrer fo
ynchronine their eiecutioo, ensuring that
with each Othey's they do not
ritlal Sectien.This inteYface
avoding Yace conditions and Snchronisation is vita
ensuring data Consistency.
RY
J(omnuncation between pitribued Procerer.
IPc is eential PoY
communication betueen Pro cees
diPererk machines in adistibuked
System. Yunning
Technias 1ike Remote POedure Cas
ehabie Prcceser to echange data (RPc)and merate fang
and Yeauertr over
6 Faut o aretwerk
lation
|Pcheies in Conkaining the
imfact of faiures f one
IE deer n
necesary aPPect other Procetrer- as Ehey Pocerr Pos
are SRferate
entkier. faut toerante
mechanisms Can be 1mpiemented sing (PC
ande Pailyes gYacefuiy
6- Faploin i0 delais about Yble of vitualization 0t.

Virtuaization is atechnolcgy that altouas muttiPle o-s and apPiot.


toYun on asne Physica machine. t Plcys asigniPitant Yoe in os
In the
Pououuin9 uays
·Rescue oPtimi sabon
ViYtuaisation enabies the ePeicient uliisation of hardure reroura,
by Yunning matple virtuu machines (Vmg On asingle Physiy sorer
his cptimies YRDurce Sages as each VM (an oPeYate
Yunning difPerent oS oraPicationg indePenderty,
1. Iso lation
VirtuauiSakicn Pro vi des LsoatBon between VMs - IF one VM CYarher
Or en(ounters iSSues. t does ot afpect othey Vns unning on the
Same hot.This (Solation enhances Systern stabiity ad security
3Hardune ndeendence
VYuO machines oferate idlefendentay of the undenyng hardwo
1hiS means VMS Can be moved betueen
dieeexent phyrical Senes
withoutYeQuiring Changes to the oor aPplicatons,
Plezibiitynd scal abity. provding
4. SeweY Consoldation
Virtuaisatin ulous organiSahons to Consoll date multiPle Ph 0Cat
ovvers into aPewPowerfu Serverr hasting MutiPle Vme. The
Contelldation Yeducgs harduare (ojt, ouer ConsMpEion, and h'a skre
Yeuirements in data centeKs
Testing ond Develofment
Viyuaization pYovides asafe envircnent FoY testing nRsoPtune
v Conduttin9 deVelo fmest ork
DaelofeK Cars Cveato isolated
WNto test aPrications without risking damage bo their
hast
s oY other aPPiiCat ions-
7 EPlainio delails about Yole of Protectonand Security wthreret
(A.Schedulay
toRaltime

J-Aotection
- Real time Cou scheduers ensuve that Processer are
isoloted
Bromeochoother, Preventing interfevence and ersring ttat
Yeaj-time bask is not disuPted by lower- Priority talks- ahigh-pronty
Relource allocation - Protect ion mechanis ms ensure that Yeal-
-time tas:
eceive he neceSary CA time to meet their ceodines. They
Youti me Proceses From bein9 Stavved oY delayed eIcersveIy b
protet
non-rea time YoÇeres.

9-security.
control SeCurity measurer limit acerr to Ye.
Acerr
Parameters, ensuring that ony authorized Users to
time schedu niog
Cribcay scheduing Settings. unauthorized Proceres Can mi
the timing Yuirement OP rea -tinme task.changes Cou'd dSrupE

IntegYity-seturíty ProtocoiS SaFeguard the Inegrity ofYutetat


Porometers,Preventing urauthorí22d nodifiation- This interty ensuwer
tbalrecutime taskS are leuted as intended
- thesystem's Yeliabiity. mntuniog
In Yea bine
Cpucheduing, Protection mechanism
Sssem's (nLegriy and Prevent unauthorized afesuard the
iterfevence-
ELPlaio indelaiS obout Yole of remote aCCess Pile System in o
that enabies ues to
HYomote Access fie System (R0FS) isatethnocgy
sorage
Acless eies stored on Yenote Serers or network ~atached
devices Ovpy a nework HeYe's the roie of RAF'G in os.
1-Data Acesstbriby
RAFs altouus uset bo OCcess Piles and data rog anyhere oith a ioterneL
Conrectio.tPaciitates Seamess access to Fiies stored onremote cevers
Providing users uith the Peibity to work Rrom diPferent lo catio0s
2. Centratized slorge
RaF's centralises Fine storage on dedicated serers, ensuring data
Consisteny and enabing ePficient backuf ad management. lE veducer
the heed Por storing Pies localy on inividual devtces. Promoting
a cedyaized and organised afrooch to doka maasement.

3.CouaboYaticg
RAFS enhances oloboration by enabing muukiple sexS to accecs and e2
shaved pies simuboneously tsuPPorts reay-time Colaboration all owing
teoms ko LwoTK ondocurents SPrecdsheets, and other Biies bosether PaSkenn
Productivity and teamwork
U-DataSecurity
RAES ORten incorforates robWt security
meares Such as encyion,
arcess renrolS.and autherntication Protocols This
ensures that Piles areacered
ooy by authorised users, enhancing data Security and
Prevenbing unautha
acess ortampering

G ScAlabiity
DOES SYcem can Sccule Casiy to accoMocate groing data
Stongered
Rsthe volume of. data increases, additionnu storage
CaPacity Ccn be ted to
Ehe Yenote Senvers uithat sig07eicant
Yemoins ereicient ad resfnsive.
diguptionS,ensuri 09 the stem
4- Erplainin delais about roie of Auttenticat ion-Autterízotion ond
Auditing in oS oith resPeck to Security

1- Authe nticakion
LOnle- Authenticakien if the Process oP verißyim he identiey of
user SYSkemor aopicat ion.
Fuction- It enSures bhat individuals oY entikíes
AYe who they Clain bo be (ommon
alceSSing thester
melkhods (ncde Passords.
biometrics ord mutiPockor -authenicatio0
k imfortance: Proper
authertiakion Proyents unauthoi zed accers, ensfita
on1y 1e9itimate Wers can log in
and use system
yeSburces
2:Autroiation
*Role-Authoriation Polous authentication and determiner the
Permi ioof and Privi tages
gYanked to authenticated uers orstem.
¥ unction- lt
SpeciPies ohat acticn useYs or Protecser ealo Wed to
Perform. deßining ascess leves boPies,
Systen Runctions
* \mortance - Autheri
divectories.netwok reources-d
2ation ensures that
Qcces resources and PerPorm authenticated useYs Can ony
actions aPPrcPriate Por their rOleS-
Urauthorized activitíes and data brexhes Preventing
3. Auditing
*
Role-Auditing involves tYacking and recording evens nd
he os activities wthin
Function- (t monitors Ser PcBlons,sstem Proesses
Ud
events, cYeating on audit rail Por
reiew and anuri seity-related
* \Mortonce-
Audting heies in idertifyig SeCurity
USeractivities ad ensuri ng comPiance with securityincidens,track ngan
foicies. t enab lec
the deteetion n£ unau
thorized acess attemts nd
cota Por forentic onalsis in Rovdes aluable
Case of security breaches
Otxpain in detaus about YOLE. ol Con Pidentiality, integity and
aVaitabiity in os to security.
|: Confidentiality
) Role- Confidentiarity ensures Ehat sensitive data is
Protec ted Brorm
un authoi7ed acess or disciasure
*Fucion-lt involves encrypting data, imelementing atcess (onkrole
and secuing Communication Channes ko Prevent unauthorried useys
rom accesing ConPidentia infornation
* IMPortance -Conei
dentiaiby SaleguaYds Sersitive data, uchas
infornralton or trade Seres. Brom being Perht.
unauthorized Paries, ensring Privacy andaccered orstolen by
compilace withregwations.
* Role- (nkegrnty ensues that dataromauns accurate
trustuortby durig storage Processing ard uraltered, and
*Function- TehniAues like cherksum digitautransmission.
mechanSms are used to Prerenk nauthoie SiINakures and acceSr Contrai
* ImPortance- 1ntegrity modipication of data.
guYantees that datais reliabieand har
Less hmPered tpith, lthees in
Ce inormation maintaing Ehe ConsiStency cund reliabiit
Pentig unut hoied or maliious Chargee.
3-Avaiabiity.
oAeiabiitY ensures that data are acessible and abi e byauthoe
Users when neeed.
kFunction- Redundoancy kskuPs,\Oad buiding balanig,
and disaster
Yotevery Planning reemloyed to minimi2e doumtime und ensurp,
System avai labiity Coninusw
Importance- Avaítabiity ensurer that USers
usoy Cn
accesr resouYCes at
(evvices withoutinterruetio n- kis
cucial for bsines continuity,
Prductivy and user Satisfaction.
FPlainin detal Yole of virtuau memory in RoTS 2
|1
memory in 0-s
Role of irtual
|-Add eSSPace

Virtual memory eltends Ehe avlable address SPace betd the


physica RoM of a comAiler.This ezans ion alcus aPpications to use
More memoy than physicay avaitabie, enhaning thesyslen's
(afhbitity to rn large and cornPlet Pro9roms

9 meOry isoation
AYtual memog rovides memory isolatior betueen Procesres. eosh
ocesses beieves tE boe
has Ehe entiro memoy toitseP Presenting
one arPiCation Prom aeess ing oY Modipying aother'sdota,erheseing
security and stabitity.

by3-mernory Masa9erent
Virbua! memorY enables Oeicient
jt Otiises RAM LSage by
management oPsstem rernory.
movig rarey accersed data bosloueY
<korage devies and Oading data back into RA
we needed.This
ProcessKnown as Pagin9 oY SaPPing, ensres that the
used data resides in Past
-access mostereuertu
4- fase of memorgimproving System feforman r
fregramming
Program mers Can deelop alPiications withat
with the Phyi( (imibakions oP
Conierning thenseves
RAMVirtua mery Smpifec
memory management Por Softue devel cfe
on oreating Yobst and allang them toocut
Peature -roch aePi katiens.
5 muititasking SuPAort
Virtual memory Ports
.tovun Concurrently Multitaskig by anowing mueiPle apeication
3 Epai in deta! about Pile Protection mechanims in Yeau time
0-S
Fe Potection mechanim in reau-time os are desi9ned toencure, Hho
Inkegrity ad Conidentiaity o fites while aintaining Yer-ti
PoYformarne
|Acess ContYol iSts
Acu degine which users or Pre
Ceres have access to SAecipic Rlesond
wtat operations (Yead aunite
Q1eute Ehey Can Aerform.
ImpleMentation
AcLs aYe asociated wih each
OY user qroups Rros ie,speifying aucued actions Ror users
enPoes Ehese Rermissiens
unauthoried aces Yi9orousiy to prevent
-Energption
* Roe
Enryption converts kite contents into a unreadobie
the Pro PeY decryetion key. Pormatuwithout
1mPIenentalion
RTOS Can empioy enYPtion agorith
bo Secure fies, ensuring that
Denie uauthored ser aCcess the ie, they Cannot understand
iks content wibhaut Ehe decryPion keu.

3.Rea time cess biicies

Donl-kime. Systems oten have serct Eiming reirementr -Access fot ies
Must desig ned (onsidenim these constraints to avoid
latency.
k\mPiementatíon)

ene acerS methods ald Secunty Chec ks are optimi zed for eu-ine
YosRonsivenesensuring Ehat aces Controi doesn't inkroduce
c'qnificont delays in Yitiay oferationt.
Yo1e of shared name SPace oith the hep of tuoo
in deta
Poesses in os
Shred Names Pace in Os alows mutipe Procecses to acrer sherod

resources nd daba Promoting CollaboYation and tpiert Yesorce


utiizatior. lels llustrate its role using buoo processes proes Aasd
ArcessB

-sbaved Resorces
Roje
Shaved namespace anous both Process Ato Process g to acces the sarre
(otof fies, divectoris oY Communication Chames.

9.ynch ronizabion nd cooydination


Role
shoyed namsPace enabies Sychonization bethieen Procecses by a'to wing
them to ceale ard access shaked Synchronization rimitives tike semafh o es
oYmuteres

3Inter-Process Communicabon

Chored namesPace Paciittes IPc oy aiowing Proce Sses to estabi ish


CoMesnicabio0 Channes, Such as Pies or message queues, in asharedcontey.

y-Resourte EPPiciency

Shored amespace Promotes


Yesource ePPicierc by alowing Arocerer
boshore memory Segrents Yeducing
duli cation and
System resources Conerving
Home-Asignment-.
\-Eplain Lhe Producer Consmer Problem-
The
Producer Consumer Probl@m is a clasic
nd yochronization Ik ilusbates he
e1ample io
Comfter sciero
chanenges that an arisewhen
buo dieeent Proesrer, aproduteY and a consuner,Share a
omnes,
Rred-sie buffor as a (omnuniation nedium.
|:Prouco
The froducers Tob is to geerote dala itens out f
and Put the into
the bupler' Houevev, 1P Hhe bufor is
Pul, the Producer must wait unti
the ConSumer removes Some
iens
2-(onsumer.
The consumer'sTob is to ake iberns cut of the
buferand Prarecc
them i the buller is empy the
consumeY must watunti the
Procedure Puts ome items into the butper.
The man isSue in this
Scenario Sto
enre tat the Procedure anho
ConsumeY ProLecs oferate in a synchonized manner,
Such that the
(onsmeY doest Ery to ConSurne ibens that haven t
and he Producer dent ty been Aroucedyok.
to Produce itens when
n te bey. tere 's noSace
usirg a Shared bfler
A shared, Pinite-sized b Por is used to
store the Produced iterm.
The Praducer adds items ko the
bupfer, nd the Consuney
items Prom it.synchrani zation Mechanisms tike remoes
to contro access ko Ehe SemaphoYeS or Muba es
bufPer, when the
LLo Pro ducer is biocked 'when bhe bPeY is
empty, the
bfler is fu)
is blo cred Consuner
the dining Phiesophers problem-
Thedining Philosophers Problerm is anothey classtc
iocomputey scierte that
problemin usbotes the chalanger
Synchronizabion
f
Shaving nd dleodlok avoidame It w)as
introuced by
resouce
146s- The Proble iS setup as Po l|Lwr-
G-w-DJkstrain
Imagine Pive phi logophevsSiting around adinirg table Each
uternatec
between thirming and eatrg.To eat,
ho utensis ,one in theleft hand. aphiaso Pher needs Philasoer
and aothey in
soYe. aye Five utensils On the the right hard
phiesophers
table, one etuween Qoch Piy of
The callerge is to design a
Protocot that allouws the
Alkenake betweer thinkirg and hitsophe to
DY aSi tuation eating oithaut creating adeod 10ck
where an ehiiosophers are ho lding one ube0Sit and
Wai ting Porever for
the othey one,
The pobem arises due to ePPectivey locki ng thes2sgrtern.
the Potentba poY
hilogophey Picks UP the leet utensit und CriCurar
waits
waiting-fach
a circuaY unit
Can oCur where every Por the night
utensl held by the net Phiiosopher is waibingone,
for the
phiosoPher.
Resouree HierarchY
Assign a uni ue numbeY to each
Phiosoeh es to aluways Pik uf Ehe utensi and reuire the
lhe Soueion touer-numbe ved tensil Piot:
Prevents circular wajting beause the phi
Olalwos Pick up \asoPhers
utensiis ina sfeific oYder,
fossi biity bYaking the
facircular unb
ExPlain in detajl about muer nd semaphores

mutex- A mubex,shÍrt Por (matua eteision'" is asynchroniation


rimitive hat enot Hhat ony one Ehread or rocas Ccun acces
ahare Yesorce at atime.

Serations
*\ocKing- hen a thread wants to accers ashared resouce,it bres
to acquwYe the mulez, (e the mute is not
Cunently locked
Dy another bread the reuesting thead
sucessuy acaujrerthe
mutex and Can Praeed.
Xuniocking -when atread Pnishes using the shoYed resure, it
Yeleaos the mues,allouing
otherwajting ecds to aCauireit.
* muteXes aye suitabie PoY Scenanios uhere acrtta setion of Code
needs to te Protected,enuri ng that Ony one
thread executes the
(mtica secHon atatime.
Semapheves- Asemaphore is asynchroniation Primitive that
Can beed
Complea Coordinabion bly multiPle treodt or
Pro(ecses.
Oferatis
kuait oPeration-P the Semaphove Vaue is 9reater that O,
Ghe vaue and con tnue decvenyent
signau oferotion-
)-1ntrement Ehe emaPhores vaue: Ie
wating due to the senaphoYe bein9o, wake up 0ne
there are threads
f the
Lhveods luiing
USage- SemaphoYes are usek when yau need to
Corntro acec koo
vo Courco based on a certain condition
.notJutQuNNe occere
in detait about Process and Ehread
Pocess- A Proces and Ehreods are
Pundamental (onteotS in
CormArte Scienee and Oerating Syterns
characterisbcs.
1lSolation.- Each raess Yuns
ndeerdeny o other Proesses.
They Canot divecty access each others menory 0Y reouo:
withaut Wing inter Process
Advantages Communication mechonisns
*1solakion- Processes ave isolated Prom each
Gtem stabitiby cd Security otheerhantig
disadvantages.
ANOY heod- Creating and
ytom resources MoKing the
managig Pro(esses require SignEicant
to brecds
relatvey heavyweight inComfarisice
Thread- A threod is the
Sraiest unitoacprs
breads can 1ist ithin a Sing|eProcess. aeutorn mwbpe
Characeristic
Shared
resarces-Thyeads
Memor sPace and rerouYces
withio thesame Process share te ame
Adonloges
*PFiCieny. ThreadS arenmore efeicient than
li9htuwezo ht nature Preees ue to their

Disodvantages
* Synchronizatinco
MPlexity Since threds share the same
SFuce, develofers DRed memery
to avo id cata boimfement PrOAer ynchrunizakion medanisms
incons!stentles.
y- usig mutees and
Semaphores.
Eplaun in detail atabo ut data itegrity ad roteeton.
Data intigriy
Data inigrity refers to te acwacy and reiabiity odata througa
its ieecyIe

methods
|Checkium and Hach Funckiong- Checksums and CryPtographic hash
Punctions Jenerate uniue alues (checkSums oY hasher) bakd on the
data's content
1.Dì9italsigatures-DigitauSatures- Provideaway toverey tte
autentiity nd 10tegity of digitul Messages or dacymentt.
3Eroy detection and coection (o des-These Codes aYe acded to dat
unng Ermissio and storage
Data Probeckib n
mto prdeckion nVoves iMPlementing meare to Secure hto
unauthri zed occes disciesre, alteration -or destrurtion:
mothods
|- EncryPtion- Encryetion toSforns data intoan unreodabe Pav
usig enyption alori th ms and keys.
9.ACCes (ontro- Acces Control mechniims, Such s authentkationood
authoration,ensure that only authomzed usexscan acer Skeificdan
actions
or Perform certajn
Regular Auditing and monitorig- Continuous Moniboring and realar
audits heies detect nd g YeSpect and vesfnd to unauthori 2al
alcess YSuspiious activites PromPtiy
Aditing and Monitoring-
Contnamaitoitg
and
Loodotect and Tetond to unauthoried andit can be vegular
ror
audi
the event of accidentau devetlon, Cowuption ôr otber d
sarters
jn detaj abut Monitors cnd MUTEX Lk
Monitors
AMonitor is ahighever synehrenizatfon Construt that entafutaabes
Shaved data aand the oPerations Uat Can Performedon thqt data.

characteratis
(-EnaPulation. Monitor encopsulate data ond the oReatrs that
manUlate that data toith in aSngie onstruct.
2-mutuar EcIusia-monitos Prauide Mutuauescusion by
on 1y one thread to eetute Monitor atatime
altoung
Usage
*Java ln Java, the 'ynconhedkeywod is used toCreate rronibors
methods orcode bicks mavked as synch ronized ensure that ony
threod
(on execute them at a tie.
Muteiloks.
A mutex 1S
aychrenization Primitve that ensures oniy onéhrad can
acces ashared resorte or Cribicausection at atine.

choncteristis
Binarystate- A mubes is in one of to
when a read acaries be muex,t states:
iocked oY UNIOcKe
becomes lCKed.
-0wnerhie. A muben can be ouoned by the thred that
locKed Sonemule
Inperentatlons atlaw reeusive locking.
Usuge
*
uindous APl-on widou muterer are
like
crealerutey'. implesented usig AnCtions
waitforsingle.o kyeeko and ReQremutey 0',
EAain in detai aout dead tock hancing and reccvery melhods.
ead ik handigand Yecovery ethods
doad lloCkS OCuY in a muti-PrCeSs SStem uhen tuo br mo\e
Protesescann
Proxeed be cause they are aiting for each other to Yelease resource

|-Preventon
KeSource, AlloCattn Gvaph- Areorce aIocation raphis ued to detert
and Prevenk deid(otKS

Rescre atocaton Denias-The System cenias a YeSource


eauest p
Yrantng the reuest Coul dlec to a decdock
2Avoidone
Banteys agorithm The Bankers algrithm is Wecl in
System toavoid gecd loths- |t assesses the veSource al(ocotjon
tentiau isk before granting
aYesouTe reaet. ASYster is in safe stae ip
here is aseence of
esurce allacatons tat avoids adeodtotk
2. Detection and Recovery.
peod ictkKdetection
10 database Systems,
ucit-die schemes Can beused Por
1R GOn Scction
auests a Yesece held by another dendakdeteckion.
Hhe system Check wheatter transaction
thereuestng transattion 1s oldeY or yonger
Reovers
poross termiatiOn -on uy torecover
foroma decdtotk is to terminete
oneor More Processes Involved in the doodk.
u
19roorceSore Systems opt to 9nore ceack altogether, a Suming
bhatthey wu be resoNe deadiotKJ, and
relving hemcQ ves oVertime
TiCOPPYCoc iS more (ommon in non-eritiCOu Systems
or
system whore
Jomd locKS OYe rare and eas9 to Rsolve
manuay when they
OCtur.
lo ExPlain in detaj totkS, loks dota Structues Cund cordition variabier

lxKs- OCks aYe Syochroni latioo mechanis thal Provent murtipe


LhYecds Prom acCessing shcved YesouYCes conurerY,ensunng
mutua erUsion

* mute Arovides eycusive acess toaYerouYce. ony


a mute abatime
onethrecd Can hold
* Readwrite locK Allous mulbiple hYeads toYed Sim taneouy, but
eilusive access is 9anted foY witig.
Lok data StYuctures.
lotk data stny ctures aYe
used to manage
Erack Ownership. thestate oP laxs and

ComPonents
*locK stale indiates oheather the
lock is iocKed OY
(onditoo Voriabes WIOcked-
*Condition variables axe
syrchonization Primtives that aouo thYea to
wat poY a speific Condi tion to
be true
before Proe Qoling-
*woitThYeods Can wnt onaodition
Variable ntil nother thread
S9rats oY broadasts that tre
Condi tion )s met.

Thrends Can s9nal one or a watig threads to


ha he (ondition is met unkep wben brdco!
used in
coNunttion wibCKS to cvoid
Threads uit ona conditiOn Varable buywatig.
while another threod
Shored doter, ensuging Syrchoniati on modifies
ipaio in detat file system allocations Suchs dire tori es, files
Hlesystem AlOCation
Direrkores
*Directories are Eile syste Structures sed o oranise andsre
They acts as (ontaine to hold muibPle
ntele gies and suireckories
*Hierahy- Diveckories can be orgaried hierarchikany, forming atree
-like sructure where each directry can
contain Piles and ther
Subdirecories
KOPerations- users Cas (rate, devete Move and rerame
Erabi geitient
orsanisation of Pies ad data diretoies,
Files
* Files Ye (alections of dcta stored
snastora9e redium, re Presetig
informayon Suuh as teit, imags, prcgY
as/oY any
otertype of Cortert
*Atridutes Files have atribues such as
These attibutes determie hos the file annamesizetye and PermiSiens
be acesed und
*ofrations- uses Can Crete, read
manilated
Qouie for various jnteactions jth wrie,mcdPydeiete
nd move erles
thestored data
File System Allocatio rg
ustoy -Based Anocation-
Storage Sface is di vided ito
Pixedsize curt:
Files aYe allceated (usts and
eachother Custer can Store rt ofa
Pile's data
*Ba-Based Alication- Sinilcy to Ciuter but
sface is divided
Sze bocks Eilesare alocated whcle bi
ks, Yeduing Prag fied
(ornfredto (ysters mentotion
k mu ileve indeig- combires
incesed alato with ddtioa leves
ae ide baks,
alawng e:iest maagement of large
the nuber drect Piles by reduting
Pointesin the maçn inder bok
I2 Ealiain detal Coching and buffering in oferating system-
Caching
*Coching involves shorg Prequent1y accosad dita. in afoct atro.
emory (Cacte) to Yeduce Ehe bime it takes to Yerive the
dot wern
needed ag un.
sawfose Cachng improves System Performane by revig the
latery aSociated withhaccesing chta from Slower storage
caches Con eist at Variou levels, intuuding CPU Cacher (ela)
A:sk,Caches, and network caches, each Serving sPecific pufoses to
Dtine data access

BPering
& pe£inition- BufPering nvoves ternporarily StYing chta ina buft
lbhilet's being transfewed betwen different ComPonens or
daicas
jn acom puter NStem.

*Arpose- Buffpr Snocth ut Variations in dataflouoater betweeo


fast and Slow o meonents alooig hemto OPerate
csynchronculy
without jotevruPs
* GxamPies-Buffering oturs invoríous SCenarioS,Suh as YRng data
Prom a drsk into menory o bulfevio.
during network Conmunication.
infutloutfut data
Benpgits -Bueeers Prevent botlenec ks by qlowg omonats
t work at their resPectie SPeeds enhancngevera1 System
eeicsenou ond resPnSive neg.
13 ErPlin in detail FirsAfit, besteit uwoYsit
First git
In the Pirst tit anocation ugorithm, when a Protes veuesks
ablock of memory The os alioCates the Pist aailabe blck
ohqt is arge enough to a(curate the Process

BesteikThe
Bestt alocaton ugorithm, The os alocates the
Smalest
Vayiabie block of memoy Ehat is alae enough to acoModate
the rocess
sostit
Io the wosPit aulaation algori thn, The cs alocates the largest
satet
Variab1e brock of memory. This apPrch caan Yewt the
highet
of Pramenkakio behind the largest unsed enorybiake.
14xPajn in detai abt Interfrecess Communicatio n
Interprocers Conmunication efevs tothe mechanisms and
techniue tat alos diPPerent PrOCeses in an os or dstrtbuted
Sstem bo eichange data and synchronne Hheir archieve
to isssertu For Varios Proces Such a
CoOPortie blo
Proess ata shoani n9 and Coodination The Ye are
eYaJ methds an mechanisSms Por TC
nCHin9,PPes
PrPes
Mesoge leve,storeed nemóry,
Efain Sleepin9 Barber Problen
he SleePi g Carber Probiem iS oaclacse Synchroniaton to
Conturent acceed and soIver the seeping Borker PYoblern
typicany involve uing synchrani Zation PrinciPie ike Condition
bles and Concphorer
oncphrer to Coordi rcte ho actorns of bovbes
Quake when Customer amive and custamer uos when ow are

tothe Bor ber's Probrem an to achieve YeSource aJiocotor,


Quod deodloKS and enure that customers are sey ved Profery.

17: Explain in detai Readers waters Prcbiem.

1he Readey wwteS Problem is a assic


Hrat ilustrate o one te'r
Synchoni 7ation
Proble
PrLecses aEtem Pting to 1ead rmar
YK toa shared
Conlurrenty The Pobier nvove astare
ashared data
bae or eP Conturentty rePlace ound the tyPes are.
)reader
DuriteY
Thee ave Qesal ariations of
Solutions to the Yedey writeys
Proble Qach with its dvanteges and Erde
(? plaùn ín dekail about deadiock
Preventor Detchin
DeadlocK PYevention
I9 this approach a
deriv ed 9Yoph is ue to
ad Prdesses edges tandicate Yesource
YeSorce YeuYS annodes
YePeent ond Prceccer borevent
deodloK:
pelchainRace the Same
gaph sed foy
esed Por de
teYmination Ca¯e ofa cyue
in
PeNenton
anao be
Urye iS
grapbt(ndicate us
adeordho(k stem
deveted in the
may
Prevention
Explain in deta abowt semma Plore in gererau s toY of Procesr
Probem
Sena phores are syohron zatiorn PYnte and in Conurrent
Programingto conrol acces to shared atiacs to shortest resouce
and cooYdinate bhe e1eution of
tele bhredeoY Proles and
Qre the Valuahe t Por eterna secion
inSency ious ivolving multiple
Processlnthis ontert discover Seratore lon the Contt f
tbe iticau ectoy. So lary
waittPofeation
Siga) 0feiatio

You might also like