Os Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

whad is operating SyStem ond explain nutithreo

ding beutch ofemhing System3

opeaing &ystem
)operchinq Sstem is a collechion
ot Set of program ohich manages althe
Nesources ot Ahe computer &stem.
ii) An operautinq 8stem iS aSottuoame ihich.
pextorms a l the basic tosKS like +ile manoaement
memor Mandgement frOcess nncnaq.ement
handlinc input and outputend controlema
peipheral clesices Such aS diss, crives &
inters
i) An_operakine Sstem is an inteaace betsaeen
Computer oaerLand computer hordocme

Multithore.cicling.
Thexe are three mocle
MamY-to- one mode
One-0-one mode
9 MaTy*omany mocdel

MaTY-fo one ocle 0lL


USeT hreac

Kerne
-Kerme thread
1)Mcips many USeT-level threacs to one
Kene threac
1) Threcd management is clone by Ahe threod
iromyin user 3pace, Soit is elticient

limtatonS Ahreccl
9Theentire process s i bloCK o
Makes ablocKinq 8Stem Call
access the Kernel o a
ont one hread can
ime muitithread Cmeonable o un
pcmaull on muutipoeskorg.

2 one-+0-one moclel_

OSer thread.

( (K) Kernen threcc

)MapS each Usey thread Ho oKerne theacl


iprovides more conCurency thcan the ma-tO-_
one model alloLDing i CInotheM hread to:Mún
Lohen treadmakes o blockinaSystem_coal
i Aiso clloos muttiple threccls to Tun in
feroulel on mulhimoceSSom
imit.cahonS
CKeaing a user hreco requires creating
the Corresponcdino Kernel hread
9) Many t o - Man mocle)
USer thrreocl.

(R) K) Kernel tread

i)Multiplexes many Uaer-level thread toa


SmeuleY or equa number of enelhread
i Dexeloperscon crecte as many Usex threads
CAS necesscimy anc he Comespondinq, erne
threadS Can_mun inn pamallel on Muli-
Yocessr

Bedch operatina`qtem.

)The batch OpelinaSystem wil Oork o


Submit Simlar Kinds ofobtgether
i) Tn this opecuinq3yStem user do Dot intreuc
olireckhy oith oor Computer Syatem
Tob L- Rcuteh

opeTeutimna
Tob 2-
3stem ecteh-

Tobn cteh
AcdvantaeS
T i S useful hen LDeU0OXKInqu th large
erage
hich Can tcuke more ime io execute

Disacduanhge.
Oncee
oDCe the job is Submittec,the user clicl nct
hawe any intraction oith it
3 Define the toltouoing term
)eritical Section

9Diference betudeen preepmkivercnd NOn-pTeepmtive


Schdcluling
Preephive Non-Preemftive
ResLuTces alloccuted 0 ResourceS cloCcuked i L
Poc.essfor limited time.. pocessi8/Compieteto
cing
)prDcesses canbe ) processescan not b e
interrupted intenmuptec

1)Jou Pracess PriOTity Procesi) Short Aime process


meay Shrave MaSrawe,

iv) HcS ONenheads NNOoverheacs


N) exible Rigid
)cost assocjatec N Not cost cssocfcutecl
vi) uocitinq time, ResPonse vil) oaittng time, ReJponse
ime i3 1ess ime is more
vi) ex.
Pound Robin vi) frist come firSt SeTve
(FCFS)
)whatis Batoh operaking Sstem DECexrentiate
betuoeem Bcutch opercuti ng SyStem onc rea
time opercutimq SyStems

Bcutch opercutingSyStem

Bautch oPercing SYStem Rea time opercting SyStem

Djab ith Simier yequY- iIn AhiS System,events


ments care beutchecogether mOSHYeztexnal to Compute
and run Ahrough the Sstem Cre accepted
comeuker as a goup Processec oithn certain
deadlineS u

T is simplest economical i) Th is Complex cnd


ocessing methd. costhy PrOcessing mekhod

in)Tn hiS SyStem clcuta S t)This System_Supports


Callecked far cdetinecd Tandom data input at
Peio ok time cnd is andom time.
pTos.essecd in batch
v)In his Stystem Sorting isiv) NO Sorinqis Tequired
performed befare proc.essig
NT iS measurement N) Tt S action or event
oriented Tientec

)TranscLctionare bauton i) TcunSacHOncre pracessec


Processed anc eTiodicaiy s ancahen they occur
there ii)Tn thisPTOCESSAhey
TNAthis process
C eno Aime limik
are speciticime im imit
otheruise the System tjl

Vii) Examples vii) ExcLmplej -


RcaclorSyStem-
TYanscIction of crecit Coe
9 uight conhrol
eneration ot biil

Owat are the tuoo brocd clcssesok UserS


Ot
Specisomc briefly
peTciing stem sewices 3
explaio picol unctional closses at0pexhina
&Stem CammonclS
The Tu0o bracad clcises otOsers ot o.S
SeviceSiCe-
SNStem userS
iThese e Users sho intCuC Oth_opemhng
SNStem cirecHydr incdirecAN nauncigei
SStem mesOUrceS
i) System user ate tupicaiy Sskem _acm1nisimcakors
I pYotessional_or promamnersiuhoi Tequie
CACCess_to the Stem toinsBa iortuocane,
COnhgure hamcd uacre Cincl MCINag inq System
SetHing
n The ore neLponsibleor maintaininq syshem
cecuritond managing skem resurce Such
as memor CRO ond storoge.

2 ApplcationOSeIG
These are usens oho OSethe spexCLkna Stem
U n ppliccHon cncd pertorm tocK
) Applieation oser is a ypicaly end. userThey
Use SStem -to pertorm clay-to-clay HSK Such
bouOsinc he ebeditinc docurment cand
aS
Senclin emal.
ii)The e on he operoing &stem
provicleclUSexAriendlinterfa.ce
Opexctinq CommendS CAn be axouped idto
Sevexal unchtional closses ncludinq

Conrolcommand&S
This command& are used
to Conhrol the behoiOCor he Sgherm. Such
as StaxkingOr Sioppng a rocesS shuthina
dlouonthe SStem, or Chanainq neSystemn
Seting-
Tnputloutput (Tla) ComMAnd
i This CommmandS Ore
usesto conhrole theAoL ofdata bettaeen
he Stem anc externe cleNicES_,
Exomele opennqcncd cloçeinale TeaclinaA
CAnd uithina clete rintingdacument

3)EleMancgernent Commanck
This commandS eure
Sedto mancgeie cAnd elrecomes, Such
CSCxeahnq Tenamingcleleting Copyn
mong e

) NekDork CommeAnc
These Commanc are usecl
netcooTKTelatec unchionSuch aS
mcncgee.
manage
Cenneckns
ectinG t o anetkioxk Sendinqanc eceve eer
nehiorIS ContaurAngnetiork SeHur
dctaover
stem Administration CommCandS.
Thete CESnMancl
odministraiar 0Per
Oreused by Sslem
CAcminStrcutive tosk Such CSOancqincUser
acc.ount monitoring SStem pertormhance Dstalin94
Sattuocreupclate

CommuniacttonCommcinds
These commandS are
Osecl o conmmunicate itbother oSer or
SStem Such aS Senclinaand_mecevinq email
chathos ithsther USex

7) Enlish theNariousState ol proceSS and clescrhe


eAch state oithclicagram

A froress_IS an active pogram tcon alßO


be Scud asa proarcm that iS ncler exectuHon

PTOCesS Shate
NeD
RunDing
0cutn9
Recid
TexminGutec
exit
acmittec terminated
nterupt

ready unnng)
ShetuteT dispateh7
event or Tlo camplekion Ilo uDuit
O
aiting event

iaa rcim o proceSS State

Neud
ThisiS the sicate ohenthe procesS has
just heen crecitecdTt i8 in1tial Siate in the
rocesS fe Cycle

2 RunDing InstuctiongCre bei0g exeCutec


SNauting: The pracess is uting a Some event

Read The process is dauting to be CSSIqnec o


a processor

Texminated The prOcess hasinishec execution


h a t is pc8 ExpciO oith Suitablegure the
processStoitch
Ole o Pc8 shenever a
OccLnS
Pc8
Each process is repmesentecin the aperoking
stem.by oprocess C o n t r o l b l o c k CPCe).
O S o C a l l e da S a CSK ConBra bloc
toStore
1 ) PCe_ is oseed by operoting System
clikerent informcutioncbout the pYocess inckdin
P r u c e s s Stcute reqisterprogramCoLunter, ec

Process Stcute
.

PrOcess number
Program Counter

Reqister

memorY umt
ist of one e

Aiq pYocess Contml block (Pc8)_

y process state state in the life Cycle o f the curent


ezeuinq procesSS
) Reaister into
Tncludes clifferent ceu reqistexS Such as
base Cccumultors ancd_generc purpose register

Progrum counter:
Tt Store acklyess of the next
InstucHon which is to be executecl
4)process Number
USed to uniquel identify each
prOcesgS

tct S haveC looK Ct hou) the Cpoguoitches


ArOm OCeSS o fmcess

Process Ps opevcuting SYstem ProcesS


executi Tntarup or 8y8tem cal
Tdle
SCave stcute into Pc8o

Related state from PcB


Tdle
IAlrtpt SYStem EettH
Exeuhna
Sove stete into pc8L

Reload Stcute into PCBbo Tclle


exesting

)IniicAily the grocesS Pa is munninq cind cn ihtexuption!

ii)Tn responceAhe ogexeting Syatem Saveg the context


oPo_cnd Sitp executing
i) The ogeratinq System Ahen loccds the pcR o the
other rocess A ond start executig
)Akte a uuhite, P, receves an intemupt
) Tn Teseonce, AheopercatingSyskem Saue the context
6 o ond stop execuing
v) The óperatina Stem then 1oad Po Pe8 Cnc resumes
executing rom the Previouy stcute.
S)Explcuin
the concept of the
Processoith
chiaqram
e

or Pncess in memot
execwtion
i AprocesS is basically a program in
muSE DCresg
The execuution o Oproces
i n Sequential fashion
text ile
e orite our computer pogramsina
thisprogran perfo
ondudhen de execute

all the tousKS mentioned in Ahe progrcaM


Memory
ahena programiS Loaclecd into the
become processt
Cnc it can be cliviclec info
o u r Sechhon= StacK heapfext deta

StaiCk

Heap
dcutC
xt

1) StocK
The proc.ess StaicK ConBcins the tempory
deito such as methocl/unchion pcrcumete rekuen
addhres Onc local variables.

9HeaP
This ischnamically cllaccuted memary
OpTOCess during run time

This Section ContcinS the


global cuncl StC
VCricbles
A)Text
This ioclucesAhe cIKent cactivityTepresenle
bN theNalue of praaroam Con countex and the
cantentso the proceSSox'SeaisterS
Lwhcui sc oitical Section anc cmHcal gechion
prable.mspecif iefn the three requiremenat
Soluution to he cEikical Se.chonroble.m

CTitHcal Section
EcAch process has aseament of
Code Ccalled a Critice SecHion Tn udhich the
pacessmay he changing Common icKriables
pcdcutinq a able uoritingO 4ie n d so on

Cmitica sectHon problem


he CaticalSechionmoblem
is osed o cdesianc protocol toiulOLaec oy a
goup of process So that uihenone racesS
hais entexed itS Cmhcal&echionnoothen pmcess
iS alloned o -execute in itS cmtice Section:
tOilonc CTe he &olukionof CikicoaSechian
proble.m
) Mutual Exclusion
Tprocess Pi iSexeçukinq in
mt its cxitical Section then no other roccesseS
CCAn he executinq in their Crihcalsechions.

2) Progress
T no ProcesS iS executing initS
ftme
Cmticoal Section ondSome cut t h e u t ome
Cmtieal8ecioD8
OCesS wish to enter their
oait indettnitelyto
Shoulc not have to

itenterr it

8) Bounded wciting
There existso bauncl or limit
On the number at that ather rocesS
timeS
C r e cllouo.ed t o enter Citic Section a t t e ra
rocesS has madeC request to enter criHCAL
Sectian cnd before critice Seckion

ohct are the crmteria USec to cleinetype


of Operauhng Sstem Explain with an exampele
Multi programming operchngSystems

There ane sexeral coiteria USed to deline he


ype ak opercutincSstem
Single userc Multi USer
a Single tusking MuiAagrino
Bcitch procesSinq Intexactive
4 Reci Aime Non-reA time
5) Dishribtutec f centroliz.ec
S)opern Source &roprietamN
'

MuItiprogammingopexeuimq SYStem
) MuHproqrcimmin OS
SCin Cability 0 execute
more hcn one pmoaeum ysing Single pracesgoYr.
mcchine.

Moree thon one tasK ae present insile the


main memomy at one Hme
ExCAmple

opereuting Sistemn
Job 4
Job

Tob N
Emehy SpeiCe

1etsPand Paore uo rorom fresent in


the mein memoruTheoperainq Ystem picks
one proaram ancChartie.xecuukngit

Dumina execirtioniE thefPrOgram requines


ILo opereution then apereiking System ail
Simph Suaitch over 4o P2_rogrcm TtP2
PrnareumrecuresTloioperaion_Ahen caain it-
Soitchesto Pa onel S0 on

TFthere iS nootherproaprom reeMCkrne Memeun


Ang ofter Pa then the cpu uilpcSS S Contral
huckto the preVIouS_progrcm.

Acvcantages
1 feist prOCeSSing
2 efficiency improvecd
More economic System.
DiS-Acuantagel L
Compliccted operaing 3Stem
Lerge main memory require
C Ce the tuDO bxoad clCECeSat OSerC
D ystem Services 3 Briety explaun
any one afthemn

)what is ce oith the typica diagram explcin.


the contents of pce

whaut is a critical Seckion ond cnical


Section problem 3 Explcun the Ure ot semophare
o Soive CmHCa Section probleM

L O CYiHC SecAian CmHcaSecton problem

Semciphoxe
Semaphore t _cre intesm scmicable
theat r e used to Sotve +he CiHC SecHona
Problem by Usina tuoo citomic opercution eaeut
wcut ond sigmno theat are osec ox pracesSS
Synchronizcukion
There Cre LOO Ape ofSemephare.
1) Counting Semaphore
9 Bincny Senmaphore

) Counting Semeghore
T t Can YCYge Over on
umrestricted clomein Countinq Semcaphore can be.
use to Comtrole cccesS o
used ie resource
ConstSting o inite number_of instances

9) Bincmq Samaphore
Con ange only betuoeen
o and A Bincr Samaehore coan be ose d e
oith CxtHcal Seclion poblem tor nulipcue
pYOCESSS

AtomiC opemcHOn

The Licit opexckian olecxements the value


of Craument

uDeit (S)

white CS<=o):

Sincl
The signa apemion increment the NClue
CIYOument

Signcl (S)

St+

You might also like