Mid Sem 2024
Mid Sem 2024
\ 11 I) IT R \ 1 I.~ \ ~ II \ \ I I O \
inin g.
"
0
te: .\ ttempt Q. ~ o. I, " hich is compulsory and two more questi ons from th e rema
Q. 1 (2 marks each)
(a)Wh.ll are Re..11-Time S) stems. and " hy ;.}ft! they critical in certain applications? [CO I ]
( b)\\ hat resources art'•~ pically managed by an operating system?
[CO I]
(c) \\'hat is the difference bet" een paging and segmentntion? [CO l ]
(<l)E,pb in three requirements that a solution to critical-s ection problem must satisfy. [CO2J
[CO2]
(e)Desc ribe shon - term, medium -term and \ong-tern1 schedule r.
Q .~ t:1)Expl:iin PCB. Oro.\\' the block diagram of process transitio n states. [CO2](.5 marks)
three
(b)Consider the page reference string: 1.0,7.1.0.2. l,2,3,0.3,2,-l,0,3,6,2. l fo r a memory wi th
ent
frames Determine the number of page faults using the FIFO. Optimal, and LRU replacem
algorithms. \\'bich algorithm is most eflicient ? (5 marks) [CO I]
Q .3(a)Exp lain the difference between External fragmentation and Internal fragmentation.
I]
Explain Paging and hov..· to solve the fragme ntation problem using paging. (5 marks) [CO
(b)\\'ha t is the Dining Philosophers Problem. and outline a solution using semapho res.
(5 marks) [CO2 I
()Al a)Calcu late a\·erage waiti ng and turnaround times by drawing the Gantt
chart using FC r S,
p,._•l.'mpt i\·e SJF ru1d RR (q=2ms). (5 marks) [CO2 !
(b)h,pl ain Batch. t-.,. fultiprogrammin g, and Time-Sharing Operating Systems. List their
aJ, ;.mtages and di s:id \ antages as well. (5 marks) [CO J]
=t U. 3
'
( Plea se write your E nrolrnc N . • ("\f'IC) \ I ?_ ) ()
.
11 1 o. 11nmcdtutcly) Lnro lrncnt No. ~ ~
Max. CO(s}
Q.N o. Question
Mar ks
tipass Com piler . 2 I
1 (a) and Mul
Differen tiate between Single Pass Compiler ble 2
')
(b) I Exp lain the tenn s Tok en, Pattern and Lexeme with the help of suita
example. ·2
Where it is used? 2
(c) What is meant by Handle & Handle Pruning? 2 2
in context to lexical analyser.
{d) Exp lain the sign ificance of Input Buffering l & 2 2
LALR is most powerfu
(e} Which of the parser among SLR, CLR and
why? 2
abb + a•b•. Convert it into 5
2 (a) Des ign NFA for regular expressio n a+
equi valent minimum state DFA. 5 I
for the expression a=b* c+d.
{b) Explain the phase-wise working of compiler .., 2
ire to eliminate it? Eliminate
.)
LL( l) or n9t
S-+ iCtS S' I a
S'-+ cs IE
C-+ b 6 2
table for the following gram mar
4 (a) Constru ct LR( 0) Parsing
S-+ L=R
S-+ R
L-+ *R
L-+ id
R-+ L
y Non -Ter min als in the 4 2
Wri te the Lea d ing and Trai ling tenn inals of ever
(b)
gram mar
E - E+T IE- TIT
T-+ T*F IT/FI F I I
F - (E) I id
( Pka, l' ' Hill' ~our Enro llment no Iii .
. ir11ctli ntch ) Enrollm"nt 1\11.Q~\\ ~C).1;-:.J .~
l\ IID-TERl\1EX ,►\lVll NAT ION
B.TE.Cll. PRO(; R \ \l:\l E:.s (l''.'1>£R 1'11 E AEG IS OF\ S IC I')
Combinatio n
I
Manqo es O ranqes
A 1 14
B 2 g
C 3 6
D 4 4
E 5 2.5
4(a) Apply a ll the concepts of the " T heory of Consumer Choice" to a real- 5 2
life problem.
Prob lem: You have SIOO to spend on food for the month. You have a
wide variety of options, but some will provide y ou with hig h e r
opportunity costs tha n others. You could purchase enough bread, rice,
milk, and eggs to feed yourself for the full month or you could buy
prl'mium-cut steak and store-prepared dinners.
➔(b) E xplain thl' concl'pt of the Demand sick :.\l\d supply side of the market 5 1
in details.
------
Plc,lsc W, itc v >111• I
.; ' ·nrolrncnt No. ln11ncclitttcl
•
Y.......................... .
()1.
t.)2
,I ) 1 _xpl,iin I hL· Iunction ut I\ l,\C · l-,llh-1.,) L'r. 11l,11 L'Xplu111 the ,Hh ,mlal!t:.., and
or (
d,,,,d\'llllllll.!l'S '011k11t11111 free & ( lllllcntinn h.1,cd medium ilCC\.''iSCd ~,r.,L(' •ic
(5m11rk'iJj((J II
h l I h-.· c, en p.1rrt) h:u11mi11g l'11dc tr,111s111i1tcJ l'i 11 IOU 110 I ,111<1 the rc1.:ch cd t.odc ,.,
l llll!OI IOI lklL' L' I 111111 n 1rrL·,·1 the L'rrt•r IJ.,ni th,· n.·cch..:c.l c<>dc. (5 mur~,;) If fJ l \
()"\ .
u) \\'hat i~ 1 lmv con tr,11') I '\pla111 \\ith di.,gram th,: com:cpl ol J,,m.igcd or l0,1 lrt111\L.' in
( i0-1\:\CK-N AR<.}. (5 m ,rks> ten ~I
h) I f a pl·riodic siµ1111l j-, Ul'COIUpo-.~·J in lo th e -.i nc \\ ,l\...:~ \ llh 11\'(lllCl\dt::. ,r mo. ,oo.
500, 700. uml 'JOO 111. \\ 1h11 1, the h.111lh\iJ1h'? Or,1w the ,p.:clrum. u,-...umrn 6 .,lt
component-. ha, c n ma,imum amphtuJL or IO,. \,;; n .,rks) ll l) 2 \
~ote : Attempt Q. '\ o. I "hich i, compuho~ :rn(l 3n) l\\h mort qut,t1on, fr 11n rr1 u 11 ,111.
Q. '\ o. al
,1.., ( 0 ,,
, , .. rt.,
a.
b.
- Defi ne _(.reed1 •\_Q_proach. Aho \Jen lion it, propatie, 2.~ < O!
\ \ hat 1s ll a m1ltonian C)cle Prohlem? Llplain \,i1h thl· hdp of .in 2.:, ( ()~
nam ple.
c.
Comp are Merge \O r i and Quic"~ort w.r.110 their ri me comple \lly :i nd 2.5 CO i
• space complex it\ .
d.
• ~ h e r e ~nce relation T (l!,)=2"1(n-lJ O(_n} 2.5 COi
2- - - ;
a. ll ow Str as'ien 's Algorithm u~e~ di \ idc and conquer to reduce the rime 5 ( OJ
I com p_'exit\ of mn tri~ m ultiplica1ion?
Consider 5-cha racte r le'<t fi le \, it h frcquenc) of occurr ence oul of 100 5 C.O.!
characte r~ as m ent ioned a =SO¾, u-5°/0 , c= 10%, d =J2¾ . c 3°'o
Design lluffman code fo r th is. Aho calcuJ:u c t he percentage o f ~pace
I
_ savings in co m parison to fixed length ~
a. Define variou~ o perati on!> o n d bjoi nt ,,ets di~join t ,eh. llO\\ 1he lim e lO\
co mple x ity o f operat ion, o n lfojoint set~ ca n be n·d uccd u <,i ng
h e uris tics.
h. L.bt the pro blem , in \\ h ich ha cl-t ra r l-ing can be a pplied. ~oh c n ( 0"!
cp1ce n proble m u ~in g ha cl- lrac l-ing.
..... ....
Roll No ...................................
, imm ediately)
(Please wr ite you r roll No
24
Mid Term Examination, Sep 20
ing
Su bject: Softw are En gin eer 30
th
MM:
Sem est er: 5
Pa pe r Co de: CIC-309
Tim e: 1.5 Hr s
res t. _ _ _ _ _ _.
. Attem pt any two more questions from the
No te: Q. No I is Compulsory
(2x 5= 10)