D
1'Uvi 1 \Jla1ruJ 2561
•
nm
09.00 - 12.00 'U .1'!11 CPE 326 Operating System 'U.f'l. 'Jf'l.RtllJ'Yi'JL\Jltl'hJ'Vl 3 Vl"fl~\Jl'lfl1~1 .. ~~..i .,
1
VitifbiTu.
1. 1i't1t.18U:U 2 '11'U Rtl.L'U'U'l'JlJ 50 Rtl.L'U'U
cl1'U'V1 11i't1ae:iutJ1,!vil 15 -iie:i RtU.'U'U1'Jll 15 RtU.'U'U 1.LIJia:::1ie:imlililr111J1e:iu'V1~nlJ1nn11 1
~'JL~eln lilt 1~Rt LL 'U'Untt1milm~elflrl1\Jl8'U'Y1\Jn 1~R'l'U
I -=J II' IV U ,RI II'
r.11'U'Vl 2 'U8r.1el'Uel\Jl'UVlJ 4 'Uel RtLL'U'U'l'JlJ 35 rltU.'U'U
2.1vfvi1-iie:iae:iu1:ab'U'V1 l "~1'U~1-iit1at1u cl1'U'V1 2 vi1a~1'Ut.1lJi,ir111J1e:iu
•
3. el'4qj1\JI
1m-if
u-i1e:i~rl1'U1N i'UU."t~Vltl~lJVl11'VlV1~Vf11Vl'U\,l 1~4. Wel'4qj1\JI 1 Vl'IJ1Lelflr.111 L\,l "] L "U1Vlel~r.18'U
5. L;V'U~e:iu.a::: 1ia\J1:::,h~1 a~L'U~1-iie:iae:iuvinu.e.l'U
(el.11'!11'!1"tl ah'!lina\JI )
€e:it1n-iie:iae:iu
d QI ocv ~-=ii
'!18 ... 1Vlr.1tht'11\Jl1 ... '!l'Utl ... .
~cl ... ":il1i:1\ht'ii1~1 ...
iuu ... .
fl1\,I~
1
~tl?ltl'\J'U'j'IJ£1 (15 fltLL'U'U)Mark all the correct choices in each question. Points will only be awarded when all the correct choices are selected.
1) The interval from the time of submission of a process to the time of completion is ref erred to as
a) Waiting time b) Turnaround time c) Response time d) Throughput
2) Which statement(s) is/are true in priority scheduling
a) CPU is allocated to the process with the highest priority b) CPU is allocated to the process with the lowest priority
c) Equal priority processes cannot be scheduled if a single queue is used d) Priority scheduling policy can be used with the multiple queues concept e) Round robin is the only policy that is used to schedule processes of the same
priority
3) Processes are classified into different groups in a) The shortest job scheduling algorithm b) The round robin scheduling algorithm
c) The shortest time to completion scheduling algorithm d) The multilevel queue scheduling algorithm
4) In an operating system, each process has its own a) User address space and global variables b) Heap and stack
c) pending alarms, signals and signal handlers d) Ready queue
5) The address of the next instruction to be executed by the current process is provided by a) CPU general purposed registers
b) Program counter c) Process stack d) Process pipe e) Process context f) Process heap
'VfJffilt11'if7 CPE 326 Operating System. mmmFJnnnn1!1T;j 1/2561 'IIIU7rf 2/5
.,I ",Jo-., ~~
'tlel ... 'l'Vl'1 'l~~1~1 ... 'tl't.lu ... .
6) Which of the following system calls does not return control to the calling point, on termination
a) fork b) exec c) wait
d) none of the above
7) The following C program : main()
{ fork0;
fork();
printf("hello");
}
How may time the word "hello" will be printed a) Only once
b) Twice c) Three times d) Four times e) Eight times
8) If a thread invokes the exec system call, Which statement(s) is/are true a) Only the exec executes as a separate process
b) The program specified in the parameter to exec will replace the entire process c) The exec is ignored as it is invoked by a thread
d) None of the above is correct
9) A process having multiple threads of control implies that ...
a) It can do more than one task at a time
b) It can do only one task at a time, but much faster c) It has to use only one thread per process
d) None of the above is correct
10) Resource sharing helps
a) Share the memory and resources of the process to which the threads belong
b) Applications to have several different threads of activities all within the same address space
c) Reduce the address space that a process could potentially use d) Reduce the time needed to create a process
4fa@U~'if1 CPE 326 Operating System. mnunFJmJf!m:11rf 1/2561 V1u1rf 3/5
;la ...
1«i:1th::'ii1i11 ...-ffui'.I ... .
11) Which of the following is FALSE
a) Context switch time is longer for kernel level threads than for user level threads b) User level threads do not need any hardware support
c) Related kernel level threads can be scheduled on different processors in a multiprocessor system
d) Blocking one kernel level thread blocks all other related threads
12) The state of a process is defined by a) The final activity of the process
b) The activity just executed by the process
c) The activity that will be executed next by the process d) The current activity of the process
13) Which of the following is not the state of a process a) New
b) Old c) Waiting d) Running e) Ready f) Terminated
14) In UNIX, each process is identified by its a) Process Control Block
b) Device Queue c) Process Identifier d) None of these
15) If one thread opens a file with read privileges then
a) Other threads in the another process can also read from that file b) Other threads that belong the same process can also read from that file c) All other threads cannot read from that file
d) All of the mentioned
'fffJfffJU7"ff7 CPE 326 Operating System. nm~mFJm1Ffn'l!n~ 1/2561 YJU7~ 4/5
~ fl.# .1 0 ..., :::: :"I
'!!B ... ~'111'1u~::liJ1\Jl1 ... '!!tJu ... .
a ... .,
1'U'rl 2 "Uel"1el\Jel\Jl'IJE.J.., ..,
(35 filtLL'IJ'IJ)
1. ,l~e)fi\J1E.J'VlannT~ t11fi'IJ1fil11G'l1"U1'1t1~\J~f111\)f1fl1\Jl1lJR1 Lfm1im1~(;1f111LL\J\J Multi-level Feedback Queue (MLFQ) \J11E.J1E.Ji1~eJane:i~vilJLLatn!)Lf1Wvl'l-ffLViE.JtJn\Jf1111~\J~f111\)f1~1
LiJe:i1m~
Turnaround time "tJeJ,mn~1-vi~vi"1(;1 (8 filtLL'IJ'IJ)
" '
2. '1~elfi\J1E.Jf111Ln(;}f'IJ"Uel~ Internal Fragmentation LLat External Fragmentation a1w!tJf111'1eJ~
~'Wvl'l'IJ'Vl'l.hE.JR113.J,J1'VlammtJ1i~'IJ'Viltim~e:i~ (Contiguous Memory Allocation) n·fo3.J~~elfi\J1E.Ji1~
~an1t'VI\JLLatLL'IJ1'V11~f111~(;1f111'l1L'VliJeJ'IJ'Vl~elLL\Jlf1\Jl1~f1'1JelE]1~h (5 filtLL'IJ'IJ)
3. f111'1el~~'IJv!'l'IJ'Vl'l.l1E.Jf111lJ,J1'Vlan L(;JE.J1'ffLL'IJ1R(;lviL~E.Jf111 Paging Scheme ,J1L'U'IJ~eJ~1i Page Table ,l~e)fi\J1E.J()~fl11lJa1~qj'tlel~ Page Table &'11'1Jf111L~lJ'lhta'VIG.fl1'nf1WV11~1'1J"Uel~ Page Table
"113.J11'114HL'VlfiliiR'ViL~E.Jn11 Inverted Page Table '1~eJfi\J1E.J'Vlanm1vi1~1'1J"UeJ~ Inverted Page Table LLi;ltLL~lJ3.J1'1Jf111L~l.J'lhta'V16.fl1'n (5 fltLL'IJ'IJ)
4. -n,111w11t\J'Utl~mlm1vilim1~(;1f111wu1E.JR113.J,J1'VlanLL'U'U ' Paging Scheme il Logical Address
64 L'n'1 LL9iatLW'1i1"U'IJ1(;} 1024 1u~ ~~'V11~1'1J~f1\J'llf'IJ1E.Jfl11lJ,J1'Vlanviil Physical Address 32 L'Wil.l '1~'UeJf1,J7'1J1'1JV\Jl"UeJ~ Logical Address LL'1~ Physical Address (2 RtLL'IJ'IJ)
5. '1~1'17'1J1W'Vl1 Physical Address ,11n Logical Address "U'IJ7(;1 16 V\Jl ~B1t'U'Utlflmlm11-&'16 Segmentation LiJeJ,Je)~~'IJm'IJ'Vl'IJ1E.Jfl11lJ,J1'Vlan LLati1 Segment Table ~~m11~~1'1J~1~ L(;IE.JG'll.J~~
1~ 4 V\Jl\J'IJLtl'IJii'1tJeJm"llmlJ'IJ~ (~el~\Jlel'ULU'IJ,'11'1.Ja\J) (5 filtLL'IJ'IJ)
Segment Base Size
Code 32K 2K Heap 34K 2K Stack 28K 2K
5.1. Logical Address L'U'IJ 320 (Ll;l'tl,'11'1.Ja'U) 5.2. Logical Address Ltl'IJ 2561 (La"U,'17'1.Ja'U) 5.3. Logical Address L'U'IJ 12528 (La'tl,'11'1.Ja'U)
6. t11L'lflE.J'ULviE.J'U1t'U'Utl~'tmf111~1L~E.J1f1'1J viilm1Lae:in1'ff"U'IJ1t,1 Page LL\Jlf1\Jl1~f1'1Jflel 'tl'IJ1(;}L~f1f1'U"U'IJ1(;1 1'Vlqj '1t&'1~~i;1f1'Uel\Jl11f111Lf1(;1 Page Fault LL\Jlf1\Jl1~fi'IJeJE]7~h (3 FltLL'IJ'IJ)
7. '1~LLG'l(;}~\Jl111~ Frame "Uel~'Vl'IJ1E.Jfl113.J,J1'Vlaf1 LLat'1~1'11'1J1W Effective Access G'l'11'1Jtf111ruf111L-ihfi~ Page \Jl13.Ja1~\JltieJhliJ (7 fltLL'IJ'IJ)
7,
o,
1, 2,o,
3,o,
4, 2, 3,o,
3, 2, 1, 2,o,
1, 7,o,
1 (,!u1~ 20 ii'1)- ,J7'1J1'1J Frame Rel 4
- L1a11'1..1f111L-if1i1~'Vl'IJ1E.Jf1113.J,11'Vlaf1L'U'IJ 9 ns - L1a11~m1L-ii'1fi~'Vl'IJ1E.JFl11lJ,J1ri11e:i~ 25 ms
7.1. Lile:il-if Pag~ Replacement Algorithm L'U'IJLL'U'U LRU
.,j ...
Time LlJellJ
7 .2. ,11n.if e:il.lm1a11 '1Jf111L-if1ti~'Vl'IJ1E.lfil113.J,J1'VlamLatri11m1J11l.l'Vln1'Vl'IJ(;}
H
t11~e:i~m11~
EAT 'n1f111"
L1a11'1Jf111L-ii'1fi~'Vl'IJ1E.Jfl113.J,J1'VlanblLn'IJ 100 L'Vh page fault rate R11ilfi1LU'IJeJE]1~h
Tfafffltlhn CPE 326 Operating System. nm.JmFJm1F!n7!nrf 112561 VJ1l?rf 515