Professional Documents
Culture Documents
Opercatng Systerm
Name Sakshi
Roll No. = 222/29
Setver
has t own op ercat inq System ancl 30ftware
that witt toacilitate the Jesowrces to victuak Computers
Operating Systerm
nive helevant cliagrah
0
are
7
States o PPocess :
Ans :-Thei o wNait state
) Block
New State
Tetmimated
Ot Comple ted
Suspendlecd
Newr Resurme
Process Great ecl
Ready
Process Schedule
APriority
uatum
(Runmin
1/o Reouest
Woit
Process Comp lete d
Suspem ded
Resume (Terminat fon
Suspendl
Wait
DPLO ught back Tnto the main memoty, and the State is
Chamged to Blocking or w a i t o the 8tate
imstructio
lercminated or Completedl When the entire Set of
Connpletecl 7he
Cxecutecd an ol the DrcOcess
s
to t minat e c
Prco cess L Completed. dhcl Chamgec
Completecl State. Dwuimq this state the PCB Othe
process
As also dleleted.
(m a 9teacly State
Non-Breemptive Su F
reemptive SJF
Non- Pxeemptive SJ
CPUCyoe
Schedultng 0mce th e
In mon preemptive
holols t EC2 ( t
okocated to pococess t h e pocess
Arotval timne
Pcocess ueue Bust time
P1
Step 0 At tmme =
O, P4 a t ives anel Statt executCon
p4
But P4 stel
1)
Continue executton
Ps
6 Qddect
ttves aml
Step 2) At time 2 , PtOcesS P
to the wartin9 uede p4 w ContineuL execub
time-3, prrocess p4 will finbh d executon
The burst ime o f p3 and PL s Compoan ed Pr ocess
ess
executecd because its buwst timne
P
Commporecd to Pz. Which s Smnollrt Jo 6
Pz or P7
P3 P
acdoled
anol s
time- 4, pocessP5 arvives
Step 4) AA
urtl conltnue
executton.
P4 P
added
Omd As
aruives
time = 5, prro cess P2 w L O C o n t i n u e
execUtton
Step 5)At w a t i n g L e ue
P1 .
to the
P Ps
P4 Pa
unish ds execuGor
P wll
Step 6) At time =9 , prtocess Compateo
buwst t i m e of P3, P5, anol PPo
The
The ttme s the
executed because ts bwst
Process P2
lowest Smaller Jo6:
Whuch 6
Ps Ps P
Pz Ps
P P
5 ae
Step 7) At Lime =lo, P s ex ec utimg amcl P an ol
im the aiting queue
10 Ps
P+ P
PPs
Pe
fn sh ts executio
ts n
executio9
Ps will
process
time =
15,
Step9) At
15
P
Pt 11
executton.
i
P3
wtl inis h
23 pocess
Stepio) At tinme
23 Ps Ps
Pa
aD0ve
wottimg time or
the a v e r t a ge
Step 1) Let 's CoLLCulte
example.
NoLt tme
P40-0 -0
P1-3-2-1
P9-5 -4
Ps l-4 7
Ps-15-3-14
Avetage waitin9 me =
Of1+4 + 7+14/5 26/5 - 5.2
Preemptive SJF
m Preemptive SJF Schecdultmg, Tob8 are put into the
SPhon tes t
eacly queue o they come Apocess wrth
burst tme wives, the cwwtent process 2 temoved
pneemptedtom executi on Q770 the shottert Tob
Step o) At time =
O, P4 awtives OLmo Stoct3 executton.
Process Bwust Avival
Que ue ttme ttme
PL
P2
3
O
Ps
P+
Shorter
1, Pcocess P vives But ,P4 has a
Step 1) At time =
P4
Pz avtives
Step 2) 4t tnme 2 , prtocess
bTSt tme mo7te than that of P4. Hence
The
Pa wLConinue executton
Step 5) At
tme 5, ptocess PwIl owuve The busst trme
of Pi, 2Pa anol Ps s Compot ed rocess P2 s
ex ecut ed beca use burst tme s
least Brocess P
S Dheemptec
At me =
15, P1 hes it
9)
Ste
Step
Omy LO cessLePt t wtt execution
Staut
eOn p s
Pa tre
the
exec ut
ton
lmez- . 23, 3
time ms h es
Step lo)
At executio
e the av
Step 11)
Let's
Calculate
ercage ualteng tme
above Cxample or
wait ime
Averto9e wot tmg
P4 0-0-0
TTme
+ 6-7 O+ 1+0+
PL
(3-2) 214 23/5
P25-5-O 4,6
Ps4-4+22
P a 1 5 - 2 / 4