0% found this document useful (0 votes)
17 views10 pages

Osy 14-15

This document presents an algorithm for scheduling 4 processes (P1, P2, P3, P4) using CPU burst times. The algorithm calculates the waiting time and turnaround time for each process using a weighted round-robin approach. It sums the waiting times and turnaround times at each time quantum to find the total waiting time and total turnaround time.

Uploaded by

saturo3011
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)
17 views10 pages

Osy 14-15

This document presents an algorithm for scheduling 4 processes (P1, P2, P3, P4) using CPU burst times. The algorithm calculates the waiting time and turnaround time for each process using a weighted round-robin approach. It sums the waiting times and turnaround times at each time quantum to find the total waiting time and total turnaround time.

Uploaded by

saturo3011
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/ 10

\'Tl l l .

l ' "
_ Arr~\ .,I 111 m. J- •··- - - -- -- -,
H11r_~ t Time ---l
~:~
\ ()

P\
(; . t- -~ ~ ~-~---~ 1 \

2.
~ -- X -- - j
.
1'4 -- -- - ~
--- - - -
l - ·
, \ I ·
RR ·ill,!.orithm for the foll
3 ( .1 ~·u ,1ll' aH•r,1~1.:• \\·1 itm
·• uo tun el' u~III!! ow111~ ,,.
pr \,·\.·:-,l':-. "1 th th1: kn CPU bur"t• time given m . ·11 · 1 <1f
gth of th rm 1c...c<.:on1h . n tiri .
qu .m tum ~O nl:-.) e

Process Bur-.t Time


Pl 12
I P2 45
I
P3 78
P4 90 I

_,
-:_;•,1, ..........
..... ..... ..... ... .. .....................
......
(Space for Answer)
........... ..... .... .... ... . ....... .... ........................
.... ................ ..... ..
. .. J . ......... .... ... ...... -- .. .....
........ ......... .............. ········ .....
..... ... ............................................................
~.:'..~.·. ~··· ·····(~.~f.'.--\-t.....\.~~..l .. ~ .... .... ..... .
........ ..... ..............................................................
.................. .

.. . . ...... ... . . ...- ....... .. .... ... ....


...... .......... ........... ... .. .....
.. .................... ... ............
................ .. ................... .
..
,..
..--:............... .... ... .. .. ....
.. .......... ..... ... .... ...... .... .....
k \ .- C..,or,\+ C~ ... ..................... ...... ........
........................................
····················•··· ·· ············a.1\:- ..
· ························· ··············
······· ·· ································
I fl l I. f') T.
'J 1'L. ~2
f' 1_
!'2
l. P·◄ r l. r
12.
Pi f 3 PtJ
92. n-2
P2J P3 l p l P1 I I P4 q p4
······ ··························

L·.·.·-·.·.·.·_·.·.·.·.·.·.·.·_·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.
n2 n 1 wr h1 ,cu- 2,r 2"l r
... .!::~.'.~'. .~ .<:'.1 .... .~ .l.'.~~--. :.....
... ........................................
P1 - 0 .............................. ............
J
........... ......... .
················· ···· ·······p·;···~·····j·2···~···i·1·2·~·1~
)··+···(·;12·~·3;)·····; ····9·{················· ·············
················ ···· ········ ·~·~!····~··· ··i";:··~··i·9·;·~·i·~·)·+ ·.
····,·;~
···· ·························r";~···~·······~~·; ··+·(·,·,·~··~l~\ ·;·~·~·,·~)···+··(·,·~:~;~·~·~~·)··~··;·,··:;····.·.·.·.·.·.·..
................... ... .... ............
............ .... ....................
··+···(··;;i·~,·1;\·4·\·;~·~·~j·~~)·;·(··;·~·~·.~_?.~.~:;
.......... ................................................ I
.... .. ., ....... .... ............ ........ ........ ........
~

.. ............................................
7\' llt: 'tu 9e W w~ nq -+ ............................................
.. .•.. .• ... .... im
..J.... . .. .... .... . .. .. . +......... e, : D+ ............ .
............................,_. ~ = ,.·:t\1
<3'2.
!:
.4- ·::.= ...+ r3.r••,!••·······=.... -.:. ~.;· .. :::: .. JL
34:.:.:
····················· .. ········ ·················
!! · ·: •• .•
.
· ················ ················ ·.. ··~
········································•~"··•·
"··•·"·•·"··
·· ··· ··
rJ _= D
_,__ ____-
r1 : ! b_ l .:_ ')
r~ - lt..-',:_ ~ , ~~
-- - - --
~------ ·--- - --- - - - - -- --
- --- - ----- - - - - - ---- ---------- ······

. . -
---
-- ~b
~
- -- .
-- l 1. . s- ms
-
-
,.. ) . Prerf'f)t ✓e 0J~
---- -+-

--
~~r·+t Cha.t t-
---

- -
I Pl -
P2.. fq I Pl I P:l
l
I A -

S"" 11 22
.1
- ----·-- ----- - --- . -- -- ·-·- -- .. --- - ----- -- -···-·•- - -·--
- - --- -- -- .

i ~ (' q ➔; tYi e..


- -------•.,,.Jr;',
----:J --- -- ----- · --·- -·. - - -- - -·- -- ---
-- - - - --- -- - ·- - --- -- --· ~- - -- - ·-----

~------- ---- -- - ..
Pl == 12
- ---- -- - •· . ·•---. . -· -- - - - -· -- --
P2 :. J- j :::: 0
----- -- - --
- - -
p3 -- 22 - :> ::. 20
- -------- ... ... - --·- --·· -- ---
p4 ~ 5"- 3 'I:..
2-
.I ') (j ,
/
,I l ,
r ,I

1,

-. ?l
} t
- . .,

-- - - ------------- - - - ---- -... --

- - -- -
-- -- -

--
--- - - -- - - - - - - -- - - -- - - - - - - - -

--- ----· - - - - -- -- - - - - - - -- - - - - ~
----
I J I Comnulf'r Sv"t,·in
iI

- - ------ ------- all


,.------- ·
j

- --
' ;r.·, '
. -
--
- - i} - ~ C~ ll d(""".. - / -\-I, J;-(_) 'h - )

--- -- ---- ··- - ·- - (If

- ------ ------ -~
------ - - }()*_J__~, f) , Q [SQ] ---"---~__.:
1
-r~qrn P rJ O] • f')t, I< f I ]L- - .
._~t_jt_:__0
lD\.t()t- ~ o .
---
--- pr1ri_\f'. ( '' \I) fn.let.. ..\-he num be~ er pnr-'. "-~; -
Sea" F- ( ,~ ·/ .. d .'' ? nJ.,
-- tu

L---------iP'--r_,n_l_~_(~'-' n--.::~:.......:....:.k'_~_-+----=he:::-..
......!...\ ........ip~o::..:....31-=e::.__:__:_nu_:_m--=-b..:....:e,e-=-.S----=:-'_n_'.....:...' ; _
J___!_.

4Dr C r~1; l<~n; i1-+


[

Sc q n f. ( '1 '/ • g ' , ~ no) ;


SI
-fu r ( r= D ; r< no ; 1++)

j:: 0 j__ -- - - - - - - - - -----· ----


____ e~_;ii l_~J_!!'L.S·h,'njJ_{:_ _.£9-j~ -+~~~-! '" ");___
11

- - - -f-or ( i,:; l ; .i~= n ; l ++ ) _________ ______________


-1-- - --~-=---~-~~-__--- ---- - ·- ------------- ---
------ ----·-tin~~ (•I.,. d l~\~i-_'-1',_:O_:_:r~,J-L.)~_;- - -
}lo~ :; 0 j ______ _
'------- -fo-r- ( K=- o·, K <. no ; K +-+ )

f lo ~ l ;
r--- ----· ---- - - - -- --·- -- -- -- . - ·-· -

I
bl• ~ CO U'1 t )j
'
I

pn n+~ ( '' p<:19 e


J
..feull- ~ 1
I

I
re.Mf\ oj
I

'
9e~ ( )_;
I
l
-
~
I (jtJ.l-f>\J t ;- 8)~ --the po qe. nurnbet :
I ·J

J s- ..

1. 3 --
--
J J
-
·- --- ----- ----
2
1
.-1
b
-
_,,-

s t _,,..

2 2 __,,..

1 1 ---
b ~ _,,.
:
2
:::::::::
- -I
\ 111. Rtso urces fl' . - ---- · --
4111n.•d ( \<J ..
:-s,:.
i ,, o.
f-·- -+--- --
·--- ---
~am e of Re --
sourc e
~
d1ti11nal):
-
Uroa<J S
·---- ~
1
. Jll'tilit·1tlion
I
I
Com puter Systcin l H1t·1:~..,01 ( 1 \
2<,B and I - 1'i ), kn111trk1 (If au\)
l{AM
•I lll\\_• ( J\
lh'l· d 111 ( )"-' ~ Jlt I
2. l ·"' l
Oper ating S'\J••t
J :, l' tn
1111 , I 1111 ,, I II I\.• 11 1 r l,.111 ti
nth ,· t 11 11
11u/ a11 y I 11r all
--- 0
' llll l· 11 ,,1
1wr.1t111,,t.· ~,
• 1 111 l l'!\

.,., \ 11·11,
·
\ 111
( IIWlll rtl nl ;.

IX. Rcso u rcl's USl' I

I
I
I
Sr.
~o.
~
I
---
am~ of Reso urc e
• < (,\ddi tiona l):

- ·~
- ~\road SJH.'dfin1Cion
r ()11a11tit y lfrma rk s (If :. n~ J
i
!
Com puter Sysh.' tn

Op~r ating System --- --

X. Proo ram Cod . 1·eachc


Page Refe rencee.Strea
o r must ass·-,
m: · · •gn a separate pro~ram ~•atc ment to studt :nt\.
1_ 2 3 2 l 5 2 1 6 2 5 6 3
3 6
r
l"\ote: Atta ch the code at th d
e en .
2 4 3
f\ l-ec ...\he_ n \J rn 'b~ cl +ram ci ~ 3
XI. Resu lt (Out put of Code): tl
JL .~:1-1:l '.'.~ ......................... -...... .P.a.:'l.<! .. ~~-~.e..J_. .... ........ ............ -----.-..---
............r

:: ::: ::f. : : : : : : : : : : : : : : : : ::t. ::::t:::::: ~tL ::: ::: : ·.: _·_:.:·: : : · _ ··_ : :
.............3"····· ··················· ...............4,· .......... ~

~ ............ ................................................... .
~

Po~e toult- rs I~
XII. Prac tical Rela ted Ques tions ·
Sole : Belo w given are few .wmrp/e quel·t iom for rcfere
m·t. T,-udu•r nuut Jc-~ign
more .5 uch quest ions so as to en.rnre the achiei emr11t of
idelllijied CO. 1

1. State the advantages and disadvantages of FIFO .


2. Wha t is page hit?
3. \Vhat is page fault ?
4. Count numh cr of page hits in above mention c\am pk giv~n
in scl·tlon X

(Spal'c for answer)


....'iii .... ............................................. ..... .......... ..... ....... ....... ... ...... .......................................
~
. ..... ........ ..... ......... ........................ ..
...... ~ ........ .. ..... ................ ..................... ...................................
....................................................... .
~r.s ,, ~d.!~.~?.~.~~...:~ ................................................................................................
............................. J ·l ' i PQg ~ undet S~incl
.
.......................................:...~. !.<1:.p. .. ~ ..... f ..... ....... J'" . . ... . . .... . ;. . . . ........... :. ··············"·· .......
Mahara~ htra state Board of Technical Education 'J3
········································· ·············· ·················· ················
f'\ ' , , . ········ ····· ·· ··········· ···· ................. .... .
....~· .'. ~ ~.~. \ ~.~ :t:?..J f ~.. ---~........................................................ ........... ... ...... ......... .. .........
........... .

:: ::::::::::::J•.~ •• :-=~:) ~'lel;;;L:;~~~~:::~~


: ~1~~.-5:~os!:~ ✓~. ::~':: :
················?.: ....... ~.~~ .....P..~J~·· ·\~...... ?~~~~ ....~~.~.~: .... ~.~......
~f:.l. ~.~~.~ .... 7~.~... ~.~.S.::::: : :
············· ········· ························· ···0.·~·~··· ··?.~.~ ................
......... .......... .. .............. ............. .
········
················ ········ ········ ········· ····················· ·· ······ ········· ········
2. ········· ········ ······ ····· ·················-··· ·· ·············

~(:~::::::~i::::2?i~::::s~:t:::::;:~:~:: :½::;:;:::::;;;~:~:::::i;.~.;:::::;:::;1~·~~·~~·::
...........P.~.~~....i.$....?..1.~9.~·J-··· P.r.~~~.0+... .r~ . :#:.~.....~ ~.1.~ . ...~ .~"!'l.:.~···•1:
....~.r:i..~~ .......
·············~1.~~.~f~j .....9~~.~t~~......Y9.~.~.~~L ...~~~~.i.~l··½
···!~½.~...!!. ....~!:.'....~.~~.0.1., .
.. ........ ....§ ½:.<?.i~·--·--····· ............................................ .......................... ......... ................
.............. .
........ ........ ... ....... ....... .................... ......... .. .. ... ...
..... ..... ... .. .. .... ....... .... .... .. .. .................. ..... .. ........
.. .......

... ............................................ ......... .................. ................


........................................................ .........

... ... ........ ········ ··.. ,· · .....·························································-


···················································...
.... . .. ... . .. . .. .. .. . .. . . ... ... .............. .... ...... ...... ·······-······..·-·········--··.........
--·
......... ····••····· .............. ,.~ ..............
. •• •·· ·••·· · ·•• ·• ·•• ·· •• ···• •• • . •• • ··•••••·•
·•••• ..... . . ......... .. _•-••- •uuou o........ ........ ... . ........ ......
••• ••·•• • • • • ~

Mahans~ htra state Board ofTccbnical ~C►


lllcl-
:!r·.'·1~11~· ~ ..11·~, ~;_;< )~

Xf 11. f,\ {'r C i\e :


'!._ __ _
--
rcfi• tc 'i lfln , , n in the
I Con,,Jc:r the t:r<:r1 ,,. /, 7/ ,. I .2 7 l rhc: n,111,h<:r IJ! tr amt
our th . 11 g ~r, t . 7
memo') is 3. hn d '>pw dl \ C (J
c.: n mh
'- l PJ J;L L.1 11/t, and PJ tf C: hll rc:
I . FIFO p tnl /,
. age rcplat·1:rn : rJ ;.•,1J1/m1
al Pa ge rc pl .u
2 Optim
n.:nlac:u .. l'llH:J/,nt,,Jl!f 11 111hm
3. Ll<U Pa!!c - ,, n1:n1 111n
( .om par-: J- ll- () and LI< lJ. t 'Ill
2
.................... . ········· ·
- ,.,;;;i......... ...... ............ ··· ···· ······ ··· ··· ··· ······ ················· ....... ·······
········ ... ... ... ... ... ... ... .
. ..... ...... ... ......... .... ............. . ··· ··· ····· ··· ···· . ........................... ... ...
...... .... ... .
~~ ··· ······· ··· ···· ··· ... ..................... ............ ....
..., ...... ...... ... ... ... ... ..
~·rs ·~ ··············· ······
··········•....... ............
... ... ... ... ......... ......... ... ........................ ......
·······•• ........................
.........
.... .... .....
. ,.. ......

- - - - ~ A . U J · · ·. . ,
)
(Space for Am,wcr
···
I
········-·--·-····1···r···o--
r
ri;- ~ ;;- ~------i"- - - ;- -_-_-___:-_:- -~ :: -:_--
: J:-:--~: ::_l?: --_-_-: : :- --_-_--/
.

;}fiJ C'.". r.~_r ''j --- -


-- - - --t~ ~-- iJ_ __: 5_t~I:: It f) I ! LP._u, __ ; \;

:~~>%~:t_!\¢{_±~:?;:::-:;~;!:
-: - :~~:-:~~t:.t:-#i?i\t:~~:; :j ;j
1
·, -! :
, lrr r. 1 el Y 'e r 1--... .. .. . .
"lh"~ 3. Ccrrol~...-;......-4.:
·.. ·········· ··········J...
.... .... .... .f.. ... ... ... ..
...
-io.........ilY... lp··'f-····'fY
·· ··· ···· ····· ······· ~
3 S ; m n le.........
... 7'.= -:7 •• .•• •
." • • :: •.
.................... ... .., ... ... ... ... .
... ... ... ... ... ...
... ... .. . ... ..
.. ·.":' :-.';

. ... :-::-:-:-:-:-:-:·
. .. .. . .... . . .

~
... ... ...
.............. .
...........................
... .. ... ... .. ...
.••-. •• ••• •• .-::-
•• •
·· ................... ......
······ ··· ·········· ·········
················ .. ···· . ······
············ ···············
j

ca/ Educa1ton
stale B<iard 0 f r ccluu
M.ih,m1~h1ra
\
..... -~~,- ·•· :-:~;-- , ,+··, ... i-,-, ;··J( I . i..J fi·--') 1·,··~j·~, .. , r1 . . i.. ········....
2

J·) .i l.r:. ;: I/:./ 1-;J.l. )dl,i!. :{ JJ.::. l;::/Jf r :·_:::······


x,, . R,·fr rt'n n·~ ~11J!:,.:,·,cion1 for Fur fha lh-.u
lin i,:
I h::r~ " " " tuh, nals poin t l'(llll lllltX
:. !~t·r """ -~'-· .surn.-y .ac .uJ... 'Tl•,,d1111
g,1 l lnix /
-~ hr:r , ""~ .l·s .~fu .c&'~ ggbakl:r, rekr
l'm:.:!un ix/

Pl'r form anc e indi cato rs \\'ei ght age


Pro cess relatt'd (35 :\lar ks)
Log,c. f◄onn a tton
... 0

-
~
Dcl lugg ing abil ity
30%
-~ J-ol low ethi cal prac tices
10%
Pro duc t rela ted (15 l\'larks)

30¾
➔ L\p ccte d outp ut
lOo/o
5 Tim ely Sub m issio n
10%
6. Ans wer to sa mpl e ques tion s
1O'!t·o
Tot al (50 ~-lar ks)
100 %
Li,r ofSt uJ,, 111\· /Te um ~fem hers
I ... . . . . . . . . . . . . . . . . . ,, ..... ..... .. ..... ..
."'. . . . . . .. . . . . . . . . . . ... . . . . .. . . . . . . . .. . . ...
3 .. . .... ..... ..... ..... ..... ..... ..... ..

r --- - - -

L-----
Pr0<:t·,,
Rda ttd( 3 5)
- -
,\ 1ar lu O1, tailu•d
-- - - - ---·- -
Pro duc t ffrl.tttd( 15)
Dah.•d si,:nature of
Teacher
Tot al(S 0)
- ---- -·- -- --

. •

You might also like