tag:blogger.com,1999:blog-57127902739330373672024-03-14T11:50:35.392+05:30Computer Science and ApplicationKalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.comBlogger65125tag:blogger.com,1999:blog-5712790273933037367.post-77660603219843997332012-05-20T12:24:00.000+05:302012-05-20T12:36:08.196+05:30UGC NET Computer Science and Application December 2009 Solution<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Georgia,"Times New Roman",serif;">
<style type="text/css">
pre.cjk { font-family: "WenQuanYi Zen Hei Mono",monospace; }pre.ctl { font-family: "Lohit Devanagari",monospace; }p { margin-bottom: 0.08in; }
</style>
</div>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">1. If she is my friend and you are her friend, </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">then we are friends. Given this, the friend relationship </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">in this context is ________________.
(i) Commutative (ii) transitive (iii) implicative (iv) equivalence
(A) (i) and (ii) (B) (iii) </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) (i),(ii),(iii) and (iv) <span style="background-color: yellow;">(D) None of these</span>
2. Circle has ________ </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) No vertices</span><span style="font-size: large;"> (B) only 1 vertex </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) vertices (D) None of these
8. The highest noise margin is offered by
(A) BICMOS </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) TTL</span><span style="font-size: large;"> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) ECL (D) CMOS
9. The answer of the operation (10111)<span style="font-size: x-small;">2</span> * (1110)<span style="font-size: x-small;">2 </span></span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">in hex equivalence is
(A) 150 (B) 241 </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) 142</span><span style="font-size: large;"> (D) 101011110
10. How many ‘1’ are present in the binary representation of
3 X 512 + 7 X 64 + 5 X 8 + 3
(A) 8<span style="background-color: white;"> </span></span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"><span style="background-color: white;"> </span>(B) 9</span><span style="font-size: large;"> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) 10 (D) 11
11. Recursive functions are executed in a
(A) First in first out order </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"><span style="background-color: white;"> </span>(B) Last in first out order</span><span style="font-size: large;">
(C ) Parallel fashion (D) Load Balancing
12. What would be the output of the following program, </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">if run from the commandline as “myprog 1 2 3”?
main(int argc,char *argv[])
{
int i;
i=argv[1]+argv[2]+argv[3];
printf(“%d”,i);
}
(A) 123 </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) 6</span><span style="font-size: large;"> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) Error (D) “123”
13. A ________________ is a special method used to initialize </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">the instance variable of a class.
(A) Member function (B) Destructor</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"> </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) Constructor</span><span style="font-size: large;"> (D) structure
14. Encapsulation is
(A) Dynamic binding</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"><span style="background-color: white;"> </span>(B) A mechanism to associate the code and data</span><span style="font-size: large;">
(C ) Data abstraction (D ) Creating new class
15. Which of the statements are true?
I. Function overloading is done at compile time.
II. Protected members are accessible to the member of a derived class.
III. A derived class inherits constructors and destructors
IV. A friend function can be called like a normal function.
V. Nested class is a derived class.
(A) I,II,III (B) II,III,V </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) III,IV,V </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) I,II,IV</span><span style="font-size: large;">
16. The E-R model is expressed in terms of
I. Entities
II. The relationship among entitites
III. The attributes of the entities.
IV. Functional relationship.
(A) I,II (B) I,II, IV </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) II,II,IV <span style="background-color: yellow;">(D) I,II,IV</span>
17. Specialization is ________________process.
<span style="background-color: yellow;">(A) top-down</span> (B) bottom up
(C ) both (A) and (B) (D) none of these
18. Match the following:
(1) Determinants (a) No attributes
(2) Candidate key (b) Uniquely identified a row
(3) Non-redundancy (c ) A constraint between two attributes
(4) Functional dependency (d) Group of attributes on the left hand side of arrow
of function dependency
<span style="background-color: yellow;">(A) 1 – d, 2 – b, 3 – a, 4 – c</span> (B) 2 – d, 3 – a, 1- b, 4 – c
(C) 4 – a, 3 – b, 2 – c, 1 – d (D) 3 – a, 4 – b, 1 – c, 2 – d
19. A function that has no partial functional </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">dependencies is in _____________ form.
(A) 3 NF <span style="background-color: yellow;">(B) 2 NF </span></span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;"></span>(C) 4 NF (D) BCNF
20. Which of the following statement is wrong?
I. 2-phase locking protocol suffer from dead lock.
II. Time stamp protocol suffer from more aborts.
III. A block hole in a DFD is a data store with only inbound flows.
IV. Multivalued dependency among attribute is checked at 3 NF level.
V. An entity-relationship diagram is a tool to represent event model.
<span style="background-color: yellow;">(A) I ,II,III</span> (B) II,III,IV </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) III,IV,V (D) II,IV,V
21. If the number of leaves in a strictly binary tree </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">is an odd number, then what can you say with full conviction </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">about total number of nodes in a tree?
<span style="background-color: yellow;">(A) It is an odd number.</span> (B) It is an even number.
(C ) It cannot be equal to the number of leaves. (D ) It is always greater than twice the number of leaves.
22. The number of edges in a complete graph of n vertices is
(A) n <span style="background-color: yellow;">(B) n(n-1)/2 </span></span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;"></span>(C ) n(n+1)/2 (D) n2/2
23. At a hill station, the parking lot is one long drive way snaking up a hill side. </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">ars drive in and park right behind the car in front of them, one behind another.</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">A car can’t leave until all the cars in front of it have left. Is the parking lot more like
(A) An array (B) A stack</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C) A queue</span> (D) A linked list
24. With regard to linked list, which of the following statement is false ?
(A) An algorithm to search for an element in a singly linked list requires O(n) operations in the worst case.
<span style="background-color: yellow;">(B) An algorithm for deleting the first element in a singly linked list requires o(n) operations in the worst case.</span>
(C ). An algorithm for finding the maximum value in a circular linked list requires o(n) operations.
(D ). An algorithm for deleting the middle node of a circular linked list requires o(n) operations.
25. A hash function f defined as f(key)=key mod 7, with linear probing used to resolve collisions.</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">Insert the keys 37,38,72,48,98 and 11 into the table indexed from 0 to 6. What will be the location of 11?
(A) 3 (B) 4</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C ) 5</span> (D) 6
26. Device on one network can communicate with devices on another network via a
(A) Hub/switch (B) Utility server
( C) File server <span style="background-color: yellow;">(D) Gateway</span>
27. What is the maximum window size in </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">sliding window protocol used in a computer network?
<span style="background-color: yellow;">(A) 4</span> (B) 8 </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) 15 (D) 16
28. Which of the following are Data Link Layer standard?
1. Ethernet 2. HSSI 3. Frame Relay
4. 10-Base T 5. Token Ring
(A) 1,2,3 (B) 1,3,5</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C) 1,3,4,5 </span> (D) 1,2,3,4,5
29. In case of Bus/Tree topology signal balancing issue is overcome by
(A) Modulation (B) Polling
<span style="background-color: yellow;">(C ) Segmentation</span> (D) Strong transmitter
30. Match the following:
(i) Ethernet (a) Deterministic
(ii) Token Ring (b) Utilize the full wire speed
(iii) Cut-through switch (c ) Prevent Looping
(iv) Spanning tree (d) Checking valid address
Codes:
<span style="background-color: yellow;">(A) i-d,ii-a,iii-b,iv-c</span> (B) i-a,ii-d,iii-b,iv-c
(C ) i-d,ii-d,iii-c,iv-b (D) i-d,ii-c,iii-b,iv-a
31. In an absolute loading scheme which loader function is accomplished by assembler?
<span style="background-color: yellow;">(A) re-allocation</span> (B) allocation </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) linking (D) loading
32. Which of the following grammar is LR(1)?
33. A shift-reduce parser carries out the actions specified within braces immediately </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">after reducing with the corresponding rule of the grammar.
S->xxW[ print “1” ]
S->y [ print “2” ]
W->S2 [ print “3” }, what is the translation of “x x x x y z z”?
(A) 1 1 2 3 1 (B) 1 1 2 3 3</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C) 2 3 1 3 1</span> (D) 2 3 3 2 1
34. Context-free Grammar(CFG) can be recognized by
(A) Finite state automata (B) 2-way linear bounded automata
(C ) push down automata<span style="background-color: yellow;"><span style="background-color: white;"> </span>(D ) Both (B) and (C)</span>
35. Synthesized attribute can be easily simulated by a
(A) LL grammar (B) Ambiguous grammar
<span style="background-color: yellow;">(C ) LR grammar </span> (D) None of the above
36. In the process management Round-robin method is essentially</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">the pre-emptive version of _______________.
(A) FILO <span style="background-color: yellow;">(B) FIFO</span>
(C ) SSF (D) Longest time first
37. A page fault
(A) is an error specific page
<span style="background-color: yellow;">(B) is an access to the page not currently in memory</span>
(C ) occur when a page program occur in a page memory.
(D ) page used in the previous page reference.
38. A semaphore count of negative n means (s=-n) </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">that the queue contains ___n__________ waiting processes.
(A) n + 1 <span style="background-color: yellow;"> (B) n</span> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C) n – 1 (D) 0
39. A program is located in the smallest available </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">hole in the memory is ______________
<span style="background-color: yellow;">(A) best-fit</span> (B) first-bit </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) worst-fit (D ) buddy
40. The unix command used to find out the number of characters in a file is
(A) nc <span style="background-color: yellow;">(B) wc</span> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) chcnt (D) lc
41. Software Engineering is a discipline that integrates __________ </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">for the development of computer software.
(A) Process (B) Methods</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) Tools <span style="background-color: yellow;">(D) All</span>
42. Any error whose cause cannot be identified anywhere within the </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">software system is called _________________.
(A) Internal error <span style="background-color: yellow;">(B) External error</span>
(C ) Inherent error (D) Logic error
43. Recorded software attributes can be used in the following endeavours:
(i) Cost and schedule estimates.
(ii) Software product reliability predictions
(iii )Managing development process
(iv). No where
Codes:
(A) (i) (ii) (iv) (B) (ii) (iii) (iv)
<span style="background-color: yellow;">(C) (i) (ii) (iii)</span> (D) (i) (ii) (iii) (iv)
44. Black box testing is done
<span style="background-color: yellow;">(A) To show that s/w is operational at its interfaces i.e. input and output.</span>
(B) To examine internal details of code
(C) At client side
(D) None of the above
45. The name of the transaction file shall be provided by the operator </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">and the file that contains the edited transactions ready for execution shall be called
(A) Batch.exe (B) Trans.exe</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C ) Opt.exe</span> (D) Edit.exe
46. The single stage network is also called
(A) One sided network (B) two sided network</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C ) recirculating network</span> (E) pipeline network
47. Analysis of large database to retrieve information is called
(A) OLTP <span style="background-color: yellow;">(B) OLAP</span> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) OLDP (D) OLPP
48. Which technology is sometime referred to as wireless cable?
<span style="background-color: yellow;">(A) MMDS</span> (B) ATM </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) LMDS (D) CDMA
49. Another name of IEEE 802.11 a is ______________
(A) Wi-Max (B) Fast Ethernet</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: yellow;">(C) Wi-fi</span> (D) 802.11 g
50. The unlicensed National Information Infrastructure </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">band operates at the ____________frequency
(A) 2.4 GHz <span style="background-color: yellow;">(B) 5 GHz</span> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">(C ) 33 MHz (D) 5 MHz</span></pre>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-61999291954192253282012-05-10T22:56:00.000+05:302012-05-19T17:05:56.398+05:30UGC NET Computer Science and Application December 2006 Solution<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Georgia,"Times New Roman",serif;">
<style type="text/css">
pre.cjk { font-family: "WenQuanYi Zen Hei Mono",monospace; }pre.ctl { font-family: "Lohit Devanagari",monospace; }p { margin-bottom: 0.08in; }
</style>
</div>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="background-color: blue; color: white;"><i></i></span></span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">Computer Science and Applications
PAPER—II
Note : This paper contains fifty (50) objective-type questions, </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">each question carrying two (2) marks. Attempt all of them.
1. Which of the regular expressions corresponds to this grammar ?
S → AB/AS, A → a/aA, B → b
(A) aa*b + </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) aa*b</span><span style="font-size: large;"> (C) (ab)* (D) a(ab)*
2. The proposition ~ q ∨ p is equivalent to :
(A) (B) (C) (D)
3. The number of edges in a complete graph with N vertices is equal to :
(A) N (N−1) (B) 2N−1 (C) N−1 </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) N(N−1)/2</span>
<span style="font-size: large;">4. Which of the following is not true ?
(A)
(B) A − B =A ∩ ~ B
(C)
(D)
5. If (a2−b2) is a prime number where a and b belongs to N, then :
(A) a2−b2=3 (B) a2−b2=a−b
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) a2−b2=a+b </span><span style="background: none repeat scroll 0% 0% transparent; font-size: large;"> (D) a2−b2=5</span>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">Here, a2-b2=prime</span>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">==> (a+b)*(a-b)=some_prime*1</span>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">==> a+b=some_prime; a-b must be =1 </span>
<span style="font-size: large;">6. The hexadecimal equivalent of (10111)2×(1110)2 is :
(A) 150 (B) 241 </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) 142</span><span style="font-size: large;"> (D) 101011110 </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"> </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">7. An example of a self complementing code is :
(A) 8421 code (B) Gray code
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) Excess-3 code</span><span style="font-size: large;"> (D) 7421 code
8. A sum of products expression can be implemented with __________ logic gates.
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"> (A) AND − OR </span><span style="font-size: large;"> (B) NAND − OR
(C) AND − NOT (D) OR − AND
9. The characteristic equation of the D flip-flop is :
(A) </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) Q=D </span><span style="font-size: large;"> (C) Q=1 (D) Q=0
10. Which of the following logic is the fastest ?
(A) RTL </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) ECL </span><span style="font-size: large;"> (C) HTL (D) HCL
11. When a function is recursively called, all automatic variables :
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) are initialized during each execution of the function</span>
<span style="font-size: large;">(B) are retained from the last execution
(C) are maintained in a stack
(D) are ignored
12. Enumeration variables can be used in :
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) search statement like an integer variable</span>
<span style="font-size: large;">(B) break statement
(C) preprocessor commands
(D) function statement
13. int arr[ ]={1, 2, 3, 4}
int count;
incr( ) {return ++count;}
main( )
{
arr[count ++]=incr( );
printf(“arr[count]=%d\n”, arr[count]);
}
The value printed by the above program is :
(A) 1 (B) 2 </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) 3 </span><span style="font-size: large;"> (D) 4
14. When one-dimensional character array of unspecified length is assigned an initial
value :
(A) an arbitrary character is automatically added to the end of the string
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) ‘o’ is added to the end of the string</span>
<span style="font-size: large;">(C) length of the string is added to the end of the string
(D) ‘end’ is added to the end of the string
15. The declaration “unsigned u” indicates :
(A) u is an unsigned character
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) u is an unsigned integer</span>
<span style="font-size: large;">(C) u is a character
(D) u is a string
16. Which possibility among the following is invalid in case of a Data Flow Diagram ?
(A) A process having in-bound data flows more than out-bound data flows
(B) A data flow between two processes
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) A data flow between two data stores</span>
<span style="font-size: large;">(D) A data store having more than one in-bound data flows
17. In DBMS, deferred update means :
(A) All the updates are done first but the entries are made in the log file later
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) All the log files entries are made first but the actual updates are done later</span>
<span style="font-size: large;">(C) Every update is done first followed by a writing on the log file
(D) Changes in the views are deferred till a query asks for a view
18. Which statement is false regarding data independence ?
(A) Hierarchical data model suffers from data independence
(B) Network model suffers from data independence
(C) Relational model suffers only from logical data independence
(D) Relational model suffers only from physical data independence
19. Which of the following tools is not required during system analysis phase of system
development life cycle ?
(A) Case tool (B) RAD tool
</span> <span style="background-color: yellow; font-size: large;">(C) Reverse engineering </span><span style="font-size: large;"> (D) None of these
20. Two phase protocol in a database management system is :
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) a concurrency mechanism that is not deadlock free</span>
<span style="font-size: large;"> (B) a recovery protocol used for restoring a database after a crash
(C) Any update to the system log done in 2-phases
(D) not effective in Database
21. Which algorithm has same average, worst case and best case time ?
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"> (A) Binary search (B) Maximum of n number</span>
<span style="font-size: large;">(C) Quick sort (D) Fibonacci search
22. Binary search tree is an example of :
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) Divide and conquer technique</span>
<span style="font-size: large;">(B) Greedy algorithm
(C) Back tracking
(D) Dynamic Programming
23. What is the time required to insert an element in a stack </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;">with linked implementation ?
(A) O (log2n) (B) O (n) (C) O (n log2n) </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) O (1)</span>
<span style="font-size: large;">24. The equivalent postfix expression for d (e+ f) +b*c :
(A) defbc/++* (B) def+/bc+*
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) def+/bc *+ </span><span style="font-size: large;"> (D) None of these
25. Which one of the following is a physical data structure ?
(A) Array (B) Linked lists
(C) Stacks </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) Tables</span>
<span style="font-size: large;">26. How many DS1 signals are transported on a DS3 signal ?
(A) 24 (B) 672 (C) 14 (D) 28
27. A 10 BASE-2 network is limited to :
(A) 20 bytes per data field </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) 30 stations per segment</span>
<span style="font-size: large;">(C) 40 segments (D) 50 feet of cable
28. The network 198.78.41.0 is a :
(A) Class A Network (B) Class B Network
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) Class C Network </span><span style="font-size: large;"> (D) Class D Network
29. The subnet mask 255.255.255.192
(A) Extends the network portion to 16 bits
(B) Extends the network portion to 26 bits
(C) Extends the network portion to 36 bits
(D) Has no effect on the network portion of an IP address
30. The LAPB frame structure and the frame structure of SDLC are :
(A) Opposite </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) Identical</span>
<span style="font-size: large;">(C) Reversed (D) Non-identical
31. Linking :
(A) cannot be performed before relocation
(B) cannot be performed after relocation
(C) can be performed both before and after relocation
(D) is not required if relocation is performed
32. Which of the following is the most general phase-structured grammar ?
</span> <span style="font-size: large;"> (A) Regular </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) Context-sensitive</span>
<span style="font-size: large;"> (C) Context free (D) Syntax tree
33. A compiler for a high level language that runs on one machine and produces code for
a different machine is called :
(A) Optimizing (B) One pass compiler
</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) Cross compiler</span><span style="font-size: large;"> (D) Multipass compiler
34. The ‘K’ in LR (R) cannot be :
(A) 0 (B) 1 (C) 2 </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) None of these</span>
<span style="font-size: large;">35. Peer-hole optimization is a form of :
(A) loop optimization (B) local optimization </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"><span style="background-color: white;"></span>(C) constant folding </span><span style="font-size: large;"> (D) data flow analysis
36. An operating system is :
(A) Collection of hardware components (B) Collection of input-output devices
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(C) Collection of software routines </span><span style="font-size: large;"> (D) All the above
37. ____________ is one of pre-emptive scheduling algorithm.
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;"> (A) Shortest-Job-first </span><span style="font-size: large;"> (B) Round-robin
(C) Priority based (D) Shortest-Job-next
38. A software to create a Job Queue is called ____________ .
(A) Linkage editor (B) Interpreter
(C) Driver </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) Spooler</span>
<span style="font-size: large;">39. A permanent database of a general model of compiler is ____________ .
(A) Identifier table (B) Page map table
(C) Literal table (D) Terminal table
40. Loading operating system from secondary memory to primary memory is called
____________ .
(A) Compiling </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) Booting</span> </pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"> (C) Refreshing (D) Reassembling
41. Software Cost Performance index (CPI) is given by : <span style="background-color: yellow;"></span></span><span style="background-color: yellow;"></span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) </span><span style="background-color: yellow; font-size: large;">BCWP </span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">/</span><span style="background-color: yellow;"><span style="font-size: large;">ACWP</span></span><span style="font-size: large;"><span style="background-color: yellow;"> </span> (B)ACWP</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"> (C) BCWP−ACWP (D) BCWP−BCWS
Where : BCWP stands for Budgeted Cost of Work Performed
BCWS stands for Budget Cost of Work Scheduled
ACWP stands for Actual Cost of Work Performed
42. Software Risk estimation involves following two tasks :
(A) risk magnitude and risk impact
(B) risk probability and risk impact
(C) risk maintenance and risk impact
(D) risk development and risk impact
43. In a object oriented software design, ‘Inheritance’ is a kind of __________ .
</span><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(A) relationship </span><span style="font-size: large;"> (B) module
(C) testing (D) optimization
44. Reliability of software is directly dependent on :
(A) quality of the design
(B) number of errors present
(C) software engineer’s experience
(D) user requirement
45. ‘Abstraction’ is ____________ step of Attribute in a software design.
(A) First (B) Final (C) Last (D) Middle
46. The frequency band allocated for the downlink in GSM is :</span>
<span style="font-size: large;"> (A) 960 - 985 MHz </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) 935 - 960 MHz</span>
<span style="font-size: large;"> (C) 920 - 945 MHz (D) 930 - 955 MHz
47. Which of the following is an EDI standard ?
(A) ANSI X.15 (B) ANSI X.14
(C) ANSI X.13 </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(D) ANSI X.12</span>
<span style="font-size: large;">48. An INT file in Windows 95 is :
(A) a program file (B) a message file
(C) a text file (D) link file
49. Link analysis operation in data mining uses ___________ technique.
(A) Classification </span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0); font-size: large;">(B) Association discovery</span>
<span style="font-size: large;"> (C) Visualisation (D) Neural clustering
50. The maximum size of SMS in IS-95 is ______ octets.
(A) 120 (B) 95 (C) 128 (D) 64
</span> </pre>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-7673029331013039192012-05-05T01:02:00.000+05:302012-05-19T16:46:10.541+05:30UGC NET Computer Science and Applications December-2005 Paper- II Solution<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Georgia,"Times New Roman",serif;">
<style type="text/css">
pre.western { font-family: "Liberation Serif"; }pre.cjk { font-family: "WenQuanYi Zen Hei Mono",monospace; }pre.ctl { font-family: "Lohit Devanagari",monospace; }p { margin-bottom: 0.08in; }
</style>
</div>
<div style="font-family: Georgia,"Times New Roman",serif;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; text-align: center;">
Computer Science and Applications December-2005</div>
<div style="font-family: Georgia,"Times New Roman",serif; text-align: center;">
PAPER-II</div>
<div style="font-family: Georgia,"Times New Roman",serif;">
<br /></div>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;">Note : This paper contains fifty (50) objective-type questions, each question carrying two (2) marks. Attempt all of them.
1. T is a graph with n vertices. T is connected and has exactly n-1 edges, then :
(A) T is a tree
(B) T contains no cycles
(C) Every pairs of vertices in T is connected by exactly one path
(<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">D) All of these</span>
2. If the proposition 7P ⇒ Q is true, then the truth value of the proportion 7 PV (P ⇒ Q) is :
(A) True <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (B) Multi - Valued</span>
(C) Flase (D) Can not determined
3. Let A and B be two arbitrary events, then :
(A) P(A ∩ B) = P(A) P (B) (B) P(P ∪ B) = P(A) + P (B)
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C) P(A ∪ B)<=P(A) + P (B)</span> (D) P(A/B) = P(A ∩ B) + P (B)
4. Which sentence can be generated by S → d/bA, A → d/ccA :
(A) bccddd (B) aabccd (C) ababccd (D) abbbd
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">* None of these, as there is no symbol 'a' in the production except (A) </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">and (A) cant be produced by given productions. May be some printing mistakes </span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">in the question paper.</span>
5. Regular expression a+b denotes the set :
(A) {a} (B) {e, a, b} <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C) {a, b}</span> (D) None of these
6. Which of the following is divisible by 4 ?
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) 100101100 </span> (B) 1110001110001
(C) 11110011 (D) 10101010101010
<span style="background-color: yellow;">*last 2 digits must be '0'.</span>
7. A half-adder is also known as :
(A) AND Circuit (B) NAND Circuit
(C) NOR Circuit <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) EX-OR Circuit</span>
8. Consider the following sequence of instructions :
a=a⊕b, b=a ⊕ b, a=b ⊕ a This Sequence
(A) retains the value of the a and b
(B) complements the value of a and b
(C) swap a and b
(D) negates values of a and b
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">I am confused about options. The table before and after operation is like:
Before After
a---b---a---b
0 0 0 0</span>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">0 1 1 1</span>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">1 0 1 1</span>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">1 1 0 0
So its neither retains/complements/swap nor negates.</span>
9. Consider the following circuit :</pre>
<div class="separator" style="clear: both; font-family: Georgia,"Times New Roman",serif; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRBg4oAxac7RPZDOHWUFzXD46hxxrY8x87WFMz07t47cSiV73UxB_GWRNCGYYDEMYss5UR_xQpdMq_6r5dR5jbPC1E-6_rPVfY9_lmH6DoKZTudztwhALDdedOyOK9G5OwXbOAG2fsWU-R/s1600/circuit.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRBg4oAxac7RPZDOHWUFzXD46hxxrY8x87WFMz07t47cSiV73UxB_GWRNCGYYDEMYss5UR_xQpdMq_6r5dR5jbPC1E-6_rPVfY9_lmH6DoKZTudztwhALDdedOyOK9G5OwXbOAG2fsWU-R/s320/circuit.jpg" width="320" /></a></div>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"> to make it a Tautology the "?" should be :
<span style="background-color: yellow;">(A) NAND gate</span> (B) AND gate (C) OR gate (D) EX-OR gate
10. When an inventor is placed between both inputs of an S-R flip flop, the resulting flip
flop is :
(A) JK flip-flop (B) D-flip-flop
(C) T flip-flop (D) None of these
11. What is the output of the following C-program main () :
{printf(''%d%d%d'', size of (3.14f), size of (3.14), size of (3.141));}
(A) 444 (B) 4 8 10 (C) 848 (D) 888
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">None of these are correct. Answer should be 488(tested in visual studio and gcc compiler)</span>
12. The bitwise OR of 35 with 7 in C will be :
(A) 35 (B) 7 (C) 42 <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) 39</span>
13. Data members and member function of a class by default is respectively :
(A) private and public (B) public
(C) public and private <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) private</span>
14. Function over loading done at :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Runtime </span> (B) Compile time
(C) Linking time (D) Switching from function to function
15. What will be the value of i for the following expression :
int f=11, i=3 ;
i+=(f >3) ? i & 2:5 ;
(A) 2 <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (B) 5 </span> (C) 13 (D) 12
16. A schema describes :
(A) data elements (B) records and files
(C) record relationship (<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">D) all of the above</span>
17. One approach to standarolizing storing of data :
(A) MIS <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) CODASYL</span>
(C) Structured Programing (D) None of the above
18. In a relational schema, each tuple is divided in fields called :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Relations</span> (B) Domains (C) Queries (D) All the above
19. An embedded printer provides :
(A) Physical record key (B) An inserted Index
(C) A secondary access path <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (D) All the above</span>
20. A locked file can be :
(A) accessed by only one user
(B) modified by users with the correct password
(C) is used to hide sensitive information
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (D) both (B) and (C)</span>
21. In what tree, for every node the height of its left subtree and right subtree differ at least by one :
(A) Binary search tree (B) AVL - tree
(C) <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Threaded binary tree</span> (D) Complete tree
22. A hash function f defined as f(key)=key mod 7, with linear probing it is used to insert the key 37,38,72,48,98,11,56 into a table index from 0 to 6. What will be the locations of 11 :
(A) 3 (B) 4 <span style="background-color: yellow;">(C) 5 </span> (D) 6
23. Consider the graph, which of the following is a valid topological sorting ?</pre>
<div class="separator" style="clear: both; font-family: Georgia,"Times New Roman",serif; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSxhFRgZbYoq-0lQbRkkH08Meo6LktAEHBNGQdQSdP0fHTucYAL2CQ-dW3qy_Y3OgjbjedReOPrGs2LqnysBK41SzMTd-0AkvdQIUj5ni5cR_jxdn2FbAxq24GG1Vb6zH6n4LWTKNqdW7S/s1600/graph2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSxhFRgZbYoq-0lQbRkkH08Meo6LktAEHBNGQdQSdP0fHTucYAL2CQ-dW3qy_Y3OgjbjedReOPrGs2LqnysBK41SzMTd-0AkvdQIUj5ni5cR_jxdn2FbAxq24GG1Vb6zH6n4LWTKNqdW7S/s1600/graph2.jpg" /></a></div>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"> (A) ABCD (B) BACD (C) BADC (D) ABDC
<span style="background-color: yellow;">I think the given graph has no topological sorting as it contains cycle.</span></pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;">24. The initial configuration of quaue is a, b, c, d. 'a' is at the front. To get the configuration
d, c, b, a how many deletions and additions required :
(A) 2 deletions, 3 additions (B) 3 deletions, 2 additions
(C) 3 deletions, 4 additions <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) 3 deletions, 3 additions</span>
25. Which traversal techniques lists the nodes of a binary search tree in ascending order ?
(A) post - order <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) in - order</span>
(C) pre - order (D) linear – order
26. The data unit in the TCP/IP application Layer is called a __________ .
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) message</span> (B) segment (C) datagram (D) frame
27. Which of following file retrieval methods use hypermedia ?
<span style="background: none repeat scroll 0% 0% transparent;">(A) HTML</span> (B) Veronica (C) WAIS <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) HTTP</span>
28. Which of following is an example of a client - server model :
(A) DNS (B) FTP (C) TELNET <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) All the above</span>
29. __________ provide a method to recover data that has been delivered but not get
used :
(A) Segmentation (B) Concatenation
(C) Transalation <span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(D) Synchronization</span>
30. Encryption and decryption are the functions of the __________ layer of OSI model :
(A) transport (B) session (C) router <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) presentation</span>
31. The Register or main memory location which contains the effective address of the
operand is known as :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Pointer </span> (B) Indexed register
(C) Special Locations (D) Scratch Pad
32. A Top - down Parse generates :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (A) Left most derivation </span> (B) Right - most derivation
(C) Right - most derivation in reverse (D) Left - most derivation in reverse
33. A general macroprocessor is an in built function of :
(A) Loader (B) Linker (C) Editor <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) Assembler</span>
34. Which of the following is not collision Resolution Technique :
(A) Hash addressing (B) Chainning
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);"> (C) Indexing </span> (D) None of these
35. Which activities is not included in the first pass of two pass assembler ?
(A) build the symbol table
(B) construct the Intermediate code
(C) separate memonic opcode and operand field.
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) none of these</span>
36. Producer consumer problem can be solved using :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) semaphores </span> (B) event counters
(C) monitors (D) all the above
37. If you want to execute more than one program at a time, the systems software that are
used must be capable of :
(A) word processing (B) virtual memory
(C) compiling <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) multitasking</span>
38. Which of the following checks cannot be carried out on the input data to a system ?
(A) Consistency check (B) Syntax check
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);"> (C) Range check </span> (D) All the above
39. Nonmodifiable procedures are called :
(A) Serially usable procedure (B) Concurrent procedure
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (C) Reentrant procedure</span> (D) Topdown procedure
40. Banker's algorithm is used for __________ purpose :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Deadlock avoidance</span> (B) Deadlock removal
(C) Deadlock prevention (D) Deadlock continuations
41. The testing of software against SRS is called :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Acceptance testing </span> (B) Integration testing
(C) Regression testing (D) Series testing
42. The lower degree of cohesion is :
(A) logical cohesion <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) coincidential cohesion</span>
(C) procedural cohesion (D) communicational cohesion
43. The Reliability of the software is directly dependent upon :
(A) Quality of the design (B) Programmers experience
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (C) Number of error </span> (D) Set of user requirements
44. Succesive layer of design in software using but ton-up design is called :
(A) Layer of Definement (B) Layer of Construction
(C) Layer of abstraction <span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(D) None of the above</span>
45. Sliding window concept of software project management is :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Preperation of comprehenciable plan</span>
(B) Preperation of the various stages of development
(C) Ad-hoc planning
(D) Requirement analysis
46. Which of the following transonission media is used in Blue tooth Technology :
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Radio links </span> (B) Microwave links
(C) VSAT Communication (D) Fiber – optic
47. Which of the following is a EDI standard ?
(A) ANSI X.15 (B) ANSI X.14 (C) ANSI X.13 <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (D) ANSI X.12</span>
48. Analysis of large database to retrive information is called :
(A) OLTP <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) OLAP</span> (C) OLDP (D) TLPP
49. The cost of the network is usually determined by :
(A) Time complexity <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) Switching complexity</span>
(C) Circuit complexity (D) None of these
50. The mechanism with which several uses can share a medium without interference is :
(A) Frequency modulation (B) Amplitude modulation
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(C) Multiplexing </span> (D) None of these</pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"> </pre>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"> </pre>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-60622508979287096712012-05-04T13:53:00.001+05:302012-05-05T20:41:09.141+05:30MCQ on System Software and Compiler<div dir="ltr" style="text-align: left;" trbidi="on">
<br /><br />
Q.1 Translator for low level programming language were termed as
<br />
(A) Assembler (B) Compiler
<br />
(C) Linker (D) Loader
<br />
Ans: (A)
<br />
<br />
Q.2 Analysis which determines the meaning of a statement once its grammatical structure becomes known is termed as
<br />
(A) Semantic analysis (B) Syntax analysis
<br />
(C) Regular analysis (D) General analysis
<br />
Ans: (A)
<br />
<br />
Q.3 Load address for the first word of the program is called
<br />
(A) Linker address origin (B) load address origin
<br />
(C) Phase library (D) absolute library
<br />
Ans: (B)
<br />
<br />
Q.4 Symbolic names can be associated with
<br />
(A) Information (B) data or instruction
<br />
(C) operand (D) mnemonic operation
<br />
Ans: (B)
<br />
<br />
Q.5 The translator which perform macro expansion is called a
<br />
(A) Macro processor (B) Macro pre-processor
<br />
(C) Micro pre-processor (D) assembler
<br />
Ans: (B)
<br />
<br />
Q.6 Shell is the exclusive feature of
<br />
(A) UNIX (B) DOS
<br />
(C) System software (D) Application software
<br />
Ans: (A)
<br />
<br />
Q.7 An assembler is
<br />
(A) programming language dependent.
<br />
(B) syntax dependant.
<br />
(C) machine dependant.
<br />
(D) data dependant.
<br />
Ans: (C)<br />
<br />
Q.8 Program generation activity aims at
<br />
(A) Automatic generation of program
<br />
(B) Organize execution of a program written in PL
<br />
(C) Skips generation of program
<br />
(D) Speedens generation of program
<br />
Ans: (A)
<br />
<br />
Q.9 Which of the following loader is executed when a system is first turned on or restarted
<br />
(A) Boot loader (B) Compile and Go loader
<br />
(C) Bootstrap loader (D) Relating loader
<br />
Ans: (C)
<br />
<br />
Q.10 A parser which is a variant of top-down parsing without backtracking is
<br />
(A) Recursive Descend. (B) Operator Precedence.
<br />
(C) LL(1) parser. (D) LALR Parser.
<br />
Ans: (A)<br />
<br />
Q.11. In a two-pass assembler, the task of the Pass II is to
<br />
(A) separate the symbol, mnemonic opcode and operand fields.
<br />
(B) build the symbol table.
<br />
(C) construct intermediate code.
<br />
(D) synthesize the target program.
<br />
Ans: (D)
<br />
<br />
Q.12 A linker program
<br />
(A) places the program in the memory for the purpose of execution.
<br />
(B) relocates the program to execute from the specific memory area
<br />
allocated to it.
<br />
(C) links the program with other programs needed for its execution.
<br />
(D) interfaces the program with the entities generating its input data.
<br />
Ans: (C)
<br />
<br />
Q.13 Which of these is not a part of Synthesis phase
<br />
(A) Obtain machine code corresponding to the mnemonic from the
<br />
Mnemonics table
<br />
(B) Obtain address of a memory operand from the symbol table
<br />
(C) Perform LC processing
<br />
(D) Synthesize a machine instruction or the machine form of a constant
<br />
Ans: (C)
<br />
<br />
Q.14 The syntax of the assembler directive EQU is
<br />
(A) EQU <br />
<address space="">
(B) <symbol>EQU</symbol></address>
<address space="">
<br /> (C) <symbol>EQU (D) None of the above
<br /> Ans: (B)
<br /><br />Q.15 The following features are needed to implement top down parsing
<br /> (A) Source string marker
<br /> (B) Prediction making mechanism
<br /> (C) Matching and Backtracking mechanism
<br /> (D) All of the above
<br /> Ans: (D)<br /><br />Q.16 An assembly language is a
<br /> (A) low level programming language
<br /> (B) Middle level programming language
<br /> (C) High level programming language
<br /> (D) Internet based programming language
<br /> Ans: (A)
<br /><br />Q.17 TII stands for
<br /> (A) Table of incomplete instructions
<br /> (B) table of information instructions
<br /> (C) translation of instructions information
<br /> (D) translation of information instruction
<br /> Ans: (A)
<br /><br />Q.18 An analysis, which determines the syntactic structure of the source statement, is
<br /> called
<br /> (A) Sementic analysis (B) process analysis
<br /> (C) Syntax analysis (D) function analysis
<br /> Ans: (C)
<br /><br />Q.19 Action implementing instruction’s meaning are a actually carried out by
<br /> (A) Instruction fetch
<br /> (B) Instruction decode
<br /> (C) instruction execution
<br /> (D) Instruction program
<br /> Ans: (C)<br /><br />Q.20 The field that contains a segment index or an internal index is called
<br /> (A) target datum (B) target offset
<br /> (C) segment field (D) fix dat
<br /> Ans: (A)
<br /><br />Q.21 Resolution of externally defined symbols is performed by
<br /> (A) Linker (B) Loader
<br /> (C) Compiler (D) Editor
<br /> Ans: (A)
<br /><br />Q.22 Relocatable programs
<br /> (A) cannot be used with fixed partitions
<br /> (B) can be loaded almost anywhere in memory
<br /> (C) do not need a linker
<br /> (D) can be loaded only at one specific location
<br /> Ans: (B)
<br /><br />Q.23 Which of the following are language processors?
<br /> (A) Assembler (B) Compiler
<br /> (C) Interpreter (D) All of the above
<br /> Ans: (D)
<br /><br />Q.24 Recognition of basic syntactic constructs through reductions, this task is performed
<br /> by
<br /> (A) Lexical analysis (B) Syntax analysis
<br /> (C) Semantic analysis (D) Structure analysis
<br /> Ans: (B)
<br /><br />Q.25 A grammar for a programming language is a formal description of
<br /> (A) Syntax (B) Semantics
<br /> (C) Structure (D) Code
<br /> Ans: (C)
<br /><br />Q.26 Which of the following is most general phase structured grammar?
<br /> (A) Context – Sensitive (B) Regular
<br /> (C) Context – Free (D) None of the above
<br /> Ans: (A)
<br />Q.23 Which of the following are language processors?
<br /> (A) Assembler (B) Compiler
<br /> (C) Interpreter (D) All of the above
<br /> Ans: (D)
<br /><br />Q.24 Recognition of basic syntactic constructs through reductions, this task is performed
<br /> by
<br /> (A) Lexical analysis (B) Syntax analysis
<br /> (C) Semantic analysis (D) Structure analysis
<br /> Ans: (B)
<br /><br />Q.25 A grammar for a programming language is a formal description of
<br /> (A) Syntax (B) Semantics
<br /> (C) Structure (D) Code
<br /> Ans: (C)
<br /><br />Q.26 Which of the following is most general phase structured grammar?
<br /> (A) Context – Sensitive (B) Regular
<br /> (C) Context – Free (D) None of the above
<br /> Ans: (A)</symbol></address>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com1tag:blogger.com,1999:blog-5712790273933037367.post-30961529524399111882012-05-03T01:15:00.000+05:302012-05-05T20:43:43.334+05:30Graph Theory Notes and Previous years solutions for UGC NET Computer Science & Application<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
pre.cjk { font-family: "WenQuanYi Zen Hei Mono",monospace; }pre.ctl { font-family: "Lohit Devanagari",monospace; }p { margin-bottom: 0.08in; }h2 { margin-bottom: 0.08in; }h2.cjk { font-family: "WenQuanYi Zen Hei"; }h2.ctl { font-family: "Lohit Devanagari"; }h1 { margin-bottom: 0.08in; }h1.western { font-family: "Liberation Serif",serif; }h1.cjk { font-family: "WenQuanYi Zen Hei"; }h1.ctl { font-family: "Lohit Devanagari"; }a:link { }
</style>
<br />
<div class="western" style="text-align: left;">
<br /></div>
<h2 class="western">
<u>Some Basic Definitions</u></h2>
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Defs1"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Graph</span></b><br />
<div align="JUSTIFY">
A <i>simple </i><i><span style="background: none repeat scroll 0% 0% transparent;">graph</span></i>
can be thought of as a triple <i>G=(V,E,I)</i>, where <i>V</i> and <i>E</i>
are disjoint finite sets and <i>I</i> is an incidence relation such
that every element of <i>E</i> is incident with exactly two distinct
elements of <i>V</i> and no two elements of <i>E</i> are incident to
the same pair of elements of <i>V</i>. Obviously, these requirements
can be varied (and we get general graphs, hypergraphs, infinite
graphs, directed graphs, oriented graphs, etc.). We call <i>V</i> the
<i>vertex set</i> and <i>E</i> the <i>edge set</i> of <i>G</i>.</div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Regular Graph</span></b><br />
If
all the vertices
of G have the same degree k, then G is k-regular ,
or simply <span style="background: none repeat scroll 0% 0% transparent;">regular</span> . A
cubic
3-regular graph is called cubic.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Degree"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Neighbour"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Degree
of a vertex</span></b><br />
<div style="text-align: justify;">
The <i><span style="background: none repeat scroll 0% 0% transparent;">degree</span></i>,
<i>d(v)</i>, of a vertex <i>v</i> is the number of edges with which
it is incident. Two vertices are <i>adjacent</i> if they are incident
to a common edge. The set of <i>neighbours</i>, <i>N(v)</i>, of a
vertex <i>v</i> is the set of vertices which are adjacent to <i>v</i>.
The degree of a vertex is also the cardinality of its neighbour
set.</div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Digraph</span></b><b> </b>
<br />
<dl><dd style="text-align: justify;">A digraph (or a directed graph) is a graph in which the
edges are directed. (Formally: a digraph is a (usually finite) set
of vertices V and set of <i>ordered</i> pairs (<i>a,b</i>) (where <i>a,
b</i> are in V) called edges. The vertex <i>a</i> is the initial
vertex of the edge and <i>b</i> the terminal vertex.
</dd>
<dt>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Pseudograph</span></b>
</dt>
<dd style="text-align: justify;">Informally, a pseudograph is a graph with multiple edges (or loops)
between the same vertices (or the same vertex). Formally: a
pseudograph is a set V of vertices along, a set E of
edges, and a function <i>f</i> from E to {{<i>u,v</i>}|<i>u,v</i>
in V}. (The function <i>f</i> shows which vertices are connected by
which edge.) An edge is a loop if <i>f</i>(<i>e</i>) = {<i>u</i>}
for some vertex <i>u</i> in V. </dd>
<dt>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Loop </span></b>
</dt>
<dd>A loop is an edge that connects a vertex to itself.</dd></dl>
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Walk"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Walk</span></b><br />
<div style="text-align: justify;">
A
<i><span style="background: none repeat scroll 0% 0% transparent;">walk</span></i> is an
alternating sequence of vertices and edges, with each edge being
incident to the vertices immediately preceding and succeeding it in
the sequence.
</div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Trail</span></b><br />
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Trail"></a>A<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> </span><i><span style="background: none repeat scroll 0% 0% transparent;">trail</span></i>
is a walk with no repeated edges.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Path"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Path</span></b><br />
<div style="text-align: justify;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Length"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Distance"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Induced"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="EdgeInduced"></a>
A <i><span style="background: none repeat scroll 0% 0% transparent;">path</span></i> is a walk
with no repeated vertices. A walk is <i>closed</i> if the initial
vertex is also the terminal vertex. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The <i>length</i> of a
walk is the number of edges in the sequence defining the walk. Thus,
the length of a path or cycle is also the number of edges in the path
or cycle. If <i>u</i> and <i>v</i> are vertices, the <i>distance</i>
from connected graph<i>u</i> to <i>v</i>, written <i>d(u,v)</i>, is
the minimum length of any path from <i>u</i> to <i>v</i>. In an
undirected graph, this is obviously a metric. The <i>eccentricity</i>,
<i>e(u)</i>, of the vertex <i>u</i> is the maximum value of <i>d(u,v)</i>,
where <i>v</i> is allowed to range over all of the vertices of the
graph. The <i>radius</i> of the graph <i>G</i>, <i>rad(G)</i>, is the
minimum value of <i>e(u)</i>, for any vertex <i>u</i>, and the
<i>diameter</i>, <i>diam(G)</i>, is the corresponding maximum value.
It should be obvious that <i>diam(G) ≤ 2rad(G)</i>. </div>
<br />
<div style="text-align: justify;">
For a
set of vertices <i>X</i>, we use <i>G[X]</i> to denote the <i>induced
subgraph</i> of <i>G</i> whose vertex set is <i>X</i> and whose edge
set is the subset of <i>E(G)</i> consisting of those edges with both
ends in <i>X</i>. For a set <i>S</i> of edges, we use <i>G[S]</i> to
denote the <i>edge induced subgraph</i> of <i>G</i> whose edge set is
<i>S</i> and whose vertex set is the subset of <i>V(G)</i> consisting
of those vertices incident with any edge in <i>S</i>. If <i>Y</i> is
a subset of <i>V(G)</i>, we write <i>G-Y</i> for the subgraph
<i>G[V(G)-Y]</i>.
</div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Complete Graph</span></b><br />
<div style="text-align: justify;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Complete"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Clique"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Connectivity"></a>
A graph is <i>complete</i>, or a <i>clique</i>, if every pair of
distinct vertices is adjacent. (The adjacency matrix of a complete
graph has zeroes on the main diagonal, and ones off the diagonal.) We
write <i>K</i><sub><i>m</i></sub> for the complete graph on <i>m</i>
vertices. Number of edges = m(m-1)/2</div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Connected
Graph</span></b><br />
<div style="text-align: justify;">
A non-empty graph G is calle<span style="background: none repeat scroll 0% 0% transparent;">d
connected</span> if any two of its vertices are
linked by a path in
G. If U ⊆ V (G) and G [ U ] is connected, we also
call U itself
connected (in G). Instead of ‘not connected’ we usually say
‘disconnected’.
A graph <i>G</i> has <i>connectivity</i> <i>k</i>
if <i>G</i> is <i>k</i>-connected but not <i>(k+1)</i>-connected. A
complete graph on <i>k+1</i> vertices is defined to have <i><span style="background: none repeat scroll 0% 0% transparent;">connectivity</span></i><span style="background: none repeat scroll 0% 0% transparent;">
</span><i><span style="background: none repeat scroll 0% 0% transparent;">k</span></i>.</div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Bipartite graphs
</span></b><br />
<div style="text-align: justify;">
Let r
>2 be an integer. A graph G = (V, E) is called r-partite
if
V admits a partition into r classes such that every edge has its
ends
in different classes: vertices in the same partition class must
not be
adjacent. Instead of ‘2-partite’ one usually says
bipartite.
</div>
<div style="margin-bottom: 0in; text-align: justify;">
An r-partite graph in which every two
vertices from different partition classes are adjacent is called
complete; the complete r-partite
graphs for all r together are the
complete multipartite graphs. Graphs of the form K1,n are
called
stars; the vertex in the singleton partition class of this K1,n is
the
star’s centre.
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Cycle</span></b><br />
<div style="margin-bottom: 0in;">
A<span style="background: none repeat scroll 0% 0% transparent;">
</span><i><span style="background: none repeat scroll 0% 0% transparent;">cycle</span></i> is a
closed trail with at least one edge and with no repeated vertices
except that the initial vertex is the terminal vertex.</div>
<dl>
<dt><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Circuit </span></b>
</dt>
<dd>A circuit is a path which ends at the vertex it begins (so a loop is
an circuit of length one).
</dd></dl>
<div style="margin-bottom: 0in;">
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Forest</span></b></div>
<div style="margin-bottom: 0in;">
A graph is <i>acyclic</i> if it has no
cycles. An acyclic graph is also called a <i><span style="background: none repeat scroll 0% 0% transparent;">forest</span></i><span style="background: none repeat scroll 0% 0% transparent;">.
</span>
</div>
<h1 class="western" style="margin-bottom: 0in; margin-top: 0in;">
<span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Acyclic
Graph</span></span></h1>
<div style="text-align: justify;">
An acyclic graph is a graph having no graph cycles.
</div>
<div style="text-align: justify;">
A connected acyclic graph is known as a tree, and a possibly
disconnected acyclic graph is known as a forest (i.e., a collection
of trees).
</div>
<div style="text-align: justify;">
The numbers of acyclic graphs (forests) on n =1, 2, ... are 1, 2,
3, 6, 10, 20, 37, 76, 153, ...
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Tree</span></b></div>
<div style="margin-bottom: 0in;">
<span style="background: none repeat scroll 0% 0% transparent;">A
</span><i><span style="background: none repeat scroll 0% 0% transparent;">tree</span></i><span style="background: none repeat scroll 0% 0% transparent;">
is a c</span>onnected, acyclic graph. Thus every connected component
of a forest is a tree.
</div>
<div style="margin-bottom: 0in;">
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><i>Spanning
tree</i></span></b></div>
<div style="margin-bottom: 0in; text-align: justify;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="SpanTree"></a>A <i>spanning
tree</i> of a graph <i>G</i> is a subgraph <i>T</i> of <i>G</i> which
is a tree and which satisfies <i>|V(T)|=V|(G)|</i>.
</div>
<div style="text-align: justify;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="SpanTree2"></a>If <i>T</i> is a tree, then
<i>|V(T)|=E|(T)|+1</i>. Any tree with at least two vertices must have
a vertex of degree one. Alternately, one could define a tree as a
connected graph <i>T</i> satisfying <i>|V(T)|=E|(T)|+1</i> or as an
acyclic graph <i>T</i> satisfying <i>|V(T)|=E|(T)|+1</i>. Every
connected graph must have a spanning tree.
</div>
<div style="text-align: justify;">
The number of spanning trees in the complete graph K<sub>n</sub>
with <i>n</i> vertices is = t(K<sub>n</sub>)= n<sup>n-2</sup></div>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><b>Minimum Spanning Tree</b>
(<b>MST</b>)</span><br />
<div style="font-weight: normal; text-align: justify;">
A minimum spanning tree (MST) or
minimum weight spanning tree is a spanning tree with weight less than
or equal to the weight of every other spanning tree. More generally,
any undirected graph (not necessarily connected) has a minimum
spanning forest, which is a union of minimum spanning trees for its
connected components.</div>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><b>Kruskal's algorithm</b></span><br />
<div style="text-align: justify;">
<span style="font-weight: normal;">Kruskal's algorithm</span> is an
algorithm in graph theory that finds a minimum spanning tree for a
connected weighted graph. This means it finds a subset of the edges
that forms a tree that includes every vertex, where the total weight
of all the edges in the tree is minimized. If the graph is not
connected, then it finds a <i>minimum spanning forest</i> (a minimum
spanning tree for each connected component). Kruskal's algorithm is
an example of a greedy algorithm. If <i>E</i> is the number of edges
in the graph and <i>V</i> is the number of vertices, Kruskal's
algorithm can be shown to run in <i>O</i>(<i>E</i>
log <i>E</i>) time, or equivalently, <i>O</i>(<i>E</i> log <i>V</i>)
time</div>
<div style="margin-bottom: 0in;">
<b><i><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Eccentricity</span></i>
</b>
</div>
<div style="margin-bottom: 0in;">
Let <i>G</i> be a graph and <i>v</i> be
a vertex of <i>G</i>. T<span style="background: none repeat scroll 0% 0% transparent;">he
</span><i><span style="background: none repeat scroll 0% 0% transparent;">eccentricity</span></i><span style="background: none repeat scroll 0% 0% transparent;">
</span>of the vertex <i>v</i> is the maximum distance from <i>v</i>
to any vertex. That is, <i>e(v)=</i>max<i>{d(v,w):w</i> in <i>V(G)}</i>.
</div>
<div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Radius"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Radius</span></b></div>
<div style="margin-bottom: 0in;">
<span style="background: none repeat scroll 0% 0% transparent;">The
</span><i><span style="background: none repeat scroll 0% 0% transparent;">radius</span></i><span style="background: none repeat scroll 0% 0% transparent;">
of </span><i><span style="background: none repeat scroll 0% 0% transparent;">G</span></i><span style="background: none repeat scroll 0% 0% transparent;">
i</span>s the minimum eccentricity among the vertices of <i>G</i>.
Therefore, <i>radius(G)=</i>min<i>{e(v):v</i> in <i>V(G)}</i>.
</div>
<div style="margin-bottom: 0in;">
<i><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Diameter
</span></b></i>
</div>
<div style="margin-bottom: 0in;">
<span style="background: none repeat scroll 0% 0% transparent;">The
</span><i><span style="background: none repeat scroll 0% 0% transparent;">diameter</span></i><span style="background: none repeat scroll 0% 0% transparent;">
of </span><i><span style="background: none repeat scroll 0% 0% transparent;">G</span></i><span style="background: none repeat scroll 0% 0% transparent;">
is </span>the maximum eccentricity among the vertices of <i>G</i>.
Thus, <i>diameter(G)=</i>max<i>{e(v):v</i> in <i>V(G)}</i>.
</div>
<div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Girth"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Grith</span></b></div>
<div style="margin-bottom: 0in;">
<span style="background: none repeat scroll 0% 0% transparent;">The
</span><i><span style="background: none repeat scroll 0% 0% transparent;">girth</span></i><span style="background: none repeat scroll 0% 0% transparent;">
of </span><i><span style="background: none repeat scroll 0% 0% transparent;">G</span></i> is
the length of a shortest cycle in <i>G</i>.
</div>
<div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="Center"></a><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Center</span></b></div>
The <i><span style="background: none repeat scroll 0% 0% transparent;">center</span></i><span style="background: none repeat scroll 0% 0% transparent;">
</span>of <i>G</i> is the set of vertices of eccentricity equal to
the radius. Hence, <i>center(G)={v</i> in <i>V(G):e(v)=radius(G)}</i>.
<br />
<dl>
<dt><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Planar </span></b>
</dt>
<dd>A graph is planar if it can be drawn on a plane so that the edges
intersect only at the vertices. (For example, of the five first
complete graphs all but the fifth, K<span style="font-size: xx-small;">5</span>, is
planar.)
</dd></dl>
<b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><i>Hamiltonian path</i></span></b><br />
<div style="text-align: justify;">
A <i>Hamiltonian path</i> or <i>traceable path</i> is a path that
visits each vertex exactly once. A graph that contains a Hamiltonian
path is called a traceable graph. A graph is
Hamiltonian-connected if for every pair of vertices there is a
Hamiltonian path between the two vertices.</div>
<div style="text-align: justify;">
A <i>Hamiltonian cycle</i>, <i>Hamiltonian circuit</i>, <i>vertex
tour</i> or <i>graph cycle</i> is a cycle that visits each vertex
exactly once (except the vertex that is both the start and end, and
so is visited twice). A graph that contains a Hamiltonian cycle is
called a Hamiltonian graph.</div>
<div style="text-align: justify;">
Similar notions may be defined for <i>directed graphs</i>, where
each edge (arc) of a path or cycle can only be traced in a single
direction (i.e., the vertices are connected with arrows and the edges
traced "tail-to-head").</div>
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><b>Eulerian Path</b></span><br />
<div style="text-align: justify;">
<span style="font-weight: normal;">An Eulerian trail (or Eulerian
path) is a trail in a graph which visits every edge exactly once.
Similarly, an Eulerian circuit or Eulerian cycle is an Eulerian trail
which starts and ends on the same vertex.</span></div>
<div style="text-align: justify;">
<span style="font-weight: normal;">The term Eulerian graph has two
common meanings in graph theory. One meaning is a graph with an
Eulerian circuit, and the other is a graph with every vertex of even
degree. These definitions coincide for connected graphs.</span></div>
<div style="font-weight: normal; text-align: justify;">
For the existence of Eulerian trails
it is necessary that no more than two vertices have an odd degree;
this means the Königsberg graph is <i>not</i> Eulerian. If there are
no vertices of odd degree, all Eulerian trails are circuits. If there
are exactly two vertices of odd degree, all Eulerian trails start at
one of them and end at the other. A graph that has an Eulerian trail
but not an Eulerian circuit is called semi-Eulerian.</div>
<span style="font-size: medium;"><u><b>Some important things in graph theory</b></u></span><br />
<span style="font-size: small;"><span style="font-weight: normal;">1.The sum of
degrees of the vertices of a graph is even </span></span>
<br />
2. Every graph has an even number of odd vertices
<br />
<ol><ol>
<li><div style="margin-bottom: 0in;">
If the number of odd vertices is
greater than 2 no euler walk exists
</div>
</li>
<li><div style="margin-bottom: 0in;">
If the number of odd vertices is
2, euler walks exist starting at either of the odd vertices
</div>
</li>
<li>With no odd vertices, euler walks can start at an arbitrary
vertex
<br />
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="HandshakeLemma"></a>For
a graph, the sum of degrees of all its nodes equals twice the
number of edges.</div>
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="corollary"></a>For a
graph, the sum of degrees of all its nodes is even</div>
</li>
</ol>
</ol>
<div style="border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0); border-style: none none double; border-width: medium medium 4.5pt; padding: 0in 0in 0.03in;">
</div>
<br />
<br />
<br />
<ol>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="adjacent1"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="incident"></a>
Elements of an edge are said to be <i>incident</i> to that edge.
</div>
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="incident1"></a>Likewise,
an edge is incident to its elements.
</div>
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="incident2"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="degree"></a>
A <i>degree</i> of a vertex is the number of edges incident to it
(<i>loops</i> being counted twice).
</div>
</li>
<li><div style="border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0); border-style: none none double; border-width: medium medium 4.5pt; padding: 0in 0in 0.03in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="parity"></a>
A vertex of odd (even) degree is said to be <i>odd</i> (<i>even</i>).
</div>
</li>
</ol>
<ol>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="walk1"></a>A walk v<sub>0</sub>,
e<sub>1</sub>, v<sub>1</sub>, e<sub>2</sub>, ..., v<sub>n</sub> is
said to connect v<sub>0</sub> and v<sub>n</sub>.
</div>
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="walk2"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="closedwalk"></a>
A walk is <i>closed</i> if v<sub>0</sub>n. A closed walk is called
a <i>cycle</i>.
</div>
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="closedwalk1"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="openwalk"></a>
A walk which is not closed is <i>open</i>.
</div>
</li>
<li><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="openwalk1"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="eulerwalk"></a>
A walk is an <i>euler walk</i> if every edge of the graph appears
in the walk exactly once.
</div>
</li>
<li><div style="border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0); border-style: none none double; border-width: medium medium 4.5pt; padding: 0in 0in 0.03in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="eulerwalk1"></a><a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="connectedgraph"></a>
A graph is <i>connected</i> if every two vertices can be connected
by a walk.
</div>
</li>
</ol>
<span style="font-size: medium;"><span style="font-weight: normal;">1. </span></span>If
a graph has a closed euler walk then every vertex is even.
<br />
<ol><div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="connectedgraph2"></a>2. If
every vertex of a connected graph is even, the graph has an euler
walk.
</div>
<div style="margin-bottom: 0in;">
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="connectedgraph3"></a>3. If a
graph has an open euler walk it has exactly two odd vertices.
</div>
<a href="http://www.blogger.com/blogger.g?blogID=5712790273933037367" name="connectedgraph4"></a>4. If a connected graph has exactly
two odd vertices it also has an open euler walk.
</ol>
<br />
<br />
<br />
<span style="font-size: medium;"><b>Previous year question and answer on graph theory
and answer:</b></span><br />
<pre class="western">1) The graph K3,4 has :
<span style="font-weight: normal;">(A) 3 edges (B) 4 edges (C) 7 edges </span><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) 12 edges</span></span></pre>
<div style="margin-bottom: 0in;">
<span style="background: none repeat scroll 0% 0% transparent;">2) The total number of spanning
trees that can be drawn using five labelled vertices is :</span></div>
<pre class="western"><span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) 125 </span></span><span style="font-weight: normal;"> (B) 64 (C) 36 (D) 16</span></span></pre>
<div style="margin-bottom: 0in;">
3) Which of the following does not define a tree ?</div>
<pre class="western"> (A) A tree is a connected acyclic graph.
(B) A tree is a connected graph with n-1 edges where 'n' is the number of
vertices in the graph.
(C) A tree is an acyclic graph with n-1 edges where 'n' is the number of
vertices in the graph.
<span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) A tree is a graph with no cycles.</span></span></span></pre>
<div style="margin-bottom: 0in;">
4) The complexity of Kruskal's minimum spanning tree algorithm on a
graph with 'n' nodes and 'e' edges is :</div>
<pre class="western"><span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(A) O (n) (B) O (n log n) </span><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C) O (e log n)</span></span><span style="font-weight: normal;"> (D) O (e)</span></span></pre>
<div style="margin-bottom: 0in;">
5) The number of edges in a complete graph with 'n' vertices is equal
to :</div>
<pre class="western"> (A) n(n-1) <span style="background-color: yellow;">(B)n(n-1)/2</span>
<span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(C) n</span><sup><span style="font-weight: normal;">2</span></sup><span style="font-weight: normal;"> (D) 2n-1</span></span></pre>
<div style="margin-bottom: 0in;">
6) Depth travels option of the following directed graph is :</div>
<div style="margin-bottom: 0in;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbFOczrhCB-bS_KhuHovGHu_nKTQIvFoCwdT9jco76sAdGunABFmoLb_NvDJaGoafUccHPNoukjTWANJoXQqlloQxlLEqUtFkJ13Aw19U2pQAk5XZmCWqhc60msjH0UlY64Xw8x5Jhcb6J/s1600/graph.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbFOczrhCB-bS_KhuHovGHu_nKTQIvFoCwdT9jco76sAdGunABFmoLb_NvDJaGoafUccHPNoukjTWANJoXQqlloQxlLEqUtFkJ13Aw19U2pQAk5XZmCWqhc60msjH0UlY64Xw8x5Jhcb6J/s200/graph.jpg" width="200" /></a></div>
<br /></div>
<pre class="western"> (A) ABCDEF (B) ABDEFC
<span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(C) ACEBDF </span><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) None of the above</span></span></span></pre>
<div style="margin-bottom: 0in;">
7) The maximum number of nodes in a binary tree of depth 10 :</div>
<pre class="western"><span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(A) 1024 </span><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) 2</span></span><sup><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">10</span></span></sup><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> -1 </span></span><span style="font-weight: normal;"> (C) 1000 (D) None of them</span></span></pre>
<div style="margin-bottom: 0in;">
8) The number of edges in a complete graph with N vertices is equal
to :</div>
<pre class="western"><span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(A) N (N−1) (B) 2N−1 (C) N−1 </span><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) N(N−1)/2</span></span></span></pre>
<div style="margin-bottom: 0in;">
9) For a complete graph with N vertices, the total number of spanning
trees is given by :</div>
<pre class="western"><span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(A) 2N-1 (B) N</span><sup><span style="font-weight: normal;">N-1</span></sup><span style="font-weight: normal;"> </span><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C) N</span></span><sup><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">N-2</span></span></sup><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> </span></span><span style="font-weight: normal;"> (D) 2N+1</span></span></pre>
<div style="margin-bottom: 0in;">
10) T is a graph with n vertices. T is connected and has exactly n-1
edges, then :</div>
<pre class="western"> (A) T is a tree
(B) T contains no cycles
(C) Every pairs of vertices in T is connected by exactly one path
<span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) All of these</span></span></span></pre>
<div style="margin-bottom: 0in;">
11) Which of the following statement is false ?</div>
<pre class="western"> (A) Every tree is a bipertite graph
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) A tree contains a cycle</span>
(C) A tree with n nodes contains n-1 edges
<span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(D) A tree is a connected graph</span></span></pre>
<div style="margin-bottom: 0in;">
12) The following lists are the degrees of all the vertices of a
graph :</div>
<pre class="western"> (i) 1, 2, 3, 4, 5 (ii) 3, 4, 5, 6, 7
(iii) 1, 4, 5, 8, 6 (iv) 3, 4, 5, 6
then
(A) (i) and (ii) <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) (iii) and (iv)</span>
<span style="background: none repeat scroll 0% 0% transparent;"> <span style="font-weight: normal;">(C) (iii) and (ii) (D) (ii) and (iv)</span></span></pre>
<pre class="western"><span style="background: none repeat scroll 0% 0% transparent;"><span style="font-weight: normal;"> </span></span></pre>
<br /><h2 class="western">
</h2>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com3tag:blogger.com,1999:blog-5712790273933037367.post-76981799936796577492012-05-02T19:46:00.001+05:302012-05-05T20:45:30.416+05:30Context Free Grammar<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<br /><u><b>Context Free
Grammar</b></u></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
</div>
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Context Free
grammar or CGF, G is represented by four components that is G= (V, T,
P, S), where V is the set of variables, T the terminals, P the set of
productions and S the start symbol.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Example: The
grammar G<sub>pal</sub> for palindromes is represented by
</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
G<sub>pal</sub> =
({P}, {0, 1}, A, P)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Where
A represents the set of five productions</div>
<div style="margin-bottom: 0in; margin-left: 0.5in; margin-top: 0.08in;">
1. P<span style="font-family: Wingdings;">→</span>∈<br />
2. P<span style="font-family: Wingdings;">→</span>0<br />
3. P<span style="font-family: Wingdings;">→</span>1<br />
4. P<span style="font-family: Wingdings;">→</span>0P0<br />
5. P<span style="font-family: Wingdings;">→</span>1P1<u><b> </b></u></div>
<div style="margin-bottom: 0in; margin-left: 0.5in; margin-top: 0.08in;">
<u><b>Derivation
using Grammar </b></u></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0CYvYo3QYgUdWiOYBZYS9aZsnF8kZ9tERhXYEeFQ5MbpRZ-Dc9sWI05cmFN81TZVCV__zCz935AZUUwdC5buE06CI8QdoQH7S8eMCEwU1gMIu6jdYLwBfLuIOGyEvIcjPwHeCbobIpmHa/s1600/cfg1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0CYvYo3QYgUdWiOYBZYS9aZsnF8kZ9tERhXYEeFQ5MbpRZ-Dc9sWI05cmFN81TZVCV__zCz935AZUUwdC5buE06CI8QdoQH7S8eMCEwU1gMIu6jdYLwBfLuIOGyEvIcjPwHeCbobIpmHa/s320/cfg1.jpg" width="320" /></a></div>
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div style="margin-bottom: 0in;">
<u><b>Example 1: Leftmost Derivation</b></u></div>
<div style="margin-bottom: 0in;">
The inference that a * (a+b00) is in
the language of variable E can be reflected in a derivation of that
string, starting with the string E. Here is one such derivation:</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
E <span style="font-family: Wingdings;">→</span>E *
E <span style="font-family: Wingdings;">→</span> I * E <span style="font-family: Wingdings;">→</span>
a * E <span style="font-family: Wingdings;">→</span>a * (E) <span style="font-family: Wingdings;">→</span>
a * (E + E) <span style="font-family: Wingdings;">→</span> a * (I + E) <span style="font-family: Wingdings;">→</span>
a * (a + E) <span style="font-family: Wingdings;">→</span>a * (a + I) <span style="font-family: Wingdings;">→</span>
a * (a + I0) <span style="font-family: Wingdings;">→</span> a * (a + I00) <span style="font-family: Wingdings;">→</span>
a * (a + b00)</div>
<div style="margin-bottom: 0in;">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
</div>
<div style="margin-bottom: 0in;">
<u><b>Leftmost Derivation - Tree</b></u></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QqiRUDNabU-7p6yYZT-jQb0n4_dFwqkjEQ-P9FcBwLVAZI8APLDoLwL88o0SkXpFThLTWhUsx0jFPIYnK9d2bossXyzmQwK9nDUziLA0qMxa03Yb_dKQfoHEx38s_3aJVs-2trHs5JER/s1600/cfg2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QqiRUDNabU-7p6yYZT-jQb0n4_dFwqkjEQ-P9FcBwLVAZI8APLDoLwL88o0SkXpFThLTWhUsx0jFPIYnK9d2bossXyzmQwK9nDUziLA0qMxa03Yb_dKQfoHEx38s_3aJVs-2trHs5JER/s1600/cfg2.jpg" /></a></div>
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Example 2:
Rightmost Derivations</b></u></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
The derivation of
Example 1 was actually a leftmost derivation. Thus, we can describe
the same derivation by:</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E<span style="font-family: Wingdings;">→</span>
E * E <span style="font-family: Wingdings;">→</span> E *(E) <span style="font-family: Wingdings;">→</span>
E * (E + E) <span style="font-family: Wingdings;">→</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E * (E + I) <span style="font-family: Wingdings;">→</span>
E * (E +I0) <span style="font-family: Wingdings;">→</span> E * (E + I00) <span style="font-family: Wingdings;">→</span>
E * (E + b00) <span style="font-family: Wingdings;">→</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E * (I + b00) <span style="font-family: Wingdings;">→</span>
E * (a +b00) <span style="font-family: Wingdings;">→</span> I * (a + b00) <span style="font-family: Wingdings;">→</span>
a * (a + b00)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
We can also
summarize the leftmost derivation by saying <br />
E <span style="font-family: Wingdings;">→</span>
a * (a + b00), or express several steps of the derivation by
expressions such as E * E <span style="font-family: Wingdings;">→</span> a
* (E).</div>
<div style="margin-bottom: 0in; margin-left: 0.5in; margin-top: 0.08in;">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Rightmost
Derivation - Tree</b></u></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGZhwVUmbAToWL5cYpzFrA5eOLbJSX3izYpsAaqvLCmuh8Cv7AejHBHmI9jHzbxwQZFnAYeecgHwrFqPp_Sp-cLge8l945Ywj1TiW0MIYBamz0eddRXRRE6cveJwFzrd5CkrL58Ok8mEH8/s1600/cfg3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGZhwVUmbAToWL5cYpzFrA5eOLbJSX3izYpsAaqvLCmuh8Cv7AejHBHmI9jHzbxwQZFnAYeecgHwrFqPp_Sp-cLge8l945Ywj1TiW0MIYBamz0eddRXRRE6cveJwFzrd5CkrL58Ok8mEH8/s1600/cfg3.jpg" /></a></div>
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div style="margin-bottom: 0in;">
There is a rightmost derivation that
uses the same replacements for each variable, although it makes the
replacements in different order. This rightmost derivation is:</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E <span style="font-family: Wingdings;">→</span>
E * E <span style="font-family: Wingdings;">→</span> E * (E) <span style="font-family: Wingdings;">→</span>
E * (E + E) <span style="font-family: Wingdings;">→</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E * (E + I) <span style="font-family: Wingdings;">→</span>
E * (E + I0) <span style="font-family: Wingdings;">→</span> E * (E + I00) <span style="font-family: Wingdings;">→</span>
E * (E + b00) <span style="font-family: Wingdings;">→</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E * (I + b00)
<span style="font-family: Wingdings;">→</span> E * (a + b00) <span style="font-family: Wingdings;">→</span>
I * (a + b00) <span style="font-family: Wingdings;">→</span> a * (a + b00)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
This derivation
allows us to conclude E <span style="font-family: Wingdings;">→</span> a * (a +
b00)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Consider the
Grammar for string(a+b)*c
</div>
<div style="margin-bottom: 0in; margin-top: 0.08in; text-indent: 0.5in;">
<span lang="fr-FR">E</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">E
+ T | T</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in; text-indent: 0.5in;">
<span lang="fr-FR">T</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">
T * F | F</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in; text-indent: 0.5in;">
<span lang="fr-FR">F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">
( E ) | a | b | c</span></div>
<div lang="fr-FR" style="margin-bottom: 0in; margin-top: 0.08in;">
Leftmost
Derivation</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<span lang="fr-FR">E</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">T</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">T*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">F*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(E)*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(E+T)*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(T+T)*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(F+T)*F
</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(a+T)*F
</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(a+F)*F
</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(a+b)*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(a+b)*c</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Rightmost
derivation</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<span lang="fr-FR">E</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">T</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">T*F</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">T*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">F*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(E)*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(E+T)*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(E+F)*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(E+b)*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(T+b)*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(F+b)*c</span><span style="font-family: Wingdings;">→</span><span lang="fr-FR">(a+b)*c</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Example 2:</b></u></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Consider the
Grammar for string (a,a)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
S->(L)|a</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
L->L,S|S</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Leftmost derivation</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
S<span style="font-family: Wingdings;">→</span>(L)<span style="font-family: Wingdings;">→</span>(L,S)<span style="font-family: Wingdings;">→</span>(S,S)<span style="font-family: Wingdings;">→</span>(a,S)<span style="font-family: Wingdings;">→</span>(a,a)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Rightmost
Derivation</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
S<span style="font-family: Wingdings;">→</span>(L)<span style="font-family: Wingdings;">→</span>(L,S)<span style="font-family: Wingdings;">→</span>(L,a)<span style="font-family: Wingdings;">→</span>(S,a)<span style="font-family: Wingdings;">→</span>(a,a)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>The Language
of a Grammar</b></u></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
If G(V,T,P,S) is a
CFG, the language of G, denoted by L(G), is the set of terminal
strings that have derivations from the start symbol.<br />
L(G) = {w
in T | S <span style="font-family: Wingdings;">→</span> w}</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Sentential
Forms</b></u></div>
<div align="JUSTIFY" style="margin-bottom: 0in; margin-top: 0.08in;">
Derivations from the start symbol produce strings that have a special
role called “sentential forms”. That is if G = (V, T, P, S) is a
CFG, then any string in (V <span style="font-family: Symbol,serif;">→</span> T)*
such that S <span style="font-family: Wingdings;">→</span><span style="font-family: Symbol,serif;">a</span>
is a sentential form. If S <span style="font-family: Wingdings;">→</span><span style="font-family: Symbol,serif;">a</span>,
then is a left – sentential form, and if S <span style="font-family: Wingdings;">→</span><span style="font-family: Symbol,serif;">a</span>
, then is a right – sentential form. Note that the language L(G)
is those sentential <br />
forms that are in T*; that is they consist
solely of terminals.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
For example, E * (I
+ E) is a sentential form, since there is a derivation</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E <span style="font-family: Wingdings;">→</span>
E * E <span style="font-family: Wingdings;">→</span> E * (E) <span style="font-family: Wingdings;">→</span>
E * (E + E) <span style="font-family: Wingdings;">→</span> E * (I + E)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
However this
derivation is neither leftmost nor rightmost, since at the last step,
the middle E is replaced.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
As an example of a
left – sentential form, consider a * E, with the leftmost
derivation.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E <span style="font-family: Wingdings;">→</span>
E * E <span style="font-family: Wingdings;">→</span> I * E <span style="font-family: Wingdings;">→</span>
a * E</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Additionally, the
derivation<br />
E <span style="font-family: Wingdings;">→</span> E * E <span style="font-family: Wingdings;">→</span>
E * (E) <span style="font-family: Wingdings;">→</span> E * (E + E)</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Shows that<br />
E *
(E + E) is a right – sentential form.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<span style="font-size: medium;"><u><b>Ambiguity</b></u></span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
A context – free
grammar G is said to be ambiguous if there exists some w <span style="font-family: Symbol,serif;">∈</span>L(G)
which has at least two distinct derivation trees. Alternatively,
ambiguity implies the existence of two or more left most or
rightmost derivations.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Ex:-</b></u></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Consider the
grammar G=(V,T,E,P) with V={E,I}, T={a,b,c,+,*,(,)}, and
productions.</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E<span style="font-family: Wingdings;">→</span>I,</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E<span style="font-family: Wingdings;">→</span>E+E,</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E<span style="font-family: Wingdings;">→</span>E*E,</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
E<span style="font-family: Wingdings;">→</span>(E),</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
I<span style="font-family: Wingdings;">→</span>a|b|c</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Consider two derivation trees for a + b
* c.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc8dySQ_P4bqJhC_nxYMGGbmj9fVy0_L_mGNUtBCb_E1nf4bI-ZGrIuoTs7mUO0wWKvWYVK7AHtq3uYHfgdAWafPLyYO-E8vGqFjAndkcqYDDaWL-BU632BlAyKGv9f0hQtJTQKeCNy_7O/s1600/cfg4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc8dySQ_P4bqJhC_nxYMGGbmj9fVy0_L_mGNUtBCb_E1nf4bI-ZGrIuoTs7mUO0wWKvWYVK7AHtq3uYHfgdAWafPLyYO-E8vGqFjAndkcqYDDaWL-BU632BlAyKGv9f0hQtJTQKeCNy_7O/s320/cfg4.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDfSEtK50B952tsMPz_PINl_PckCzK0Z_1SmOMkIrhB4S1nOszlQDP5YznCRgO47BHp88Fxc0NTFgyLTRmjiACI7KQXsuwJnhSvZsVxOX-2zWDt5wzvSi1taY9W768xKXulT2sculI5rAT/s1600/cfg5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDfSEtK50B952tsMPz_PINl_PckCzK0Z_1SmOMkIrhB4S1nOszlQDP5YznCRgO47BHp88Fxc0NTFgyLTRmjiACI7KQXsuwJnhSvZsVxOX-2zWDt5wzvSi1taY9W768xKXulT2sculI5rAT/s320/cfg5.jpg" width="320" /></a></div>
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Now unambiguous
grammar for the above</div>
<div lang="af-ZA" style="margin-bottom: 0in; margin-top: 0.08in;">
Example:</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<span lang="af-ZA"> E</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">T,
T</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">F,
F</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">I,
E</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">E+T,
T</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">T*F,</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<span lang="af-ZA"> F</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">(E),
I</span><span style="font-family: Wingdings;"><span lang="af-ZA">→</span></span><span lang="af-ZA">a|b|c</span></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Inherent
Ambiguity</b></u><br />
A CFL L is said to be inherently ambiguous if
all its grammars are ambiguous<br />
<u>Example:</u>Condider the
Grammar for string aabbccdd<br />
S<span style="font-family: Wingdings;">→</span>AB
| C<br />
A<span style="font-family: Wingdings;">→</span> aAb | ab<br />
B<span style="font-family: Wingdings;">→</span>cBd
| cd<br />
C<span style="font-family: Wingdings;">→</span> aCd | aDd<br />
D->bDc |
bc</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
Parse tree for
string aabbccdd</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzuyKqGenhOu1rjDFUPLaHqoo0xmzwJW4S_bxK5W2TDZ0uQva5SD_BreovlfdgA7xXC355R5JV-26n7xh0iCkQEGO0bLlJ2mwal8Bh6Fj4P02pY8iBSSJJrbx_cytBmuTT5l9Z7NCzN5qK/s1600/cfg6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzuyKqGenhOu1rjDFUPLaHqoo0xmzwJW4S_bxK5W2TDZ0uQva5SD_BreovlfdgA7xXC355R5JV-26n7xh0iCkQEGO0bLlJ2mwal8Bh6Fj4P02pY8iBSSJJrbx_cytBmuTT5l9Z7NCzN5qK/s320/cfg6.jpg" width="320" /></a></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<br /></div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
</div>
<div style="margin-bottom: 0in; margin-top: 0.08in;">
<u><b>Applications
of Context – Free Grammars</b></u></div>
<ul>
<li><div style="margin-bottom: 0in; margin-top: 0.08in;">
Parsers</div>
</li>
<li><div style="margin-bottom: 0in; margin-top: 0.08in;">
The YACC
Parser Generator</div>
</li>
<li><div style="margin-bottom: 0in; margin-top: 0.08in;">
Markup
Languages</div>
</li>
<li><div style="margin-bottom: 0in; margin-top: 0.08in;">
XML and
Document type definitions</div>
</li>
</ul>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-58629087679400754092012-05-01T14:57:00.001+05:302012-05-19T16:47:45.403+05:30UGC NET December 2008, Computer Science and Application Paper II Solution<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Georgia,"Times New Roman",serif;">
<style type="text/css">
pre.cjk { font-family: "WenQuanYi Zen Hei Mono",monospace; }pre.ctl { font-family: "Lohit Devanagari",monospace; }p { margin-bottom: 0.08in; }
</style> </div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br />
UGC NET December 2008, Computer Science and Application Paper II Solution<br />
<span style="font-size: small;">1 The channel capacity of a band-limited Gaussian channel is given by<br />
(A) B log<sub>2</sub> (2+S/N) <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) B log</span><sub><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">2</span></sub><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (1+S/N)</span><br />
(C )B log<sub>10</sub>(1+S/N) (D) B log<sub>e</sub>(1+S/N)<br />
<br />
2 The graph K <sub>3,4</sub> has _______ edges<br />
(A)3 edges (B) 4 edges<br />
(C )7 edges <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) 12 edges</span><br />
<br />
3 The total number of spanning trees that can be drawn using five labeled vertices is:<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)125 </span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B)64<br />
(C ) 36 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (D)16<br />
<br />
4 Extremely low power dissipation and low cost per gate can be achieved in <br />
(A) MOS IC<sub>S </sub></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> (B) C MOS IC</span><sub><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">S</span></sub><br />
(C ) TTL IC<sub>S</sub> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (D) ECL IC<sub>S</sub></span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">5 An example of a universal building block is :<br />
(A) EX-OR Gate </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (B) AND Gate<br />
(C ) OR gate</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) NOR Gate</span><br />
<br />
6 An example of a layer that is absent in broadcast networks is :<br />
(A) Physical layer </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) Presentation layer<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) Network layer </span></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"> </span> (D) application layer<br />
<br />
7 The ATM cell is :<br />
(A) 48 bytes long </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) 53 bytes long</span><br />
(C ) 64 bytes long </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 69 bytes long<br />
<br />
8 Four jobs J<sub>1</sub>,J<sub>2</sub>,J<sub>3</sub>, and J<sub>4</sub> are waiting to be run Their expected run times are 9,6,3 and 5 respectively In order to minimize average response time, the jobs should be run in the order:<br />
(A) J<sub>1 </sub>J<span style="font-size: x-small;">2</span> J<span style="font-size: x-small;">3</span> J<span style="font-size: x-small;">4</span> (B) J<span style="font-size: x-small;">4</span> J<span style="font-size: x-small;">3</span> J<span style="font-size: x-small;">2</span> J<span style="font-size: x-small;">1</span><br />
(C ) J<span style="font-size: x-small;">3</span> J<span style="font-size: x-small;">4</span> J<span style="font-size: x-small;">1</span> J<span style="font-size: x-small;">2</span> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) J<span style="font-size: x-small;">3</span> J<span style="font-size: x-small;">4</span> J<span style="font-size: x-small;">2</span> J<span style="font-size: x-small;">1</span></span><br />
<br />
<br />
9 Suppose it takes 100ns to access page table and 20 ns to access associative memory If the average access time is 28ns, the corresponding hit rate is:<br />
(A) 100 percent </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) 90 percent</span><br />
(C ) 80 percent</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 70 percent<br />
<br />
<br />
10 Transmission of N signals , each band limited to F<span style="font-size: x-small;">m</span> Hz by TDM, requires a minimum band-width of <br />
(A)f<span style="font-size: x-small;">m</span></span><span style="font-size: small;"><span style="font-size: x-small;"> </span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (B) 2 f<span style="font-size: x-small;">m</span><br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) N f<span style="font-size: x-small;">m</span></span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 2N f<span style="font-size: x-small;">m</span></span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><br />
11 If a code is ‘t’ error detecting, the minimum hamming distance should be equal to :<br />
(A) t-1</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (B) t<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) t+1</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 2t+1<br />
<br />
12 A relation R in {1,2,3,4,5,6} is given by {(1,2),(2,3),(3,4),(4,4),(4,5)} The relation is :<br />
(A) Reflexive </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) symmetric<br />
(C ) Transitive </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) not reflexive, not symmetric and not transitive</span><br />
<br />
13 The dual of the switching function x+yz is:<br />
(A) x+yz </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) x+yz<br />
(C ) x(y+z) </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) x(y+z)</span><br />
<br />
14 The characteristic equation of D-flip flop is :<br />
(A) Q=1 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) Q=0<br />
(C ) Q=D </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) Q=D</span><br />
<br />
15 If four 4 input mulitplexers drive a 4 input multiplexer we get a :<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) 16 input MUX</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) 8 input MUX<br />
(C ) 4 input MUX </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 2 input MUX<br />
<br />
16 The throughput of slotted ALOHA is given by:<br />
(A) S=G </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) S=GeG<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) S=Ge<span style="font-size: large;">-G</span></span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) S=eG<br />
<br />
<br />
<br />
17 Congestion control is done by<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Network layer </span></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) Physical layer<br />
(C ) Presentation layer</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) Application layer<br />
<br />
<br />
<br />
18 Assertion(A): Twisted pairs are widely used as transmission medium<br />
Reasoning(R ): Twisted pairs have adequate performance and low cost</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Both (A) and (R ) are true and (R ) is the correct explanation for (A)</span><br />
(B) Both (A) and (R ) are true but (R ) is not the correct explanation<br />
(C ) (A) is true but (R ) is false<br />
(D) (A) is false but (R ) is true<br />
<br />
<br />
19 An example of a non-adaptive routing algorithm is:<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Shortest path routing</span></span><span style="font-size: small;"> </span><span style="font-size: small;"> (B) Centralised routing<br />
(C ) Baran’s hot potato algorithm (D) Baran’s backward learning algorithm<br />
<br />
<br />
<br />
20 IP address in B class is given by:<br />
(A) 125.123.123.2</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) 191 . 023 . 21 . 54</span><br />
(C ) 192 . 128 . 32 . 56</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 10 . 14 . 12 . 34<br />
<br />
<br />
21 N processes are waiting for I/O A process spends a fraction of its time in I/O wait state The CPU utilization is given by:<br />
(A) 1-P –N </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) 1 – P N</span><br />
(C ) P N </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) P -N<br />
<br />
<br />
<br />
22 If holes are half as large as processes, the fraction of memory wasted in holes is:<br />
(A) 2 / 3 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) 1 / 2<br />
(C ) 1 / 3 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) 1 / 5</span><br />
<br />
<br />
<br />
23 An example of a non-premptive scheduling algorithm is:<br />
(A) Round robin </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) Priority scheduling<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) Shortest job first</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) 2 level scheduling<br />
<br />
<br />
24 An example of a distributed OS is:<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Amoeba</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) UNIX<br />
(C ) MS – DOS</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (D) MULTICS<br />
<br />
<br />
25 Which one of the following correctly describes a static variable:<br />
(A) It cannot be initialized<br />
(B) It is initialized once at the commencement of execution and cannot be changed during run time<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) It retains its value during the life of the program</span><br />
(D) None of the above<br />
<br />
<br />
26 The output of the program code<br />
main()<br />
{<br />
int x = 0;<br />
while ( x < = 10)<br />
for(;;)<br />
if (++x%10==0)<br />
break;<br />
printf(“x=%d”,x);<br />
}<br />
is:<br />
(A) x = 1 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) compilation error<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C ) x = 20 </span></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) none of the above</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">27 A copy constructor is invoked when : </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(A) a function returns by value <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) an argument is passed by value</span> </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C ) A function returns by reference (D) none of the above </span> </div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">28 When a language has the capability to produce new data types, it is said to be :</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) extensible</span></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) encapsulated</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"> (C ) Overloaded </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) none of the above</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">29 How many constructors can a class have? </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(A) Zero </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) 1 </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C ) 2 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) any number</span></span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">30 An entity has: </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(i) a set of properties </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(ii) a set of properties and values for all the properties </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(iii) a set of properties and the values for some set of properties may non-uniquely identify an entity (iv) a set of properties and the values for some set of properties may uniquely identify an entity Which of the above are valid? </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(A) (i) only </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) (ii) only </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C ) (iii) only </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) (iv) only </span></span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">31 Aggregation is: </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(A) An abstraction through which relationships are treated as lower level entities </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) An abstraction through which relationships are treated as higher level entities </span></span><span style="font-size: small;"> </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) An abstraction through which relationships are not treated at all as entities </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(D) None of the above</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<br /></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">32 Suppose R is a relation schema and F is a set of functional dependencies on R Further, suppose R1 and R2 forma a decomposition of R Then the decomposition is a lossless join decomposition of R provided that :</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(A) R1∩R2 ->R1 is in F+<br />
(B) R1 ∩ R2->R2 is in F+<br />
(C) Both R1 ∩ R2->R1 and R1 ∩ R2->R3 functional dependencies are in F+<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)At least one from R1∩R2->R1 and R1 ∩ R2->R2 is in F+</span><br />
<br />
<br />
<br />
33 In a heap, every element is ________________ of all the elements in the subtree<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Maximum</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) minimum<br />
(C ) sum </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) product<br />
<br />
<br />
<br />
34 If (rear == maxsize – 1) rear=0; else rear=rear+1; is required in :<br />
(A) circular queue</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"> (B) linear queue </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) stack </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) deque</span><br />
<br />
<br />
35 A high performance switching and multiplexing technology that utilizes fixed length packets to carry different types of traffic is :<br />
(<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">A) ATM</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) ADSL </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) SONET (D) None of the above<br />
<br />
<br />
<br />
36 A conventional LAN bridge specifies only the functions of OSI:<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Layers 1 and 2</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) layers 1 through 3 </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) all layers </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) none of the above<br />
<br />
<br />
<br />
37 An assembly program contains:<br />
(A) Imperative and declarative statements<br />
(B) Imperative statements and assembler directives<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C) Imperative and declarative statements as well as assembler directives</span><br />
(D) Declarative statements and assembler directives<br />
<br />
38 In which addressing mode, the effective address of the operand is generated by adding a constant value to the contents of a register?<br />
(A) Absolute mode </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) immediate mode </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) indirect mode </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) index mode</span><br />
<br />
<br />
39 Which of the following are Assembler directives?<br />
(i) EQU (ii) ORIGIN (iii) START (iv) END<br />
(A) (ii),(iii) and (iv) </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) (i),(iii) and (iv)<br />
(B) (iii) and (iv)</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) (i),(ii),(iii) and (iv)</span><br />
<br />
<br />
<br />
40 Which of the following OS treats hardware as a file system?<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) UNIX </span></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) DOS </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) Windows NT (D) none of the above<br />
<br />
<br />
41 In which of the following, ready to execute processes must be present in RAM?<br />
(A) Multiprocessing </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) multiprogramming </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) multitasking </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) all of the above</span><br />
<br />
<br />
42 If the executing program size is greater than the existing RAM of a computer, it is still possible to execute the program if the OS supports:<br />
(A) Multitasking </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) virtual memory</span> </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) paging system </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) none of the above<br />
<br />
43 Software Quality Assurance (SQA) encompasses:<br />
(A) Verification </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) validation <span style="background: none repeat scroll 0% 0% transparent;"> </span></span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><span style="background: none repeat scroll 0% 0% transparent;">(C) both verification and validation </span></span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(D) none of the above</span><br />
<br />
44 Which level is called as “defined” in capability maturity model?<br />
(A) Level 0 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) level 3</span> </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) level 4 </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) level 1<br />
<br />
<br />
45 COCOMO model is used for:<br />
(A) Product quality estimation </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) product complexity estimation <br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C) product cost estimation</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) all of the above<br />
<br />
46 Font sizes are usually expressed in points One point is:<br />
(A) 0.0069 inch </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) 0.0138 inch </span><br />
(C) 0.0207 inch </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D)0.00276 inch</span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><br />
47 Assertion (A): Cellular telephone systems can handle a multitude of users<br />
Reasoning(R ): Cellular telephone systems permit extensive frequency reuse in a small local area<br />
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A) Both (A) and (R ) are true and (R ) is the correct explanation for (A)</span><br />
(B) Both (A) and (R ) are true but (R ) is not the correct explanation<br />
(C) (A) is true but (R ) is false<br />
(D) (A) is false but (R ) is true<br />
<br />
<br />
<br />
48 E-Commerce involves:<br />
(A)Electronic Data Interchange </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) Electronic mail <br />
(C) Electronic Bulletin boards </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D) All of the above</span></span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;"><br />
49 An example of a data mining algorithm which uses squared error score function is:<br />
(A) CART algorithm </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B) back propagation algorithm</span> </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(C) a priori algorithm</span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(D) vector space algorithm<br />
<br />
50 (I) Each object in the active directory of windows 2000 has an access control list<br />
(II) The scheme is a blueprint of all objects in the domain of windows 2000 Which of the following is true?<br />
(A) Only (I) </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(B) only (II) </span></div>
<div style="font-family: Georgia,"Times New Roman",serif; line-height: 115%; margin-bottom: 0in;">
<span style="font-size: small;">(<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">C) both (I) and (II)</span> </span><span style="font-size: small;"> </span><span style="font-size: small;"> </span><span style="font-size: small;">(d) none of the above</span></div>
<pre class="western" style="font-family: Georgia,"Times New Roman",serif;"></pre>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-61653664384496073982012-05-01T01:08:00.000+05:302012-05-13T11:39:09.596+05:30UGC NET Solution of COMPUTER SCIENCE AND APPLICATIONS Paper II of December 2004<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Times,"Times New Roman",serif; text-align: center;">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
</div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in; text-align: center;">
<span style="font-size: large;">COMPUTER
SCIENCE AND APPLICATIONS</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in; text-align: center;">
<span style="font-size: large;">PAPER—II</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">Note
: This paper contains fifty (50) multiple-choice questions, each
question carrying two (2) marks. Attempt all of them.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">1.
AVA = A is called :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Identity law (B) De Morgan’s law</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Idempotant law</span></span><span style="font-size: large;">
(D) Complement law</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">2.
If f (x) =x+1 and g(x)=x+3 then f 0 f 0 f 0 f is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
g </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
g+1</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
g4 (D) None of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">3.
The context-free languages are closed for :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(i)
Intersection (ii) Union</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(iii)
Complementation (iv) Kleene Star</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">then</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
(i) and (iv) (B) (i) and (iii)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
(ii) and (iv) </span></span><span style="font-size: large;">(D)
(ii) and (iii)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">4.
The following lists are the degrees of all the vertices of a graph
:</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(i)
1, 2, 3, 4, 5 (ii) 3, 4, 5, 6, 7</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(iii)
1, 4, 5, 8, 6 (iv) 3, 4, 5, 6</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">then</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
(i) and (ii) </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
(iii) and (iv)</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
(iii) and (ii) (D) (ii) and (iv)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">5.
If Im denotes the set of integers modulo m, then the following are
fields with respect to the operations of addition modulo m and
multiplication modulo m :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(i)
Z23 <span style="color: lime;"> </span></span><span style="background-color: lime; color: black; font-size: large;"><span style="-moz-background-clip: border; -moz-background-origin: padding; -moz-background-size: auto auto; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: repeat;">(ii)
Z29</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(iii)
Z31 (iv) Z33</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">Then</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
(i) only (B) (i) and (ii) only</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
(i), (ii) and (iii) only (D) (i), (ii), (iii) and (iv)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">6.
An example of a binary number which is equal to its 2’s
complement is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
1100 (B) 1001</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
1000 </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
1111</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">7.
When a tri-state logic device is in the third state, then :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
it draws low current </span></span><span style="font-size: large;">(B)
it does not draw any current</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
it draws very high current (D) it presents a low impedance</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">8.
An example of a connective which is not associative is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
AND (B) OR</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
EX-OR </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
NAND</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">9.
Essential hazards may occur in :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Combinational logic circuits</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Synchronous sequential logic circuits</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Asynchronous sequential logic circuits working in the fundamental
mode</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(D)
Asynchronous sequential logic circuits working in the pulse mode</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">10.
The characteristic equation of a T flip-flop is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
Q</span><sub><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">n+1</span></sub></span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">=T</span></span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><span style="text-decoration: overline;">Q</span></span><sub><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><span style="text-decoration: overline;">n</span></span></sub></span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">
+ </span></span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><span style="text-decoration: overline;">T</span></span></span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">
Q</span><sub><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">n</span></sub></span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">
</span></span><span style="font-size: large;">(B)
Qn115T1Qn</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Qn115TQn (D) Qn115 T Q n</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">The
symbols used have the usual meaning.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">11.
Suppose x and y are two Integer Variables having values 035AB6 and
0361CD respectively. The result (in hex) of applying bitwise operator
and to x and y will be :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
035089 (B) 034084</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
0378A4 (D) 033AD1</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">12.
Consider the following statements,</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">Int
i=4, j=3, k=0;</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">k=++i
- --j + i++ - --j +j++; What will be the values of i, j and k after</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">the
statement.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
7, 2, 8 (B) 5, 2, 10</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
6, 2, 8 </span></span><span style="font-size: large;">(D)
4, 2, 8</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">13.
What is the value of the arithmetic expression (Written in C)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">2*3/423/4*
2</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
0 </span></span><span style="font-size: large;">
(B) 1</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
1.5 (D) None of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">14.
A function object :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
is an instance of a class for which operator ( ) is a member
function.</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
is an instance of a class for which operator → is a member
function.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
is a pointer to any function</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
is a member function of a class</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">15.
Polymorphism means :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
A template function</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
Runtime type identification within a class hierarchy</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Another name for operator overloading</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
Virtual inheritance</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">16.
The E-R model is expressed in terms of :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(i)
Entities</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(ii)
The relationship among entities</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in; margin-right: -0.56in;">
<span style="font-size: large;">(iii)
The attributes of the entities</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">Then</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
(i) and (iii) (B) (i) and (ii)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
(ii) and (iii)</span></span><span style="font-size: large;">
(D) None of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">17.
Specialization is a __________ process.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background-color: yellow;">(A)
Top - down</span> (B) Bottom -Up</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Both (A) and (B) (D) None of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">18.
The completeness constraint has rules :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Supertype, Subtype </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(B)Total
specialization, Partial specialization</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Specialization, Generalization (D) All of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">19.
The entity type on which the __________ type depends is called the
identifying owner.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Strong entity (B) Relationship</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Weak entity </span></span><span style="font-size: large;">
(D) E - R</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">20.
Match the following :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(i)
1 NF (a) Transitive dependencies eliminated</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(ii)
2 NF (b) Multivalued attribute removed</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(iii)3
NF (c) Contains no partial functional dependencies</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(iv)
4 NF (d) Contains no join dependency</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
i-a, ii-c, iii-b, iv-d </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
i-d, ii-c, iii-a, iv-b</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
i-d, ii-c, iii-b, iv-a (D) i-a, ii-b, iii-c, iv-d</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">21.
What item is at the root after the following sequence of insertions
into an empty splay</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">tree
:</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">1,
11, 3, 10, 8, 4, 6, 5, 7, 9, 2, ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
1</span></span><span style="font-size: large;">
(B) 2</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
4 (D) 8</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">22.
Suppose we are implementing quadratic probing with a Hash function,
Hash (y)=X</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">mode
100. If an element with key 4594 is inserted and the first three
locations attempted are already occupied, then the next cell that
will be tried is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
2 (B) 3</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(C)
9 </span></span><span style="font-size: large;">
(D) 97</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">23.
Weighted graph :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Is a bi-directional graph</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Is directed graph</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Is graph in which number associated with arc</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
Eliminates table method</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">24.
What operation is supported in constant time by the doubly linked
list, but not by the singly linked list ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Advance (B) Backup</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
First </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(D)
Retrieve</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);"><br /></span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">25.
How much extra space is used by heapsort ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
O (1) </span></span><span style="font-size: large;">
(B) O (Log n)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
O (n) (D) O (n2)</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">26.
Error control is needed at the transport layer because of potential
error occurring __________.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
from transmission line noise </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
in router</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
from out of sequency delivery (D) from packet losses</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">27.
Making sure that all the data packets of a message are delivered to
the destination is _________ control.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Error </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
Loss</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Sequence (D) Duplication</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">28.
Which transport class should be used with a perfect network layer ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
TP0 and TP2 </span></span><span style="font-size: large;">
(B) TP1 and TP3</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
TP0, TP1, TP3 (D) TP0, TP1, TP2, TP3, TP4</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">29.
Which transport class should be used with residual-error network
layer ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% transparent;">(A)
TP0, TP2 </span></span><span style="font-size: large;">
</span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
TP1, TP3</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
TP1, TP3, TP4 (D) TP0, TP1, TP2, TP3, TP4</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">30.
Virtual circuit is associated with a __________ service.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Connectionless (B) Error-free</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Segmentation </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
Connection-oriented</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><br /></span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">31.
Which activity is not included in the first pass of two pass
assemblers ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Build the symbol table</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Construct the intermediate code</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% transparent;">(C)
Separate mnemonic opcode and operand fields</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
None of the above</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><br /></span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">32.
Which of the following is not collision resolution technique?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
Hash addressing</span></span><span style="font-size: large;">
(B) Chaining</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Both (A) and (B) (D) Indexing</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">33.
Code optimization is responsibility of :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Application programmer (B) System programmer</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)Operating
system</span></span><span style="font-size: large;"> (D)
All of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">34.
Which activity is included in the first pass of two pass assemblers ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
Build the symbol table</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
Construct the intermediate code</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Separate mnemonic opcode and operand fields</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
None of these</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">35.
In two pass assembler the symbol table is used to store :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(</span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">A)
Label and value </span></span><span style="font-size: large;">
(B) Only value</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Mnemonic (D) Memory Location</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">36.
Semaphores are used to :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
Synchronise critical resources to prevent deadlock</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Synchronise critical resources to prevent contention</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Do I/o</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
Facilitate memory management</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">37.
In which of the following storage replacement strategies, is a
program placed in the largest available hole in the memory ?</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Best fit (B) First fit</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Worst fit</span></span><span style="font-size: large;">
(D) Buddy</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">38.
Remote computing system involves the use of timesharing systems and :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Real time processing (B) Batch processing</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Multiprocessing </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
All of the above</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><br /></span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">39.
Non modifiable procedures are called</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Serially useable procedures (B) Concurrent procedures</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Reentrant procedures </span></span><span style="font-size: large;">
(D) Topdown procedures</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">40.
Match the following</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(a)
Disk scheduling (1) Round robin</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(b)
Batch processing (2) Scan</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(c)
Time sharing (3) LIFO</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(d)
Interrupt processing (4) FIFO</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
a-3, b-4, c-2, d-1 (B) a-4, b-3, c-2, d-1</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
a-2, b-4, c-1, d-3 </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
a-3, b-4, c-1, d-2</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><br /></span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">41.
The main objective of designing various modules of a software system
is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
To decrease the cohesion and to increase the coupling</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
To increase the cohesion and to decrease the coupling</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
To increase the coupling only</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
To increase the cohesion only</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">42.
Three essential components of a software project plan are :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Team structure, Quality assurance plans, Cost estimation</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
Cost estimation, Time estimation, Quality assurance plan</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Cost estimation, Time estimation, Personnel estimation</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
Cost estimation, Personnel estimation, Team structure</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">43.
Reliability of software is dependent on :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
Number of errors present in software</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Documentation</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Testing suties</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(D)
Development Processes</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">44.
In transform analysis, input portion is called :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(A)
Afferent branch </span></span><span style="font-size: large;">
(B) Efferent branch</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Central Transform (D) None of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">45.
The Function Point (FP) metric is :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Calculated from user requirements</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Calculated from Lines of code</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Calculated from softwar’s complexity assessment</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
None of the above</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);"><br /></span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">46.
Data Mining can be used as _________ Tool.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Software (B) Hardware</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(C)
Research </span></span><span style="font-size: large;">
</span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% transparent;">(D)
Process</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">47.
The processing speeds of pipeline segments are usually :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Equal </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(B)
Unequal</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Greater (D) None of these</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">48.
The cost of a parallel processing is primarily determined by :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">(A)
Time complexity </span></span><span style="font-size: large;">
(B) Switching complexity</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Circuit complexity (D) None of the above</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">49.
A data warehouse is always _________.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
Subject oriented </span><span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(B)
Object oriented</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Program oriented (D) Compiler oriented</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><br /></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">50.
The term 'hacker' was originally associated with :</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(A)
A computer program</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(B)
Virus</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;">(C)
Computer professionals who solved complex computer problems.</span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
<span style="font-size: large;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">(D)
All of the above</span></span></div>
<div style="font-family: Times,"Times New Roman",serif; margin-bottom: 0in;">
</div>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-62184869561994213162012-04-27T16:07:00.000+05:302012-05-05T20:48:28.675+05:30MCQ on Computer Organization<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br /><br />
Q.1 In Reverse Polish notation, expression A*B+C*D is written as<br />
(A) AB*CD*+ (B) A*BCD*+<br />
(C) AB*CD+* (D) A*B*CD+<br />
Ans: A<br />
<br />
Q.2 SIMD represents an organization that ______________.<br />
(A) refers to a computer system capable of processing <br />
several programs at the same time.<br />
(B) represents organization of single computer containing<br />
a control unit, processor unit and a memory unit.<br />
(C) includes many processing units under the supervision <br />
of a common control unit<br />
(D) none of the above.<br />
Ans: C<br />
Note:<br />
Single instruction, multiple data (SIMD), is a class of parallel computers in Flynn's taxonomy. It describes computers with multiple processing elements that perform the same operation on multiple data simultaneously. Thus, such machines exploit data level parallelism.<br />
Ref. : <a href="http://en.wikipedia.org/wiki/SIMD">wiki</a><br />
<br />
Q.3 Floating point representation is used to store<br />
(A) Boolean values (B) whole numbers<br />
(C) real integers (D) integers<br />
Ans: C<br />
<br />
Q.4 Suppose that a bus has 16 data lines and requires 4 cycles of 250 nsecs each to transfer data. The bandwidth of this bus would be 2 Megabytes/sec. If the cycle time of the bus was reduced to 125 nsecs and the number of cycles required for transfer stayed the same what would the bandwidth of the bus?<br />
(A) 1 Megabyte/sec (B) 4 Megabytes/sec<br />
(C) 8 Megabytes/sec (D) 2 Megabytes/sec<br />
Ans: D<br />
<br />
Q.5 Assembly language<br />
(A) uses alphabetic codes in place of binary numbers used <br />
in machine language<br />
(B) is the easiest language to write programs<br />
(C) need not be translated into machine language<br />
(D) None of these<br />
Ans: A<br />
<br />
Q.6 In computers, subtraction is generally carried out by<br />
(A) 9's complement (B) 10's complement<br />
(C) 1's complement (D) 2's complement<br />
Ans: D<br />
<br />
Q.7 The amount of time required to read a block of data from a disk into memory is composed of seek time, rotational latency, and transfer time. Rotational latency refers to<br />
(A) the time its takes for the platter to make a full rotation<br />
(B) the time it takes for the read-write head to move into position over the appropriate track<br />
(C) the time it takes for the platter to rotate the correct sector under the head<br />
(D) none of the above<br />
Ans: A<br />
<br />
Q.8 What characteristic of RAM memory makes it not suitable <br />
for permanent storage?<br />
(A) too slow (B) unreliable<br />
(C) it is volatile (D) too bulky<br />
Ans: C<br />
<br />
Q.9 Computers use addressing mode techniques for _____________________.<br />
(A) giving programming versatility to the user by providing facilities as pointers to memory counters for loop control<br />
(B) to reduce no. of bits in the field of instruction<br />
(C) specifying rules for modifying or interpreting address field of the instruction<br />
(D) All the above<br />
Ans: D<br />
<br />
Q.10 The circuit used to store one bit of data is known as<br />
(A) Register (B) Encoder<br />
(C) Decoder (D) Flip Flop<br />
Ans: D<br />
<br />
Q. 11 (2FAOC) of base 16 is equivalent to<br />
(A) (195 084)10 (B) (001011111010 0000 1100)2<br />
(C) Both (A) and (B) (D) None of these<br />
Ans: B<br />
<br />
Q.12 The average time required to reach a storage location in memory and obtain its contents is called the<br />
(A) seek time (B) turnaround time<br />
(C) access time (D) transfer time<br />
Ans: C<br />
<br />
Q.13 Which of the following is not a weighted code?<br />
(A) Decimal Number system (B) Excess 3-cod<br />
(C) Binary number System (D) None of these<br />
Ans: B<br />
<br />
Q.14 The idea of cache memory is based<br />
(A) on the property of locality of reference<br />
(B) on the heuristic 90-10 rule<br />
(C) on the fact that references generally tend to cluster<br />
(D) all of the above<br />
Ans: A<br />
<br />
Q.15 _________ register keeps track of the instructions stored in program stored in<br />
memory.<br />
(A) AR (Address Register) (B) XR (Index Register)<br />
(C) PC (Program Counter) (D) AC (Accumulator)<br />
Ans: C<br />
<br />
Q.16 The addressing mode used in an instruction of the form ADD X Y, is<br />
(A) Absolute (B) indirect<br />
(C) index (D) none of these<br />
Ans: C<br />
<br />
Q.17 If memory access takes 20 ns with cache and 110 ns with out it, then the ratio ( cache uses a 10 ns memory) is<br />
(A) 93% (B) 90%<br />
(C) 88% (D) 87%<br />
Ans: B<br />
<br />
Q.18 In a memory-mapped I/O system, which of the following will not be there?<br />
(A) LDA (B) IN<br />
(C) ADD (D) OUT<br />
Ans: A<br />
<br />
Q.19 In a vectored interrupt.<br />
(A) the branch address is assigned to a fixed location in memory.<br />
(B) the interrupting source supplies the branch information to the processor through an interrupt vector.<br />
(C) the branch address is obtained from a register in the processor<br />
(D) none of the above<br />
Ans: B<br />
<br />
Q.20 Von Neumann architecture is<br />
(A) SISD (B) SIMD<br />
(C) MIMD (D) MISD<br />
Ans: A<br />
<br />
Q. 21 The circuit used to store one bit of data is known as<br />
(A) Encoder (B) OR gate<br />
(C) Flip Flop (D) Decoder<br />
Ans: C<br />
<br />
Q.22 Cache memory acts between<br />
(A) CPU and RAM (B) RAM and ROM<br />
(C) CPU and Hard Disk (D) None of these<br />
Ans: A<br />
<br />
Q.23 Write Through technique is used in which memory for updating the<br />
data<br />
(A) Virtual memory (B) Main memory<br />
(C) Auxiliary memory (D) Cache memory<br />
Ans: D<br />
<br />
Q.24 Generally Dynamic RAM is used as main memory in a computer<br />
system as it<br />
(A) Consumes less power (B) has higher speed<br />
(C) has lower cell density (D) needs refreshing circuitary<br />
Ans: B<br />
<br />
Q.25 In signed-magnitude binary division, if the dividend is (11100)2 and divisor is<br />
(10011)2 then the result is<br />
(A) (00100)2 (B) (10100)2<br />
(C) (11001)2 (D) (01100)2<br />
Ans: B<br />
<br />
Q.26 Virtual memory consists of<br />
(A) Static RAM (B) Dynamic RAM<br />
(C) Magnetic memory (D) None of these<br />
Ans: A<br />
<br />
Q.27 In a program using subroutine call instruction, it is necessary<br />
(A) initialise program counter<br />
(B) Clear the accumulator<br />
(C) Reset the microprocessor<br />
(D) Clear the instruction register<br />
Ans: D<br />
<br />
Q.28 A Stack-organised Computer uses instruction of<br />
(A) Indirect addressing (B) Two-addressing<br />
(C) Zero addressing (D) Index addressing<br />
Ans: C<br />
<br />
Q.29 If the main memory is of 8K bytes and the cache memory is of 2K words. It uses associative mapping. Then each word of cache memory shall be<br />
(A) 11 bits (B) 21 bits<br />
(C) 16 bits (D) 20 bits<br />
Ans: C<br />
<br />
Q.30 A-Flip Flop can be converted into T-Flip Flop by using additional logic circuit<br />
(A) D = T * Qn (B) D = T<br />
(C) D = T . Qn (D) D = T•Qn<br />
Ans: D<br />
<br />
Q.31 Logic X-OR operation of (4ACO)H & (B53F)H results<br />
(A) AACB (B) 0000<br />
(C) FFFF (D) ABCD<br />
Ans: C<br />
<br />
Q.32 When CPU is executing a Program that is part of the Operating System, it is said to be<br />
in<br />
(A) Interrupt mode (B) System mode<br />
(C) Half mode (D) Simplex mode<br />
Ans: B<br />
<br />
Q.33 An n-bit microprocessor has<br />
(A) n-bit program counter (B) n-bit address register<br />
(C) n-bit ALU (D) n-bit instruction register<br />
Ans: D<br />
<br />
Q.34 Cache memory works on the principle of<br />
(A) Locality of data (B) Locality of memory<br />
(C) Locality of reference (D) Locality of reference & memory<br />
Ans: C<br />
<br />
Q.35 The main memory in a Personal Computer (PC) is made of<br />
(A) cache memory. (B) static RAM<br />
(C) Dynamic Ram (D) both (A) and (B).<br />
Ans: D<br />
<br />
Q.36 In computers, subtraction is carried out generally by<br />
(A) 1's complement method<br />
(B) 2's complement method<br />
(C) signed magnitude method<br />
(D) BCD subtraction method<br />
Ans: B<br />
<br />
Q.37 PSW is saved in stack when there is a<br />
(A) interrupt recognised<br />
(B) execution of RST instruction<br />
(C) Execution of CALL instruction<br />
(D) All of these<br />
Ans: A<br />
<br />
Q.38 The multiplicand register & multiplier register of a hardware circuit implementing<br />
booth's algorithm have (11101) & (1100). The result shall be<br />
(A) (812)10 (B) (-12)10<br />
(C) (12)10 (D) (-812)10<br />
Ans: A<br />
<br />
Q.39 The circuit converting binary data in to decimal is<br />
(A) Encoder (B) Multiplexer<br />
(C) Decoder (D) Code converter<br />
Ans: D<br />
<br />
Q.40 A three input NOR gate gives logic high output only when<br />
(A) one input is high (B) one input is low<br />
(C) two input are low (D) all input are high<br />
Ans: D<br />
<br />
Q.41 n bits in operation code imply that there are ___________ possible distinct operators<br />
(A) 2n (B) 2n<br />
(C) n/2 (D) n2<br />
Ans: B<br />
<br />
Q.42 _________ register keeps tracks of the instructions stored in program stored in memory.<br />
(A) AR (Address Register) (B) XR (Index Register)<br />
(C) PC (Program Counter) (D) AC (Accumulator)<br />
Ans: C<br />
<br />
Q.43 Memory unit accessed by content is called<br />
(A) Read only memory (B) Programmable Memory<br />
(C) Virtual Memory (D) Associative Memory<br />
Ans: D<br />
<br />
Q.44 "Aging registers" are<br />
(A) Counters which indicate how long ago their associated pages have been referenced.<br />
(B) Registers which keep track of when the program was last accessed.<br />
(C) Counters to keep track of last accessed instruction.<br />
(D) Counters to keep track of the latest data structures referred.<br />
Ans: A<br />
<br />
Q.45 The instruction "ORG O" is a<br />
(A) Machine Instruction. (B) Pseudo instruction.<br />
(C) High level instruction. (D) Memory instruction.<br />
Ans: B<br />
<br />
Q.46 Translation from symbolic program into Binary is done in<br />
(A) Two passes. (B) Directly<br />
(C) Three passes. (D) Four passes.<br />
Ans: A<br />
<br />
Q.47 A floating point number that has a O in the MSB of mantissa is said to have<br />
(A) Overflow (B) Underflow<br />
(C) Important number (D) Undefined<br />
Ans: B<br />
<br />
Q.48 The BSA instruction is<br />
(A) Branch and store accumulator<br />
(B) Branch and save return address<br />
(C) Branch and shift address<br />
(D) Branch and show accumulator<br />
Ans: B<br />
<br />
Q.49 State whether True or False.<br />
(i) Arithmetic operations with fixed point numbers take longer time for execution as compared to with floating point numbers.<br />
Ans: True.<br />
(ii) An arithmetic shift left multiplies a signed binary number by 2.<br />
Ans: False.<br />
<br />
Q.50 Logic gates with a set of input and outputs is arrangement of<br />
(A) Combinational circuit (B) Logic circuit<br />
(C) Design circuits (D) Register<br />
Ans: A<br />
<br />
Q.51 MIMD stands for<br />
(A) Multiple instruction multiple data<br />
(B) Multiple instruction memory data<br />
(C) Memory instruction multiple data<br />
(D) Multiple information memory data<br />
Ans: A<br />
<br />
Q.52 A k-bit field can specify any one of<br />
(A) 3k registers (B) 2k registers<br />
(C) K2 registers (D) K3 registers<br />
Ans: B<br />
<br />
Q.53 The time interval between adjacent bits is called the<br />
(A) Word-time (B) Bit-time<br />
(C) Turn around time (D) Slice time<br />
Ans: B<br />
<br />
Q.54 A group of bits that tell the computer to perform a specific operation is known as<br />
(A) Instruction code (B) Micro-operation<br />
(C) Accumulator (D) Register<br />
Ans: A<br />
<br />
Q.55 The load instruction is mostly used to designate a transfer from memory to a<br />
processor register known as<br />
(A) Accumulator (B) Instruction Register<br />
(C) Program counter (D) Memory address Register<br />
Ans: A<br />
<br />
Q.56 The communication between the components in a microcomputer takes place via the<br />
address and<br />
(A) I/O bus (B) Data bus<br />
(C) Address bus (D) Control lines<br />
Ans: B<br />
<br />
Q.57 An instruction pipeline can be implemented by means of<br />
(A) LIFO buffer (B) FIFO buffer<br />
(C) Stack (D) None of the above<br />
Ans: B<br />
<br />
Q.58 Data input command is just the opposite of a<br />
(A) Test command (B) Control command<br />
(C) Data output (D) Data channel<br />
Ans: C<br />
<br />
Q.59 A microprogram sequencer<br />
(A) generates the address of next micro instruction to be executed.<br />
(B) generates the control signals to execute a microinstruction.<br />
(C) sequentially averages all microinstructions in the control memory.<br />
(D) enables the efficient handling of a micro program subroutine.<br />
Ans: A<br />
<br />
Q.60 A binary digit is called a<br />
(A) Bit (B) Byte<br />
(C) Number (D) Character<br />
Ans: A<br />
<br />
Q.61 A flip-flop is a binary cell capable of storing information of<br />
(A) One bit (B) Byte<br />
(C) Zero bit (D) Eight bit<br />
Ans: A<br />
<br />
Q.62 The operation executed on data stored in registers is called<br />
(A) Macro-operation (B) Micro-operation<br />
(C) Bit-operation (D) Byte-operation<br />
Ans: B<br />
<br />
Q.63 MRI indicates<br />
(A) Memory Reference Information.<br />
(B) Memory Reference Instruction.<br />
(C) Memory Registers Instruction.<br />
(D) Memory Register information<br />
Ans: B<br />
<br />
Q.64 Self-contained sequence of instructions that performs a given computational task is called<br />
(A) Function (B) Procedure<br />
(C) Subroutine (D) Routine<br />
Ans: A<br />
<br />
Q.65 Microinstructions are stored in control memory groups, with each group specifying a<br />
(A) Routine (B) Subroutine<br />
(C) Vector (D) Address<br />
Ans: A<br />
<br />
Q.66 An interface that provides a method for transferring binary information between<br />
internal storage and external devices is called<br />
(A) I/O interface (B) Input interface<br />
(C) Output interface (D) I/O bus<br />
Ans: A<br />
<br />
Q.67 Status bit is also called<br />
(A) Binary bit (B) Flag bit<br />
(C) Signed bit (D) Unsigned bit<br />
Ans: B<br />
<br />
Q.68 An address in main memory is called<br />
(A) Physical address (B) Logical address<br />
(C) Memory address (D) Word address<br />
Ans: A<br />
<br />
Q.69 If the value V(x) of the target operand is contained in the address field itself, the<br />
addressing mode is<br />
(A) immediate. (B) direct.<br />
(C) indirect. (D) implied.<br />
Ans: B<br />
<br />
Q.70(-27)10 can be represented in a signed magnitude format and in a 1's complement format as<br />
(A) 111011 & 100100 (B) 100100 & 111011<br />
(C) 011011 & 100100 (D) 100100 & 011011<br />
Ans: A<br />
<br />
Q.71 The instructions which copy information from one location to another either in the processor's internal register set or in the external main memory are called<br />
(A) Data transfer instructions.(B) Program control instructions.<br />
(C) Input-output instructions. (D) Logical instructions.<br />
Ans: A<br />
<br />
Q.72 A device/circuit that goes through a predefined sequence of states upon the application<br />
of input pulses is called<br />
(A) register (B) flip-flop<br />
(C) transistor. (D) counter.<br />
Ans: D<br />
<br />
Q.73 The performance of cache memory is frequently measured in terms of a quantity called<br />
(A) Miss ratio. (B) Hit ratio.<br />
(C) Latency ratio. (D) Read ratio.<br />
Ans: C<br />
<br />
Q.74 The information available in a state table may be represented graphically in a<br />
(A) simple diagram. (B) state diagram.<br />
(C) complex diagram. (D) data flow diagram.<br />
Ans: B<br />
<br />
Q.75 Content of the program counter is added to the address part of the instruction in order to obtain the effective address is called.<br />
(A) relative address mode. (B) index addressing mode.<br />
(C) register mode. (D) implied mode.<br />
Ans: A<br />
<br />
Q.76 An interface that provides I/O transfer of data directly to and form the memory unit and peripheral is termed as<br />
(A) DDA. (B) Serial interface.<br />
(C) BR. (D) DMA.<br />
Ans: D<br />
<br />
Q.77 The 2s compliment form (Use 6 bit word) of the number 1010 is<br />
(A) 111100. (B) 110110.<br />
(C) 110111. (D) 1011.<br />
Ans: B<br />
<br />
Q.78 A register capable of shifting its binary information either to the right or the left is called a<br />
(A) parallel register. (B) serial register.<br />
(C) shift register. (D) storage register.<br />
Ans: C<br />
<br />
Q.79 What is the content of Stack Pointer (SP)?<br />
(A) Address of the current instruction<br />
(B) Address of the next instruction<br />
(C) Address of the top element of the stack<br />
(D) Size of the stack.<br />
Ans: C<br />
<br />
Q.80 Which of the following interrupt is non maskable<br />
(A) INTR. (B) RST 7.5.<br />
(C) RST 6.5. (D) TRAP.<br />
Ans: D<br />
<br />
Q.81 Which of the following is a main memory<br />
(A) Secondary memory. (B) Auxiliary memory.<br />
(C) Cache memory. (D) Virtual memory.<br />
Ans: C<br />
<br />
Q.82 Which of the following are not a machine instructions<br />
(A) MOV. (B) ORG.<br />
(C) END. (D) (B) & (C).<br />
Ans: D<br />
<br />
Q.83 In Assembly language programming, minimum number of operands required for an instruction is/are<br />
(A) Zero. (B) One.<br />
(C) Two. (D) Both (B) & (C).<br />
Ans: A<br />
<br />
Q.84 The maximum addressing capacity of a micro processor which uses 16 bit database is<br />
32 bit address base is<br />
(A) 64 K. (B) 4 GB.<br />
(C) both (A) & (B). (D) None of these.<br />
Ans: B<br />
<br />
Q.85 The memory unit that communicates directly with the CPU is called the<br />
(A) main memory (B) Secondary memory<br />
(C) shared memory (D) auxiliary memory.<br />
Ans: A<br />
<br />
Q.86 The average time required to reach a storage location in memory and obtain its contents<br />
is called<br />
(A) Latency time. (B) Access time.<br />
(C) Turnaround time. (D) Response time.<br />
Ans: B<br />
<br />
State True or False<br />
Q.87 A byte is a group of 16 bits.<br />
Ans: False<br />
<br />
Q.88 A nibble is a group of 16 bits.<br />
Ans: False<br />
<br />
Q.89 When a word is to be written in an associative memory, address has got to be given.<br />
Ans: False<br />
<br />
Q.90 When two equal numbers are subtracted, the result would be ______and not_________.<br />
Ans: +ZERO, -ZERO.<br />
<br />
Q.91 A ___________development system and an ______are essential tools for writing large assembly language programs.<br />
Ans: Microprocessor, assembler<br />
<br />
Q.92 In an operation performed by the ALU, carry bit is set to 1 if the end carry C8 is ________. It is cleared to 0 (zero) if the carry is ______ _______.<br />
Ans: One, zero<br />
<br />
Choose the correct alternative<br />
Q.93 A successive A/D converter is<br />
(A) a high-speed converter. (B) a low speed converter.<br />
(C) a medium speed converter. (D) none of these.<br />
Ans: C<br />
<br />
Q.94 When necessary, the results are transferred from the CPU to main memory by<br />
(A) I/O devices. (B) CPU.<br />
(C) shift registers. (D) none of these.<br />
Ans: B<br />
<br />
Q.95 The gray code equivalent of (1011)2 is<br />
(A) 1101. (B) 1010.<br />
(C) 1110. (D) 1111.<br />
Ans: C<br />
<br />
Q.96 A combinational logic circuit which sends data coming from a single source to two or more separate destinations is<br />
(A) Decoder. (B) Encoder.<br />
(C) Multiplexer. (D) Demultiplexer.<br />
Ans: D<br />
<br />
Q.97 In which addressing mode the operand is given explicitly in the instruction<br />
(A) Absolute. (B) Immediate.<br />
(C) Indirect. (D) Direct.<br />
Ans: B<br />
<br />
Q.98 A stack organized computer has<br />
(A) Three-address Instruction. (B) Two-address Instruction.<br />
(C) One-address Instruction. (D) Zero-address Instruction.<br />
Ans: D<br />
<br />
Q.99 A Program Counter contains a number 825 and address part of the instruction contains the number 24. The effective address in the relative address mode, when an instruction is read from the memory is<br />
(A) 849. (B) 850.<br />
(C) 801. (D) 802.<br />
Ans: B<br />
<br />
Q.100 A system program that translates and executes an instruction simultaneously is<br />
(A) Compiler. (B) Interpreter.<br />
(C) Assembler. (D) Operating system.<br />
Ans: C<br />
<br />
Q.101 The cache memory of 1K words uses direct mapping with a block size of 4 words. How many blocks can the cache accommodate.<br />
(A) 256 words. (B) 512 words.<br />
(C) 1024 words. (D) 128 words.<br />
Ans: A<br />
<br />
Q.102 A page fault<br />
(A) Occurs when there is an error in a specific page.<br />
(B) Occurs when a program accesses a page of main memory.<br />
(C) Occurs when a program accesses a page not currently in main memory.<br />
(D) Occurs when a program accesses a page belonging to another program.<br />
Ans: C<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-62902532653166750042012-04-25T01:51:00.000+05:302012-05-05T20:48:57.241+05:30DFA(Deterministic Finite Automaton) of Binary Number Divisible by 2<div dir="ltr" style="text-align: left;" trbidi="on">
<br />Q: Draw a DFA of binary number divisible by 2<br />
<br />
<br />
Solution:<br />
<br />
A binary number is divisible by 2 if its last digit is "0". So the DFA of binary number divisible by 2 is as:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQmppywZoCq8mC6kCQQPvGpCPwgy3hDoyDYfRcxr8rSEURwvH_3CC1KsOUS0x7EgYFoUkXovgwv4LGvXtoAH8tW-0_0kcivAqABJoL_Nom5KxeKLg_vTGsIvyzAT5dQOysYI8qluN6hyo4/s1600/DFA_Binary_Divisible_by_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="114" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQmppywZoCq8mC6kCQQPvGpCPwgy3hDoyDYfRcxr8rSEURwvH_3CC1KsOUS0x7EgYFoUkXovgwv4LGvXtoAH8tW-0_0kcivAqABJoL_Nom5KxeKLg_vTGsIvyzAT5dQOysYI8qluN6hyo4/s320/DFA_Binary_Divisible_by_2.jpg" width="320" /></a></div>
<br />
<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-75306454883447238632012-04-25T01:43:00.000+05:302012-05-05T20:49:31.817+05:30DFA(Deterministic Finite Automaton) of Binary Number Divisible by 3<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://www.kalikinkar.blogspot.in/2012/05/p-margin-bottom-0.html"><br /></a><br />
<br />
Q: Draw a DFA of binary number divisible by 3 over alphabet {0,1}<br />
<br />
Solution: First we try to look how a binary number changes when 0 or 1 is inserted at right side. (Mod_0, Mod_1, Mod_2 are remainder of a number when divisible by 3)<br />
<br />
Inserted Digit Mod_0 Mod_1 Mod_2<br />
---------------------------------------------------------------------------------------------<br />
0 Mod_0 Mod_2 Mod_1<br />
--------------------------------------------------------------------------------------------<br />
1 Mod_1 Mod_0 Mod_2<br />
-------------------------------------------------------------------------------------------<br />
<br />
<br />
So the DFA is as:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_NoBpicBbvKFbdzOjoWawCMs4HaiTkZsP59Hb2SVD2jk6h9aOFXSj6VkUZZfsCNo4Hu9U0U2Sx3mQChZan748YYWTkLbfdDuAK-WH2VPBFqI0T7aK6W8YZRDsV-yD1B6GPerYsUAg5tR/s1600/DFA_Binary_Divisible_by_3.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_NoBpicBbvKFbdzOjoWawCMs4HaiTkZsP59Hb2SVD2jk6h9aOFXSj6VkUZZfsCNo4Hu9U0U2Sx3mQChZan748YYWTkLbfdDuAK-WH2VPBFqI0T7aK6W8YZRDsV-yD1B6GPerYsUAg5tR/s400/DFA_Binary_Divisible_by_3.jpg" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Mod_0 is the final state.<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-47785383702598040152012-04-24T01:50:00.001+05:302012-05-05T20:49:50.086+05:30DFA(Deterministic Finite Automaton) of Binary Number Divisible By4<div dir="ltr" style="text-align: left;" trbidi="on">
Q: Draw a DFA of the strings over the set {0,1}, so that the strings are divisible by 4.<br />
<br />
Solution:<br />
A binary number is divisible by 4 if its last two digits are "0". As example : 100, 1000,10100, 11100,.....<br />
So the DFA of binary number divisible by 4 is as:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTe6l9aL3GeH4e_mB9zfsjx-MN1g5fEOsYeH6A4RG7oB7xLK5f6LRjDXn6aBwT7WCYzlxL8SwzkuRWtxZ_hbcYCNLgIGKDTbk_Ety2b9ii1Q4PYRy-4Vgx_MGxOkWwXsIAaEkoVJKSvrGJ/s1600/DFA_Binary_Divisible_by_4.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTe6l9aL3GeH4e_mB9zfsjx-MN1g5fEOsYeH6A4RG7oB7xLK5f6LRjDXn6aBwT7WCYzlxL8SwzkuRWtxZ_hbcYCNLgIGKDTbk_Ety2b9ii1Q4PYRy-4Vgx_MGxOkWwXsIAaEkoVJKSvrGJ/s400/DFA_Binary_Divisible_by_4.jpg" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Where Q0 starting state and Qf is final state.<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-52675722543998319442012-04-21T12:14:00.000+05:302012-05-01T16:45:07.875+05:30Parsing in Brief<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<div align="CENTER" style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>Part
I. Intoduction to Parsing</b></span></div>
<div align="CENTER" style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>A.
Introduction</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This is the
first of a series of articles on language translation. This is
commonly called “parsing”, and I will no doubt lapse from time to
time into this usage, but it is better to reserve the word for one
phase of translation.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The techniques I
will discuss are used in compilers and interpreters, of course, but
also in many more-common circumstances. For example, when you add a
formula to a speadsheet, the application must translate the formula
into a form it can use. Many database programs let you specify
formats for input fields -- these must translate your format, and
then use the result to translate the input. Consider the expression
search in MPW. I guarantee you there’s a translator operating
there. And, of course, my own program Idealiner uses a translator
when you specify topic numbers.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
All the code
examples in this series of articles will be MPW tools, to minimize
interface considerations. I doubt if you’ll see a single Macintosh
trap before the tenth article. I will focus instead on the internals
of language translation.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Language
translation can be divided into three stages: first, the LEXICAL
ANALYZER (also called the “scanner”) divides the input text into
individual symbols, pieces like identifiers, operators and constants;
then the PARSER interprets the sequence of symbols according to the
language’s grammar; and lastly the CODE GENERATOR responds in an
appropriate fashion to the statements the parser has processed. These
three phases operate simultaneously, the parser calling the lexical
analyzer for input, and then calling the code generator for output.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>A(1).
Parsing</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The first three
parts in the series will focus on parsing.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The first part
of the article (this very one) will introduce parsing and the
parser-generator YACC (Yet Another Compiler Compiler). YACC converts
a set of GRAMMAR RULES into C source for a parser that will accept
that grammar. You still have to write the lexical analyzer and the
code generator (although YACC provides a framework for code
generation) but YACC takes care of the most tedious part of the job.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The second part
will go beneath the surface and explore the inner workings of YACC.
This will be somewhat technical, and may seem unnecessary, but it
will provide an essential foundation for later topics. The article
will cover deriving parse tables from YACC output, parsing
expressions by hand (using the parse tables), and YACC’s debug
output.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The next article
will discuss ambiguities, association and error detection. An
understanding of the first two topics are essential to writing
correct and efficient grammars. The third covers detecting and
reporting errors by type and location.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>A(2).
Lexical Analysis</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
With the third
article, I will return to the first stage of language translation,
lexical analysis. The article will begin with a discussion of state
machines, then present a simple but effective table-driven analyzer.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The fourth
article will be an excursion into a seemingly unrelated field: hash
tables and binary trees. The idea is to develop some tools to
increase the power of the lexical analyzer in the following article.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The fifth
article will extend the analyzer by adding a symbol table. The
routines developed in the fifth article will give us a way to save
symbols; the example program will be an improved version of the MPW
Canon tool.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>A(3).
And a Useful Example</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Now, I’m
pretty sure of the preceding, because I’ve already written the
articles! What follows is a forecast of what I’ll do next.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The plan is to
build an MPW tool that will preprocess either Pascal or C source
files and convert inline assembly code into Pascal inline routines or
C direct functions, as appropriate. That is, you will be able to
write assembly language instructions, and the preprocessor will
convert your assembly into machine language. Your assembler routines
will be declared with high-level headers, a la Lightspeed C, and you
will be able to refer to routine arguments and local variables by
name, rather than indexing off the stack, a real convenience. I’m
going to write this tool because, damn it, I want to use it!</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This will be a
major project: I’ll need to parse Pascal and C well enough to find
routines, and I’ll need to parse assembler completely. I’ll then
need to write a more-or-less complete assembler. It could take six or
eight columns.</div>
<div align="CENTER" style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>B.
Grammar Descriptions</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Here’s a
reference for this topic: Compilers: Principles, Techniques and
Tools, by Aho, Sethi and Ullman (Addison-Wesley 1986). You may have
heard of some of these guys. I will refer to it as “ASU”.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
A computer
language is composed of a set of symbols (the “words” of the
language), and a set of grammar rules that determine how these words
are formed into statements (the “sentences” of a computer
language). As I said earlier, the lexical analyzer is in charge of
extracting the “words” from the input; it is the job of the
parser to make meaningful “sentences” from these “words”.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
A bit of
terminology: classes of symbols (such as “integer” or
“identifier”) are called TOKENS, and specific instances of tokens
(such as “252” or “sysbeep”) are called LEXEMES. The lexical
analyzer will typically determine both the type and value of a symbol
that it reads; the former is the token classification and the latter
is the lexical value. The parser cares about tokens; the code
generator cares about values.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
I guarantee that
I will use the word “token” to mean both token and lexeme. The
meaning should be clear from the context.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>B(1).
Grammar Rules</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
A grammar rule
is called a PRODUCTION. It is a substitution rule; the single symbol
of the left-hand side (often, but not by me, abbreviated LHS)
produces the expansion on the right-hand side (RHS). Here’s an
example:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">stmt
-> ID ‘=’ expr ‘;’</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
A ‘stmt’ can
be expanded to (that’s what the ‘->’ means) a series of
symbols consisting of an ‘ID’, an ‘=’ sign, and ‘expr’
and a semicolon. Symbols within quotation marks are explicit, and
must appear as written; other symbols are token classes.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Recursive
definition is permitted. Here’s an example:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr ‘+’ NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Applying this
rule to the first, we discover that:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">stmt
-> ID ‘=’ expr ‘+’ NUM ‘;’</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">stmt
-> ID ‘=’ expr ‘+’ NUM ‘+’ NUM ‘;’</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
And so on. It is
possible to determine a complete language such as Pascal or C with
relatively few such productions, even though there are
infinitely-many legal statements in the language.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Now, everyone
can make up his own conventions, of course, but I will distinguish
two kinds of non-explicit symbols by showing one in all-caps and one
in all-lower-case. All-caps symbols are defined by the lexical
analyzer, not by the parser. Thus, they will not appear on the
left-hand side of any production. These symbols are call TERMINALS,
because they terminate expansion. When you expand to a terminal, you
can expand no further. The lower-case symbols are, surprise!,
NON-TERMINALS. They are defined by the parser rather than the lexical
analyzer, appear somewhere as the left-hand side of one or more
productions, and do not terminate expansion. These distinctions are
important!</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
As the above
examples suggest, several productions can share the same left-hand
side:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr ‘+’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This pair of
productions expands to arbitrary sums. Just start with the first
production and substitute the first production into it to add another
term, or the second to terminate the expansion.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>B(2).
An Example Grammar</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This will be
fun. If you don’t want to mess with abstract symbols, just skip
this whole section; the result is all you need. My development of the
grammar won’t be very theoretical, though.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
A parser reads
the input symbols from left to right, until it has read the
right-hand side of a production. Then it REDUCES the input, running
the production backwards and replacing the right-hand side with the
left-hand side. This is the point at which code is generated, and
expressions evaluated: when a reduction occurs.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
So to see if a
grammar does what we want, we can start with a test statement that
should be accepted by the grammar, and see what happens when we play
parser.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The grammar we
are shooting for will accept simple algebraic expressions, involving
addition, subtraction, multiplication and division of numbers.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>B(2)(a).
First Try</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Earlier, we saw
productions that can expand to arbitrary sums:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr ‘+’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
We can add a few
more to get the other three usual operators:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
1 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(1)
expr -> expr ‘+’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(2)
expr -> expr ‘-’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(3)
expr -> expr ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(4)
expr -> expr ‘/’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(5)
expr -> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Let’s try a
simple test:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">NUM
‘+’ NUM ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr ‘+’ NUM ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
(rule 5;
remember that we read from the left)</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr ‘*’ NUM (rule 1)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr (rule 3)</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The addition was
the first thing to go; therefore, it was performed first. This is
contrary to our expectations, I hope (my past as a math teacher shows
itself!). The grammar won’t work. We need to make sure that
multiplication and division are performed before addition and
subtraction.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>B(2)(b).
Second Try</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
So let’s
introduce another non-terminal. We want to cluster products together,
to ensure that they are evaluated first, so let’s make them a
separate non-terminal:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
2 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(1)
expr -> expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(2)
expr -> expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(3)
expr -> term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(4)
term -> term ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(5)
term -> term ‘/’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(6)
term -> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Now try the test
string again:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">NUM
‘+’ NUM ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
term ‘+’ NUM ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(rule
6)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr ‘+’ NUM ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(rule
3)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr ‘+’ term ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(rule
6)</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Oops, it looks
like we have a choice here: rule 1 or rule 4. We really don’t,
though; reducing by rule 1 would leave us with “expr ‘*’ NUM”,
and we don’t have any rule with “expr ‘*’” in it.</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(rule
4)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">->
expr</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(rule
1)</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
So the
multiplication happened first, just like we wanted.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>B(2)(c).
Third Try</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Suppose,
however, that we wanted the addition to occur first. Then we need to
add some parentheses:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
3 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(1)
expr -> expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(2)
expr -> expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(3)
expr -> term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(4)
term -> term ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(5)
term -> term ‘/’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(6)
term -> ‘(‘ expr ‘)’</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">(7)
term -> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Now we treat an
addition or subtraction that occurs within parentheses as if the sum
or difference was a ‘term’ (rule 6). And that should do it.</div>
<div align="CENTER" style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>C.
YACC: Yet Another Compiler Compiler</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
YACC is a UNIX
tool that builds parsers from grammars. We can take the grammar just
developed, supplement it with a minimal bit of C code, and YACC will
write the complete parser for us. Or, if the parser is only a small
part of a big program, YACC will write that small part, and we can
then link it to the main program. In either case, YACC saves us from
the unbearable tedium of computing parse tables by hand.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
A YACC input
file is divided into three parts: the declaration part, the grammar
part, and the program part. (Remind you of anything? My past as a
COBOL programmer coming out!) The three sections are separated by
lines beginning:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">%%</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
YACC writes a C
source file as its output; it will also write a file of parser
information if you desire it. We’ll look at that next time.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>C(1).
The Declaration Section</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The declarations
include a set of C-style declarations that are used by YACC to build
the parser. For now, there are only two sorts of declarations that
concern us.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The first is the
“%token” declaration. YACC will automatically recognize
one-character tokens like ‘+’ and ‘-’. All other terminal
tokens must be declared with the %token statement, e.g.,</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">%token
NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Non-terminals do
not need to be declared; they are implicitly declared in the grammar
rules.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The second
declaration type lets us pass regular C declarations through YACC to
the C compiler. These look like this:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
4 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">%{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">#define
blip 12</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">%}</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Anything between
the %{ and the %} is passed through unchanged, and written by YACC to
the C source file.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
It is customary
to include a #define for YYSTYPE. What is YYSTYPE? It is the type of
the parser’s stack. For now, there’s no need to worry about it.
It is “int” by default, and int will work fine for what we’re
doing this month. Later, after I’ve discussed how the parser
operates, and we know what sort of things go on the stack, we’ll
come back to it.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>C(2).
The Grammar Section</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The grammar
section includes all the grammar productions, like those we discussed
earlier. They are written in a somewhat non-standard format (taking
ASU’s notation as the standard, which I think is reasonable). They
also provide a framework for code generation.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>C(2)(a).
Production Rule Format</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The arrow in
productions is replaced with a colon, and productions with the same
left-hand side are combined into one, with the right-hand sides
separated with vertical bars, |. The last right-hand side is
terminated with a semicolon. The usual practice is to format the
productions like this:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
5 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
: expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
: term ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
term ‘/’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
‘(‘ expr ‘)’</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
in place of:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> term ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> term ‘/’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> ‘(‘ expr ‘)’</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>C(2)(b).
Code Generation</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
You can follow
each right-hand side with some pseudo-C code that the parser will
then call when the production rule is executed (i.e., if you read
that stuff about reductions, when the input is reduced by that
production).</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Here’s an
example. Suppose you have the production rules:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
: expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The question is,
what is the value of the “expr”? In the first case, it’s the
value of the first token of the right-hand side plus the value of the
third; in the second, it’s the first minus the third; and in the
third, it’s just the value of the first token. So we write:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
6 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
: expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1 + $3;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1 - $3;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This isn’t
hard to figure out; $$ is the value of the left-hand side, $1 is the
value of the first token of the right-hand side, $3 the value of the
third token. Using those symbols, you just write straight C code. You
are not limited to a single line, and you can call routines that you
have written elsewhere. Don’t forget the braces or the semicolons.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>C(3).
The Program Section</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The program
section is made up of straight C code, and is copied unaltered into
the C source file. While YACC requires that you supply some routines
to it, you can put them in another file, and this section can be
completely empty. In simpler cases, however, the program section
allows you to write your entire program in the YACC source file.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Here’s what
YACC requires: a lexical analyzer, called yylex(), and an error
routine, yyerror(). Common sense requires a main() routine as well.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The prototype
for yylex() is:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
7 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">int
yylex();</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The parser
routine, called yyparse(), will call yylex() whenever it needs input.
yylex() reads the next token, sets the global variable “yylval”
to the value of the token (optional; this is the “$” value used
in the production code), and returns the token type. You might wonder
where it reads the token from, since it hasn’t any arguments. The
answer is, it uses global variables of some sort, such as a global
string or a global file reference, that is set up by the main()
routine.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The error
routine is:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
8 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">void
yyerror(char *message);</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The message is
generated by the parser when it detects an error; yyerror()’s job
is to notify the user that something has gone wrong. Of course, you
don’t have do live with YACC’s default error messages, which are
rather unilluminating; you can call yyerror() yourself. More on this
in a future article.</div>
<div align="CENTER" style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>D.
An MPW Hex Calculator</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Now for some
real code. Our example program is an MPW tool, a hex calculator. It
will evaluate expressions using +, -, * and /, and will also properly
evaluate expressions with parentheses in them. The name of the tool
is “Hex”; you can invoke it with an expression, e.g.:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Hex
‘2 - ( 3 - 4 )’</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
in which case it
will evaluate, print the result, and exit. Notice that in this case,
the expression must be in quotation marks, or MPW will treat each
token separately. Note also that the tokens must be separated by
spaces. This is to simplify the lexical analyzer; we will relax this
requirement in a future version.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The tool may
also be invoked without an expression to evaluate. It will then go
into a loop, reading in expressions and evaluating them, e.g.:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Hex</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">?
2 - ( 3 - 4 )</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">=
3</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">?
64 * 8</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">=
320</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">?</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The loop ends on
a blank line.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Here are the
input globals and the code for the main() routine:</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
9 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">char
*input;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">char
*token;</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">void
main(int argc, char *argv[])</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">char
thestring[256];</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">if
(argc < 1)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">printf(“\tImpossible
error!\n”);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">else
if (argc > 2)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">printf(“\tHey!
One at a time!\n”);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">else
if (argc == 2)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">input
= argv[1];</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">yyparse();</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">else</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">printf(“?
“);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">while
(strlen(gets(thestring)) > 2)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">input
= &thestring[2];</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">yyparse();</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">printf(“?
“);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
“input” is
the input buffer, and holds the expression to evaluate. “token”
is filled by yylex() with the current token. It’s useful for
debugging and error reporting. Finally, in the read loop, notice that
the gets() routine will read the “? ” prompt as well as the
expression, this being MPW, which is why “input” points to
thestring[2].</div>
<div align="CENTER" style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>D(1).
The Lexical Analyzer and Error Routines</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This is about as
simple as a lexical analyzer can be. The strtok() routine will return
the tokens in the input string, so long as they’re separated by
spaces, or newline at the end of input. Then if sscanf() can read a
hex number, that’s what the token must be; if it isn’t a number,
it must be an operator or a parenthesis, so return the first
character.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
This routine is
so simple it is vulnerable to pathological input -- please don’t
TRY to break it! Where’s the challenge? This is just a stopgap,
good enough to serve until we get a real lexical analyzer.</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
10 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">int
yylex()</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">if
(input == 0)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">token
= strtok(0, “ “);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">else</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">token
= strtok(input, “ “);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">input
= 0;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">if
(token == 0)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">return(‘\n’);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">else
if (sscanf(token, “%x”, &yylval) == 1)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">return(NUM);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">else</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">return(token[0]);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The error
routine is even simpler. It just prints out the parser’s default
error message, which is the blindingly helpful “syntax error”. We
do add the current token, which may be helpful.</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
11 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">#define
yyerror(x)</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">printf(“\t%s
[%s]\n”, x, token);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">return(0);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
(This is divided
into separate lines to fit in Mac Toot’s narrow columns; that’s
not the way we’d write it in C, of course!) Note the return
statement. yyerror is called from within the parser routine
yyparse(), so that’s what we’re returning from. The effect is to
abort the translation.</div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>D(2).
The Grammar</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The grammar we
will use is the same as that developed earlier. There’s one
additional production: we have to give YACC a START SYMBOL, which is
the left-hand side of the first production. In this case, “prob”
is short for “problem”.</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">prob
-> expr ‘\n’</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
The newline is a
single-character token returned by yylex() to signal the end of
input. So if the entire input string is an expression, we’ve got a
complete problem. Any other occurrence of a newline is an error.</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
12 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">prob
-> expr ‘\n’</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr + term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> expr - term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
-> term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> term * NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> term / NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> ( expr )</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
-> NUM</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>D(3).
The Value Calculation and Output</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
Here’s the
actual YACC input file, declaration and grammar sections. The
declaration section consists of a single %token declaration, making
NUM a terminal symbol. The grammar section includes all the
productions listed above, each with some associated code.</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">/*
13 */</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">%token
NUM</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">%%</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">prob
: expr</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">printf(“\t=
%X\n”, $1);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">return(0);</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">expr
: expr ‘+’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1 + $3;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
expr ‘-’ term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1 - $3;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
term</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">term
: term ‘*’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1 * $3;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
term ‘/’ NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1 / $3;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
‘(‘ expr ‘)’</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $2;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">|
NUM</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$$
= $1;</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">}</span></span></div>
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">;</span></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: large;"><b>D(4).
The Make File</b></span></div>
<div style="margin-bottom: 0.19in; margin-top: 0.19in;">
YACC goes right
into your make file, just like any other MPW tool. Hmm. I thought I
said that YACC was a UNIX tool... The truth is that there is an MPW
version of YACC available, called MACYACC (I have renamed the tool on
my system to make typing easier).</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">#14</span></span></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Hex.c
ƒ Hex.make Hex.y</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Yacc
-VHex.out Hex.y</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Hex.c.o
ƒ Hex.make Hex.c</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">C
-r Hex.c</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Hex
ƒƒ Hex.make Hex.c.o</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Link
-w -t MPST -c ‘MPS ‘ �</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">Hex.c.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{Libraries}”Interface.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{CLibraries}”CRuntime.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{CLibraries}”StdCLib.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{CLibraries}”CSANELib.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{CLibraries}”Math.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{CLibraries}”CInterface.o
�</span></span></div>
<div style="margin-bottom: 0in;">
“<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{Libraries}”ToolLibs.o
�</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">-o
Hex</span></span></div>
<br /></div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-32050251175668978652012-04-21T01:52:00.000+05:302012-05-01T16:45:45.401+05:30Operating System Question and Answer<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
p { margin-bottom: 0.08in; }
</style>
<br />
<ol>
<li><div style="margin-bottom: 0in;">
<span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Explain
the concept of Reentrancy.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">It
is a useful, memory-saving technique for multiprogrammed timesharing
systems. A Reentrant</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Procedure</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">is
one in which</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">multiple
users</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">can
share a single copy of a</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">program</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">during
the same period. Reentrancy has 2 key aspects: The</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">program</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">code
cannot modify itself, and the local data for each user</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">must
be stored separately. Thus, the permanent part is the code, and the
temporary part is the pointer back to the calling</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">programand
local variables used by that</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">program.
Each execution instance is called activation. It executes the code
in the permanent part, but has its own copy of local
variables/parameters. The temporary part associated with each
activation is the activation record. Generally, the activation
record is kept on the stack.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Note:
A reentrant</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">procedure</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">can
be interrupted and called by an interrupting</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">program,
and still execute correctly on returning to the</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">procedure.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">2.
Explain Belady's Anomaly.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Also
called FIFO anomaly. Usually, on increasing the number of frames
allocated to a process'</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">virtual
memory</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">,
the</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">execution
is faster, because fewer page faults occur. Sometimes, the reverse
happens, i.e., the execution time increases even when more frames
are allocated to the</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process.
This is Belady's Anomaly. This is true for certain page reference
patterns.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">3.
What is a binary semaphore? What is its use?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">A
binary semaphore is one, which takes only 0 and 1 as values. They
are used to implement mutual exclusion and synchronize concurrent
processes.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">4.
What is thrashing?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">It
is a phenomenon in</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">virtual
memory</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">schemes
when the processor spends most of its time swapping pages, rather
than executing instructions. This is due to an inordinate number of
page faults.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">5.
List the Coffman's conditions that lead to a deadlock.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Mutual Exclusion: Only one</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">may
use a critical resource at a time.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Hold</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
& Wait: A</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">may
be allocated some resources while waiting for others.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
No Pre-emption: No resource can be forcible removed from
a</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">holding
it.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Circular Wait: A closed chain of processes exist such that
each</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">holds
at least one resource needed by another</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">in
the chain.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">6.
What are short-, long- and medium-term scheduling?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Long
term scheduler determines which programs are admitted to the system
for processing. It controls the degree of multiprogramming. Once
admitted, a job becomes a</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Medium
term scheduling is part of the swapping function. This relates to
processes that are in a blocked or suspended state. They are swapped
out of real-memory until they are ready to execute. The swapping-in
decision is based on memory-management criteria.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Short
term scheduler, also know as a dispatcher executes most frequently,
and makes the finest-grained decision of which</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">should
execute next. This scheduler is invoked whenever an event occurs. It
may lead to interruption of one</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">by
preemption.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">7.
What are turnaround time and response time?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Turnaround
time is the interval between the submission of a job and its
completion. Response time is the interval between submission of a
request, and the first response to that request.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">8.
What are the typical elements of a</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">image?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
User data: Modifiable part of user space. May include</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">program</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">data,
user stack area, and programs that may be modified.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
User</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">program:
The instructions to be executed.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
System Stack: Each</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">has
one or more LIFO stacks associated with it. Used to store parameters
and calling addresses for</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">procedure</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">and
system calls.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">control
Block (PCB): Info needed by the OS to control processes.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">9.
What is the Translation Look aside Buffer (TLB)?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">In
a cached system, the base addresses of the last few referenced pages
is maintained in registers called the TLB that aids in faster
lookup. TLB contains those page-table entries that have been most
recently used. Normally, each</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">virtual
memory</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">reference
causes 2 physical memory accesses-- one to fetch appropriate
page-table entry, and one to fetch the desired data. Using TLB
in-between, this is reduced to just one physical memory access in
cases of TLB-hit.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">10.
What is the resident set and working set of a</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Resident
set is that portion of the</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">process</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">image
that is actually in real-memory at a particular instant. Working set
is that subset of resident set that is actually needed for
execution. (Relate this to the variable-window size method for
swapping techniques.)</span></span></span></div>
</li>
</ol>
<div style="line-height: 0.18in; margin-bottom: 0in;">
<span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">11.
When is a system in safe state?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">The
set of dispatchable</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">processes</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">is
in a safe state if there exists at least one temporal order in which
all</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">processes</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">can
be run to completion without resulting in a deadlock.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">12.
What is</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">cycle</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">stealing?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">We
encounter</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">cycle</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">stealing
in the context of Direct Memory</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Access</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">(DMA).
Either the DMA controller can use the data bus when the CPU does not
need it, or it may force the CPU to temporarily suspend operation.
The latter technique is called</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">cycle</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">stealing.
Note that</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">cycle
stealing can be done only at specific break points in an
instruction</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">cycle.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">13.
What is meant by arm-stickiness?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">If
one or a few</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">processes</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">have
a high</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">access</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">rate
to data on one track of a storage disk, then they may monopolize the
device by repeated requests to that track. This generally happens
with most common device</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">scheduling</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">algorithms
(LIFO, SSTF, C-SCAN, etc). High-density multisurface disks are more
likely to be affected by this than low density ones.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">14.
What are the stipulations of C2 level</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">security</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">C2
level</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">security</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">provides
for:</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Discretionary</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Access</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Control</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Identification and Authentication</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Auditing</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Resource reuse</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">15.
What is busy waiting?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">The
repeated execution of a loop of code while waiting for an event to
occur is called busy-waiting. The CPU is not engaged in any real
productive activity during this period, and the process does not
progress toward completion.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">16.
Explain the popular multiprocessor thread-scheduling</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">strategies.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Load Sharing:</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Processes</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">are
not assigned to a particular processor. A global queue of threads is
maintained. Each processor, when idle, selects a thread from this
queue. Note that load balancing refers to a scheme where work is
allocated to processors on a more permanent basis.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Gang</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Scheduling:
A set of related threads is scheduled to run on a set of processors
at the same time, on a 1-to-1 basis. Closely related threads
/</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">processes</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">may
be scheduled this way to reduce synchronization blocking, and
minimize process switching. Group</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">schedulingpredated
this strategy.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Dedicated processor assignment: Provides implicit</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">scheduling</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">defined
by assignment of threads to processors. For the duration of program
execution, each program is allocated a set of processors equal in
number to the number of threads in the program. Processors are chosen
from the available pool.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Dynamic</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">scheduling:
The number of thread in a program can be altered during the course of
execution.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">17.
When does the condition 'rendezvous' arise?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">In
message passing, it is the condition in which, both, the sender and
receiver are blocked until the message is delivered.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">18.
What is a trap and trapdoor?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Trapdoor
is a secret undocumented entry point into a program used to
grant</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">access</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">without
normal methods of</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">access</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">authentication.
A trap is a software interrupt, usually the result of an error
condition.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">19.
What are local and global page replacements?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Local
replacement means that an incoming page is brought in only to the
relevant process' address space. Global replacement policy allows any
page frame from any process to be replaced. The latter is applicable
to variable partitions model only.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">20.
Define latency, transfer and seek time with respect to disk I/O.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Seek
time is the time required to move the disk arm to the required track.
Rotational delay or latency is the time it takes for the beginning of
the required sector to reach the head. Sum of seek time (if any) and
latency is the</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">access</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">time.
Time taken to actually transfer a span of data is transfer time.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">22.
What is time-stamping?</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">It
is a technique proposed by Lamport, used to order events in
a</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">distributed
system</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">without
the use of clocks. This scheme is intended to order events consisting
of the transmission of messages. Each system 'i' in the network
maintains a counter Ci. Every time a system transmits a message, it
increments its counter by 1 and attaches the time-stamp Ti to the
message. When a message is received, the</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">receiving
system</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">'j'
sets its counter Cj to 1 more than the maximum of its current value
and the incoming time-stamp Ti. At each site, the ordering of
messages is determined by the following rules: For messages x from
site i and y from site j, x precedes y if one of the following
conditions holds....(a) if Ti<Tj or (b) if Ti=Tj and
i<j.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">23.
How are the wait/signal operations for monitor different from those
for semaphores?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">If
a process in a monitor signal and no task is waiting on the condition
variable, the signal is lost. So this allows easier program design.
Whereas in semaphores, every operation affects the value of the
semaphore, so the wait and signal operations should be perfectly
balanced in the program.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">24.
In the context of</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">memory
management</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">,
what are placement and replacement algorithms?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Placement
algorithms determine where in available real-memory to load a
program. Common methods are first-fit, next-fit, best-fit.
Replacement algorithms are used when memory is full, and one process
(or part of a process) needs to be swapped out to accommodate a new
program. The replacement algorithm determines which are the
partitions to be swapped out.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">25.
In loading programs into memory, what is the difference between
load-time dynamic linking and run-time dynamic linking?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">For
load-time dynamic linking: Load module to be loaded is read into
memory. Any reference to a target external module causes that module
to be loaded and the references are updated to a relative address
from the start base address of the application module.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">With
run-time dynamic loading: Some of the linking is postponed until
actual reference during execution. Then the correct module is loaded
and linked.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">26.
What are demand- and pre-paging?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">With
demand paging, a page is brought into memory only when a location on
that page is actually referenced during execution. With pre-paging,
pages other than the one demanded by a page fault are brought in. The
selection of such pages is done based on common access patterns,
especially for secondary memory devices.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">27.
Paging a</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">memory
management</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">function,
while multiprogramming a processor management function, are the two
interdependent?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Yes.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">28.
What is page cannibalizing?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Page
swapping or page replacements are called page cannibalizing.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">29.
What has triggered the need for multitasking in PCs?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Increased
speed and memory capacity of microprocessors together with the
support fir virtual memory and</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Growth
of client server computing</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">30.
What are the four layers that Windows NT have in order to achieve
independence?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Hardware</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">abstraction
layer</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Kernel</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Subsystems</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> System
Services.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">31.
What is SMP?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">To
achieve maximum efficiency and reliability a mode of operation known
as symmetric multiprocessing is used. In essence, with SMP any
process or threads can be assigned to any processor.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">32.
What are the key object oriented concepts used by Windows
NT?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Encapsulation</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Object
class and instance</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">33.
Is Windows NT a full blown</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">object
oriented operating system</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">?
Give reasons.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">No
Windows NT is not so, because its not implemented in object oriented
language and the data structures reside within one executive
component and are not represented as objects and it does not support
object oriented capabilities .</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">34.
What is a drawback of MVT?</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">It
does not have the features like</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> ability
to support multiple processors</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> virtual
storage</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> source
level debugging</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">35.
What is process spawning?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">When
the OS at the explicit request of another process creates a process,
this action is called process spawning.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">36.
How many jobs can be run concurrently on MVT?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">15
jobs</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">37.
List out some reasons for process termination.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Normal
completion</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Time
limit exceeded</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Memory
unavailable</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Bounds
violation</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Protection
error</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Arithmetic
error</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Time
overrun</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> I/O
failure</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Invalid
instruction</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Privileged
instruction</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Data
misuse</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Operator
or OS intervention</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> Parent
termination.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">38.
What are the reasons for process suspension?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span></div>
<ol>
<li><div style="line-height: 0.14in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">swapping</span></span></span></div>
</li>
<li><div style="line-height: 0.14in; margin-bottom: 0in;">
<span style="color: black;"> <span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">interactive
user request</span></span></span></div>
</li>
<li><div style="line-height: 0.14in; margin-bottom: 0in;">
<span style="color: black;"> <span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">timing</span></span></span></div>
</li>
<li><div style="line-height: 0.14in; margin-bottom: 0in;">
<span style="color: black;"> <span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">parent
process request</span></span></span></div>
</li>
</ol>
<div style="margin-bottom: 0in; margin-left: 0.25in;">
<span style="color: black;"><span style="font-family: Verdana,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">39.
What is process migration?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">It
is</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">the
transfer</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">of
sufficient amount of the state of process from one machine to the
target machine</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">40.
What is mutant?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">In</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">a
mutant provides kernel mode or user mode mutual exclusion with the
notion of ownership.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">41.
What is an idle thread?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">The
special thread a dispatcher will execute when no ready thread is
found.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">42.
What is FtDisk?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">It
is a fault tolerance disk driver for</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">43.
What are the possible threads a thread can have?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Ready</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Standby</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Running</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Waiting</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Transition</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Terminated.</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">44.
What are rings in</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">uses
protection mechanism called rings provides by the process to
implement separation between the user mode and kernel mode.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">45.
What is Executive in</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">In</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT, executive refers to the operating system code that runs in kernel
mode.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">46.
What are the sub-components of I/O manager in</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Network redirector/ Server</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Cache manager.</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
File systems</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Network driver</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
Device driver</span></span></span><span style="color: black;"><span style="font-family: Symbol,serif;"><span style="font-size: medium;"></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">47.
What are DDks? Name</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">an
operating system</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">that
includes this feature.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
DDks are device driver kits, which are equivalent to SDKs for writing
device drivers.Windows NT</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">includes
DDks.</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">48.
What level of</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">security</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">does</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">Windows
NT</span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: #990000;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">meets?</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"><br /></span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">
C2 level</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">security</span></span></span><span style="color: black;"><span style="font-family: Arial,sans-serif;"><span style="font-size: medium;">. </span></span></span></div>
<div style="margin-bottom: 0in; margin-left: 0.25in;">
<br /></div>
<div style="margin-bottom: 0in; margin-left: 0.25in;">
<br /></div>
<ol>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
are the basic functions of an operating system?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Operating system controls and coordinates the use of the hardware
among the various applications programs for various uses. Operating
system acts as resource allocator and manager. Since there are many
possibly conflicting requests for resources the operating system
must decide which requests are allocated resources to operating the
computer system efficiently and fairly. Also operating system is
control program which controls the user programs to prevent errors
and improper use of the computer. It is especially concerned with
the operation and control of I/O devices.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Why
paging is used?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Paging is solution to external fragmentation problem which is to
permit the logical address space of a process to be noncontiguous,
thus allowing a process to be allocating physical memory wherever
the latter is available.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>While
running DOS on a PC, which command would be used to duplicate the
entire diskette?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">diskcopy</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
resources are used when a thread created? How do they differ from
those when a process is created?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
When a thread is created the threads does not require any new
resources to execute the thread shares the resources like memory of
the process to which they belong to. The benefit of code sharing is
that it allows an application to have several different threads of
activity all within the same address space. Whereas if a new process
creation is very heavyweight because it always requires new address
space to be created and even if they share the memory then the inter
process communication is expensive when compared to the
communication between the threads.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is virtual memory?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Virtual memory is hardware technique where the system appears to
have more memory that it actually does. This is done by
time-sharing, the physical memory and storage parts of the memory
one disk when they are not actively being used.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is Throughput, Turnaround time, waiting time and Response time?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Throughput – number of processes that complete
their execution per time unit. Turnaround time –
amount of time to execute a particular process. Waiting time
– amount of time a process has been waiting in the
ready queue. Response time – amount of time it
takes from when a request was submitted until the first response is
produced, not output (for time-sharing environment).</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is the state of the processor, when a process is waiting for some
event to occur?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Waiting state</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is the important aspect of a real-time system or Mission Critical
Systems?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
A real time operating system has well defined fixed time
constraints. Process must be done within the defined constraints or
the system will fail. An example is the operating system for a
flight control computer or an advanced jet airplane. Often used as a
control device in a dedicated application such as controlling
scientific experiments, medical imaging systems, industrial control
systems, and some display systems. Real-Time systems may be either
hard or soft real-time.</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Hard
real-time</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
Secondary storage limited or absent, data stored in short term
memory, or read-only memory (ROM), Conflicts with time-sharing
systems, not supported by general-purpose operating systems.</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Soft
real-time</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
Limited utility in industrial control of robotics, Useful in
applications (multimedia, virtual reality) requiring advanced
operating-system features.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is the difference between Hard and Soft real-time systems?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
A hard real-time system guarantees that critical tasks complete on
time. This goal requires that all delays in the system be bounded
from the retrieval of the stored data to the time that it takes the
operating system to finish any request made of it. A soft real time
system where a critical real-time task gets priority over other
tasks and retains that priority until it completes. As in hard real
time systems kernel delays need to be bounded</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is the cause of thrashing? How does the system detect thrashing?
Once it detects thrashing, what can the system do to eliminate this
problem?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Thrashing is caused by under allocation of the minimum number of
pages required by a process, forcing it to continuously page fault.
The system can detect thrashing by evaluating the level of CPU
utilization as compared to the level of multiprogramming. It can be
eliminated by reducing the level of multiprogramming.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is multi tasking, multi programming, multi threading?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Multi
programming</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
Multiprogramming is the technique of running several programs at a
time using timesharing. It allows a computer to do several things at
the same time. Multiprogramming creates logical parallelism. The
concept of multiprogramming is that the operating system keeps
several jobs in memory simultaneously. The operating system selects
a job from the job pool and starts executing a job, when that job
needs to wait for any i/o operations the CPU is switched to another
job. So the main idea here is that the CPU is never idle.</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Multi
tasking</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
Multitasking is the logical extension of multiprogramming .The
concept of multitasking is quite similar to multiprogramming but
difference is that the switching between jobs occurs so frequently
that the users can interact with each program while it is running.
This concept is also known as time-sharing systems. A time-shared
operating system uses CPU scheduling and multiprogramming to provide
each user with a small portion of time-shared system.</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Multi
threading</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
An application typically is implemented as a separate process with
several threads of control. In some situations a single application
may be required to perform several similar tasks for example a web
server accepts client requests for web pages, images, sound, and so
forth. A busy web server may have several of clients concurrently
accessing it. If the web server ran as a traditional single-threaded
process, it would be able to service only one client at a time. The
amount of time that a client might have to wait for its request to
be serviced could be enormous. So it is efficient to have one
process that contains multiple threads to serve the same purpose.
This approach would multithread the web-server process, the server
would create a separate thread that would listen for client requests
when a request was made rather than creating another process it
would create another thread to service the request. To get the
advantages like responsiveness, Resource sharing economy and
utilization of multiprocessor architectures multithreading concept
can be used.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is hard disk and what is its purpose?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Hard disk is the secondary storage device, which holds the data in
bulk, and it holds the data on the magnetic medium of the disk.Hard
disks have a hard platter that holds the magnetic medium, the
magnetic medium can be easily erased and rewritten, and a typical
desktop machine will have a hard disk with a capacity of between 10
and 40 gigabytes. Data is stored onto the disk in the form of files.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is fragmentation? Different types of fragmentation?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Fragmentation occurs in a dynamic memory allocation system when many
of the free blocks are too small to satisfy any request.</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>External
Fragmentation</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
External Fragmentation happens when a dynamic memory allocation
algorithm allocates some memory and a small piece is left over that
cannot be effectively used. If too much external fragmentation
occurs, the amount of usable memory is drastically reduced. Total
memory space exists to satisfy a request, but it is not
contiguous.</span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>Internal
Fragmentation</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">:
Internal fragmentation is the space wasted inside of allocated
memory blocks because of restriction on the allowed sizes of
allocated blocks. Allocated memory may be slightly larger than
requested memory; this size difference is memory internal to a
partition, but not being used</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is DRAM? In which form does it store data?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
DRAM is not the best, but it’s cheap, does the job, and is
available almost everywhere you look. DRAM data resides in a cell
made of a capacitor and a transistor. The capacitor tends to lose
data unless it’s recharged every couple of milliseconds, and this
recharging tends to slow down the performance of DRAM compared to
speedier RAM types.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is Dispatcher?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Dispatcher module gives control of the CPU to the process selected
by the short-term scheduler; this involves: Switching context,
Switching to user mode, Jumping to the proper location in the user
program to restart that program, dispatch latency –
time it takes for the dispatcher to stop one process and start
another running.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is CPU Scheduler?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Selects from among the processes in memory that are ready to
execute, and allocates the CPU to one of them. CPU scheduling
decisions may take place when a process: 1.Switches from running to
waiting state. 2.Switches from running to ready state. 3.Switches
from waiting to ready. 4.Terminates. Scheduling under 1 and 4 is
non-preemptive. All other scheduling is preemptive.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is Context Switch?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Switching the CPU to another process requires saving the state of
the old process and loading the saved state for the new process.
This task is known as a context switch. Context-switch time is pure
overhead, because the system does no useful work while switching.
Its speed varies from machine to machine, depending on the memory
speed, the number of registers which must be copied, the existed of
special instructions(such as a single instruction to load or store
all registers).</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is cache memory?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
Cache memory is random access memory (RAM) that a computer
microprocessor can access more quickly than it can access regular
RAM. As the microprocessor processes data, it looks first in the
cache memory and if it finds the data there (from a previous reading
of data), it does not have to do the more time-consuming reading of
data from larger memory.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is a Safe State and what is its use in deadlock avoidance?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
When a process requests an available resource, system must decide if
immediate allocation leaves the system in a safe state. System is in
safe state if there exists a safe sequence of all processes.
Deadlock Avoidance: ensure that a system will never enter an unsafe
state.</span></span></span></div>
</li>
<li><div style="line-height: 0.19in; margin-bottom: 0in;">
<span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"><b>What
is a Real-Time System?</b></span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;"> </span></span></span><span style="color: black;"><span style="font-family: Georgia,serif;"><span style="font-size: medium;">-
A real time process is a process that must respond to the events
within a certain time period. A real time operating system is an
operating system that can run real time processes successfully</span></span></span></div>
</li>
</ol>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-40982327036266988612012-04-20T19:27:00.001+05:302012-05-01T16:45:45.413+05:30Networking Question Answer<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
p { margin-bottom: 0in; text-align: justify; }p.western { font-size: 14pt; }p.cjk { font-size: 14pt; }p.ctl { font-size: 10pt; }
</style>
<br />
<div align="LEFT" style="font-weight: normal; margin-left: -0.06in; margin-right: -0.5in; text-indent: 0.06in;">
<span style="color: red;"><span style="font-family: Verdana,sans-serif;"><span style="font-size: large;">Networking
concepts</span></span></span></div>
<div align="LEFT" style="font-weight: normal; margin-left: -0.06in; margin-right: -0.5in; text-indent: 0.06in;">
<br />
</div>
<ol>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are the two types of transmission technology available?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> (i)
Broadcast and (ii) point-to-point</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="2">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is subnet?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> A
generic term for section of a large networks usually separated by a
bridge or router. </span>
</div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="3">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>Difference
between the communication and transmission.</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Transmission
is a physical movement of information and concern issues like bit
polarity, synchronisation, clock etc.</span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Communication
means the meaning full exchange of information between two
communication media.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="4">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are the possible ways of data exchange?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> (i)
Simplex (ii) Half-duplex (iii) Full-duplex.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="5">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is SAP?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Series
of interface points that allow other computers to communicate with
the other layers of network protocol stack.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="6">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
do you meant by "triple X" in Networks?</i> </span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">The
function of PAD (Packet Assembler Disassembler) is described in a
document known as X.3. The standard protocol has been defined between
the terminal and the PAD, called X.28; another standard protocol
exists between hte PAD and the network, called X.29. Together, these
three recommendations are often called "triple X"</span></span></div>
<div align="JUSTIFY" class="western" style="margin-left: 0.5in;">
<br />
</div>
<ol start="7">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is frame relay, in which layer it comes?</i> </span>
</div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Frame relay is a packet switching technology. It will
operate in the data link layer.</span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> </span></div>
<ol start="8">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is terminal emulation, in which layer it comes?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Telnet
is also called as terminal emulation. It belongs to application
layer.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="9">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Beaconing?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> The
process that allows a network to self-repair networks problems. The
stations on the network notify the other stations on the ring when
they are not receiving the transmissions. Beaconing is used in Token
ring and FDDI networks.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="10">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is redirector?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Redirector
is software that intercepts file or prints I/O requests and
translates them into network requests. This comes under presentation
layer.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="11">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is NETBIOS and NETBEUI?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> NETBIOS
is a programming interface that allows I/O requests to be sent to and
received from a remote computer and it hides the networking hardware
from applications.</span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> NETBEUI
is NetBIOS extended user interface. A transport protocol designed by
microsoft and IBM for the use on small subnets.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="12">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is RAID?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> A
method for providing fault tolerance by using multiple hard disk
drives.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="13">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is passive topology?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> When
the computers on the network simply listen and receive the signal,
they are referred to as passive because they don’t amplify the
signal in any way. Example for passive topology - linear bus.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="14">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Brouter?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Hybrid
devices that combine the features of both bridges and routers.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="15">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is cladding?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> A
layer of a glass surrounding the center fiber of glass inside a
fiber-optic cable.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="16">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is point-to-point protocol</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> A
communications protocol used to connect computers to remote
networking services including Internet service providers.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="17">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>How
Gateway is different from Routers?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> A
gateway operates at the upper levels of the OSI model and translates
information between two completely different network architectures or
data formats</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="18">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is attenuation?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> The
degeneration of a signal over distance on a network cable is called
attenuation.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="19">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is MAC address?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> The
address for a device as it is identified at the Media Access Control
(MAC) layer in the network architecture. MAC address is usually
stored in ROM on the network adapter card and is unique.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="20">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>Difference
between bit rate and baud rate.</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Bit rate is the
number of bits transmitted during one second whereas baud rate refers
to the number of signal units per second that are required to
represent those bits.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>baud
rate = bit rate / N </i></span>
</div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">where
N is no-of-bits represented by each signal shift.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="21">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Bandwidth?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> Every line has an
upper limit and a lower limit on the frequency of signals it can
carry. This limited range is called the bandwidth.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="22">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are the types of Transmission media?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Signals
are usually transmitted over some transmission media that are broadly
classified in to two categories.</span></div>
<ol>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>Guided Media:</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 1in;">
<span style="font-size: small;">These
are those that provide a conduit from one device to another that
include twisted-pair, coaxial cable and fiber-optic cable. A signal
traveling along any of these media is directed and is contained by
the physical limits of the medium. Twisted-pair and coaxial cable use
metallic that accept and transport signals in the form of electrical
current. Optical fiber is a glass or plastic cable that accepts and
transports signals in the form of light.</span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>b)
Unguided Media:</i> </span>
</div>
<div align="JUSTIFY" class="western" style="text-indent: 1in;">
<span style="font-size: small;">This
is the wireless media that transport electromagnetic waves without
using a physical conductor. Signals are broadcast either through air.
This is done through radio communication, satellite communication and
cellular telephony.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="23">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Project 802?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It
is a project started by IEEE to set standards to enable
intercommunication between equipment from a variety of manufacturers.
It is a way for specifying functions of the physical layer, the data
link layer and to some extent the network layer to allow for
interconnectivity of major LAN</span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;">protocols.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It
consists of the following:</span></div>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;">802.1 is an
internetworking standard for compatibility of different LANs and
MANs across protocols.</span></div>
</li>
</ul>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;">802.2 Logical link
control (LLC) is the upper sublayer of the data link layer which is
non-architecture-specific, that is remains the same for all
IEEE-defined LANs. </span>
</div>
</li>
</ul>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;">Media access
control (MAC) is the lower sublayer of the data link layer that
contains some distinct modules each carrying proprietary information
specific to the LAN product being used. The modules are Ethernet LAN
(802.3), Token ring LAN (802.4), Token bus LAN (802.5).</span></div>
</li>
</ul>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;">802.6 is
distributed queue dual bus (DQDB) designed to be used in MANs.</span></div>
</li>
</ul>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="24">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Protocol Data Unit?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">The
data unit in the LLC level is called the protocol data unit (PDU).
The PDU contains of four fields a destination service access point
(DSAP), a source service access point (SSAP), a control field and an
information field. DSAP, SSAP are addresses used by the LLC to
identify the protocol stacks on the receiving and sending machines
that are generating and using the data. The control field specifies
whether the PDU frame is a information frame (I - frame) or a
supervisory frame (S - frame) or a unnumbered frame (U - frame).</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="25">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are the different type of networking / internetworking devices?</i> </span>
</div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Repeater:</i></span></div>
<div align="JUSTIFY" class="western" style="text-indent: 1in;">
<span style="font-size: small;">Also
called a regenerator, it is an electronic device that operates only
at physical layer. It receives the signal in the network before it
becomes weak, regenerates the original bit pattern and puts the
refreshed copy back in to the link.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Bridges:
</i></span>
</div>
<div align="JUSTIFY" class="western" style="text-indent: 1in;">
<span style="font-size: small;">These
operate both in the physical and data link layers of LANs of same
type. They divide a larger network in to smaller segments. They
contain logic that allow them to keep the traffic for each segment
separate and thus are repeaters that relay a frame only the side of
the segment containing the intended recipent and control congestion.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Routers:</i></span></div>
<div align="JUSTIFY" class="western" style="text-indent: 1in;">
<span style="font-size: small;">They
relay packets among multiple interconnected networks (i.e. LANs of
different type). They operate in the physical, data link and network
layers. They contain software that enable them to determine which of
the several possible paths is the best for a particular transmission.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Gateways:</i></span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.75in;">
<span style="font-size: small;">They
relay packets among networks that have different protocols (e.g.
between a LAN and a WAN). They accept a packet formatted for one
protocol and convert it to a packet formatted for another protocol
before forwarding it. They operate in all seven layers of the OSI
model.</span></div>
<div align="JUSTIFY" class="western">
</div>
<ol start="26">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is ICMP?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">ICMP
is Internet Control Message Protocol, a network layer protocol of the
TCP/IP suite used by hosts and gateways to send notification of
datagram problems back to the sender. It uses the echo test / reply
to test whether a destination is reachable and responding. It also
handles both control and error messages.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="27">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are the data units at different layers of the TCP / IP protocol
suite?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">The
data unit created at the application layer is called a message, at
the transport layer the data unit created is called either a segment
or an user datagram, at the network layer the data unit created is
called the datagram, at the data link layer the datagram is
encapsulated in to a frame and finally transmitted as signals along
the transmission media.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="28">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is difference between ARP and RARP?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">The
address resolution protocol (ARP) is used to associate the 32 bit IP
address with the 48 bit physical address, used by a host or a router
to find the physical address of another host on its network by
sending a ARP query packet that includes the IP address of the
receiver.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">The
reverse address resolution protocol (RARP) allows a host to discover
its Internet address when it knows only its physical address.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="29">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is the minimum and maximum length of the header in the TCP segment
and IP datagram?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> The header
should have a minimum length of 20 bytes and can have a maximum
length of 60 bytes. </span>
</div>
<div align="JUSTIFY" class="western">
</div>
<ol start="30">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is the range of addresses in the classes of internet addresses?</i> </span>
</div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Class
A 0.0.0.0 - 127.255.255.255</span></div>
<div align="JUSTIFY" class="western" style="margin-left: 0.5in;">
<span style="font-size: small;">Class
B 128.0.0.0 - 191.255.255.255</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Class
C 192.0.0.0 - 223.255.255.255</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Class
D 224.0.0.0 - 239.255.255.255</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Class
E 240.0.0.0 - 247.255.255.255 </span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="31">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is the difference between TFTP and FTP application layer protocols?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> The Trivial File
Transfer Protocol (TFTP) allows a local host to obtain files from a
remote host but does not provide reliability or security. It uses the
fundamental packet delivery services offered by UDP.</span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;">The File
Transfer Protocol (FTP) is the standard mechanism provided by TCP /
IP for copying a file from one host to another. It uses the services
offer by TCP and so is reliable and secure. It establishes two
connections (virtual circuits) between the hosts, one for data
transfer and another for control information.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="32">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are major types of networks and explain?</i></span></div>
</li>
</ol>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;">Server-based
network</span></div>
</li>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;">Peer-to-peer
network</span></div>
</li>
</ul>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Peer-to-peer network, computers can act as both servers
sharing resources and as clients using the resources.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Server-based networks provide centralized control of
network resources and rely on server computers to provide security
and network administration</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="33">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
are the important topologies for networks?</i></span></div>
</li>
</ol>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>BUS
topology:</i></span></div>
</li>
</ul>
<div align="JUSTIFY" class="western" style="text-indent: 1in;">
<span style="font-size: small;">In this each computer is directly connected to primary
network cable in a single line.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Advantages:</i></span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;">
Inexpensive, easy to install, simple to understand, easy to extend.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>STAR
topology:</i></span></div>
</li>
</ul>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> In this all computers are connected using a central
hub.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Advantages:</i></span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"> Can be inexpensive, easy to install and
reconfigure and easy to trouble shoot physical problems.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ul>
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>RING
topology:</i></span></div>
</li>
</ul>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> In this all computers are connected in loop.</span></div>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;"><i>Advantages:</i></span></div>
<div align="JUSTIFY" class="western">
<span style="font-size: small;"> All computers have equal access to network media,
installation can be simple, and signal does not degrade as much as in
other topologies because each computer regenerates it.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="34">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is mesh network?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">A network in which there are multiple network links
between computers to provide multiple paths for data to travel.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="35">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is difference between baseband and broadband transmission?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">In a baseband transmission, the entire bandwidth of the
cable is consumed by a single signal. In broadband transmission,
signals are sent on multiple frequencies, allowing multiple signals
to be sent simultaneously.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="36">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>Explain
5-4-3 rule?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">In a Ethernet network, between any two points on the
network ,there can be no more than five network segments or four
repeaters, and of those five segments only three of segments can be
populated.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="37">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
MAU?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">In token Ring , hub is called Multistation Access
Unit(MAU).</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="38">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is the difference between routable and non- routable protocols?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">Routable protocols can work with a router and can be
used to build large networks. Non-Routable protocols are designed to
work on small, local networks and cannot be used with a router</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="39">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>Why
should you care about the OSI Reference Model?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It provides a framework for discussing network
operations and design.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="40">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is logical link control?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">One of two sublayers of the data link layer of OSI
reference model, as defined by the IEEE 802 standard. This sublayer
is responsible for maintaining the link between computers when they
are sending data across the physical network connection. </span>
</div>
<div align="JUSTIFY">
<br />
</div>
<ol start="41">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is virtual channel?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Virtual
channel is normally a connection from one source to one destination,
although multicast connections are also permitted. The other name for
virtual channel is virtual circuit.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="42">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is virtual path?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Along
any transmission path from a given source to a given destination, a
group of virtual circuits can be grouped together into what is called
path.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="43">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is packet filter?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Packet
filter is a standard router equipped with some extra functionality.
The extra functionality allows every incoming or outgoing packet to
be inspected. Packets meeting some criterion are forwarded normally.
Those that fail the test are dropped.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="44">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is traffic shaping?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">One
of the main causes of congestion is that traffic is often busy. If
hosts could be made to transmit at a uniform rate, congestion would
be less common. Another open loop method to help manage congestion is
forcing the packet to be transmitted at a more predictable rate. This
is called traffic shaping.</span></span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="45">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is multicast routing?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Sending
a message to a group is called multicasting, and its routing
algorithm is called multicast routing.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="46">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is region?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">When
hierarchical routing is used, the routers are divided into what we
will call regions, with each router knowing all the details about how
to route packets to destinations within its own region, but knowing
nothing about the internal structure of other regions.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="47">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is silly window syndrome?</i> </span>
</div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">It
is a problem that can ruin TCP performance. This problem occurs when
data are passed to the sending TCP entity in large blocks, but an
interactive application on the receiving side reads 1 byte at a time.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="48">
<li><div align="JUSTIFY">
<span style="color: black;"><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><i>What
are Digrams and Trigrams?</i></span></span></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">The
most common two letter combinations are called as digrams. e.g. th,
in, er, re and an. The most common three letter combinations are
called as trigrams. e.g. the, ing, and, and ion.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="48">
<li><div align="JUSTIFY">
<span style="color: black;"><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><i>Expand
IDEA.</i></span></span></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">IDEA
stands for International Data Encryption Algorithm.</span></span></div>
<div align="JUSTIFY">
<br />
</div>
<ol start="48">
<li><div align="JUSTIFY">
<span style="color: black;"><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><i>What
is wide-mouth frog?</i></span></span></span></div>
</li>
</ol>
<div align="JUSTIFY" style="text-indent: 0.5in;">
<span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Wide-mouth
frog is the simplest known key distribution center (KDC)
authentication protocol.</span></span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Mail Gateway?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a system that performs a protocol translation
between different electronic mail delivery protocols.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is IGP (Interior Gateway Protocol)?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is any routing protocol used within an autonomous
system.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is EGP (Exterior Gateway Protocol)?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is the protocol the routers in neighboring autonomous
systems use to identify the set of networks that can be reached
within or via each autonomous system.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is autonomous system?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a collection of routers under the control of a
single administrative authority and that uses a common Interior
Gateway Protocol.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is BGP (Border Gateway Protocol)?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a protocol used to advertise the set of networks
that can be reached with in an autonomous system. BGP enables this
information to be shared with the autonomous system. This is newer
than EGP (Exterior Gateway Protocol).</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Gateway-to-Gateway protocol?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a protocol formerly used to exchange routing
information between Internet core routers.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is NVT (Network Virtual Terminal)?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a set of rules defining a very simple virtual
terminal interaction. The NVT is used in the start of a Telnet
session.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is a Multi-homed Host?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a host that has a multiple network interfaces and
that requires multiple IP addresses is called as a Multi-homed Host.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Kerberos?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is an authentication service developed at the
Massachusetts Institute of Technology. Kerberos uses encryption to
prevent intruders from discovering passwords and gaining unauthorized
access to files.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is OSPF?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is an Internet routing protocol that scales well, can
route traffic along multiple paths, and uses knowledge of an
Internet's topology to make accurate routing decisions.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is Proxy ARP?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is using a router to answer ARP requests. This will
be done when the originating host believes that a destination is
local, when in fact is lies beyond router.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is SLIP (Serial Line Interface Protocol)?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a very simple protocol used for transmission of IP
datagrams across a serial line.</span></div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is RIP (Routing Information Protocol)?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a simple protocol used to exchange information
between the routers. </span>
</div>
<div align="JUSTIFY" class="western">
<br />
</div>
<ol start="51">
<li><div align="JUSTIFY" class="western">
<span style="font-size: small;"><i>What
is source route?</i></span></div>
</li>
</ol>
<div align="JUSTIFY" class="western" style="text-indent: 0.5in;">
<span style="font-size: small;">It is a sequence of IP addresses identifying the route a
datagram must follow. A source route may optionally be included in an
IP datagram header. </span>
</div>
<div align="LEFT" class="western">
<br />
</div>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-16878572884226240662012-04-20T01:35:00.000+05:302012-05-01T16:46:17.966+05:30Bengali Movie Agni Pareeksha (1954) Download from mediafire<div dir="ltr" style="text-align: left;" trbidi="on">Movie Info: <a href="http://www.imdb.com/title/tt0046686/" target="_blank">imdb </a><br />
<br />
Cast: <br />
<table class="cast_list"><tbody>
<tr class="odd"><td class="name"> </td><td class="name">Uttam Kumar </td> <td class="ellipsis"> </td> <td class="character"> </td> </tr>
<tr class="even"> <td class="primary_photo"><br />
</td> <td class="name"> Suchitra Sen </td> <td class="ellipsis"> </td> <td class="character"> </td> </tr>
<tr class="odd"> <td class="primary_photo"> <a href="http://www.imdb.com/name/nm0222443/"> <br />
</a> </td> <td class="name"> Chandrabati Devi </td> <td class="ellipsis"> </td> <td class="character"> </td> </tr>
<tr class="even"> <td class="primary_photo"> <a href="http://www.imdb.com/name/nm0593951/"> <br />
</a> </td> <td class="name"> Kamal Mitra</td><td class="name"> </td><td class="name"> </td><td class="name"> </td><td class="name"> </td><td class="name"> </td><td class="name"> </td></tr>
</tbody></table><br />
<a href="http://adf.ly/7HCej" target="_blank">CD1-Part-1</a><br />
<a href="http://adf.ly/7HCvO" target="_blank">CD1-Part-2</a><br />
<a href="http://adf.ly/7HCzK" target="_blank">CD1-Part-3</a><br />
<a href="http://adf.ly/7HD21" target="_blank">CD1-Part-4</a><br />
<a href="http://adf.ly/7HD56" target="_blank">CD1-Part-5</a><br />
<br />
<a href="http://adf.ly/7HD80" target="_blank">CD2-Part-1</a> <br />
<a href="http://adf.ly/7HDBp" target="_blank">CD2-Part-2</a><br />
<a href="http://adf.ly/7HDFU" target="_blank">CD2-Part-3</a><br />
<br />
If any problem to download <a href="http://adf.ly/6ZcIJ" target="_blank">click here </a></div>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-36776818544686923712012-04-18T00:59:00.001+05:302012-05-05T20:52:52.181+05:30MCQ on DATABASE MANAGEMENT SYSTEMS<div dir="ltr" style="text-align: left;" trbidi="on">
<br /><br />
Q.1 In the relational modes, cardinality is termed as:<br />
(A) Number of tuples. (B) Number of attributes.<br />
(C) Number of tables. (D) Number of constraints.<br />
Ans: B<br />
Ref: <a href="http://en.wikibooks.org/wiki/DBMS" target="_blank">Wikipedia</a><br />
<br />
Q.2 Relational calculus is a<br />
(A) Procedural language. (B) Non- Procedural language.<br />
(C) Data definition language. (D) High level language.<br />
Ans: B<br />
<br />
Q.3 The view of total database content is<br />
(A) Conceptual view. (B) Internal view.<br />
(C) External view. (D) Physical View.<br />
Ans: A<br />
<br />
Q.4 Cartesian product in relational algebra is<br />
(A) a Unary operator. (B) a Binary operator.<br />
(C) a Ternary operator. (D) not defined.<br />
Ans: B Cartesian product in relational algebra is a binary operator.<br />
(It requires two operands. e.g., P X Q)<br />
<br />
Q.5 DML is provided for<br />
(A) Description of logical structure of database.<br />
(B) Addition of new structures in the database system.<br />
(C) Manipulation & processing of database.<br />
(D) Definition of physical structure of database system.<br />
Ans: C DML is provided for manipulation & processing of database.<br />
(Data stored in the database is processed or manipulated using data manipulation language commands as its name)<br />
<br />
<br />
<br />
Q.6 ‘AS’ clause is used in SQL for<br />
(A) Selection operation. (B) Rename operation.<br />
(C) Join operation. (D) Projection operation.<br />
Ans: B ‘AS’ clause is used in SQL for rename operation.<br />
(e.g., SELECT ENO AS EMPLOYEE_NO FROM EMP)<br />
<br />
Q.7 ODBC stands for<br />
(A) Object Database Connectivity.<br />
(B) Oral Database Connectivity.<br />
(C) Oracle Database Connectivity.<br />
(D) Open Database Connectivity.<br />
Ans: D<br />
<br />
Q.8 Architecture of the database can be viewed as<br />
(A) two levels. (B) four levels.<br />
(C) three levels. (D) one level.<br />
Ans: C<br />
<br />
Q.9 In a relational model, relations are termed as<br />
(A) Tuples. (B) Attributes<br />
(C) Tables. (D) Rows.<br />
Ans: A<br />
<br />
Q.10 The database schema is written in<br />
(A) HLL (B) DML<br />
(C) DDL (D) DCL<br />
Ans: C<br />
<br />
Q.11 In the architecture of a database system external level is the<br />
(A) physical level. (B) logical level.<br />
(C) conceptual level (D) view level.<br />
Ans: D<br />
<br />
Q.12 An entity set that does not have sufficient attributes to form a primary key is a<br />
(A) strong entity set. (B) weak entity set.<br />
(C) simple entity set. (D) primary entity set.<br />
Ans: B<br />
<br />
Q.13 In a Hierarchical model records are organized as<br />
(A) Graph. (B) List.<br />
(C) Links. (D) Tree.<br />
Ans: D<br />
<br />
Q.14 In an E-R diagram attributes are represented by<br />
(A) rectangle. (B) square.<br />
(C) ellipse. (D) triangle.<br />
Ans: C<br />
<br />
Q.15 In case of entity integrity, the primary key may be<br />
(A) not Null (B) Null<br />
(C) both Null & not Null. (D) any value.<br />
Ans: A<br />
<br />
Q.16 In tuple relational calculus P1 → P2 is equivalent to<br />
(A) ¬P1 ∨ P2 (B) P1 ∨ P2<br />
(C) P1 ∧ P2 (D) P1 ∧ ¬P2<br />
Ans: A In tuple relational calculus P1 P2 is equivalent to ¬P1 ∨ P2.<br />
(The logical implication expression A B, meaning if A then B,is equivalent to ¬A ∨ B)<br />
<br />
Q.17 The language used in application programs to request data from the DBMS is referred<br />
to as the<br />
(A) DML (B) DDL<br />
(C) VDL (D) SDL<br />
Ans: A<br />
<br />
Q.18 A logical schema<br />
(A) is the entire database.<br />
(B) is a standard way of organizing information into accessible parts.<br />
(C) describes how data is actually stored on disk.<br />
(D) both (A) and (C)<br />
Ans: A<br />
<br />
Q.19 Related fields in a database are grouped to form a<br />
(A) data file. (B) data record.<br />
(C) menu. (D) bank.<br />
Ans: B Related data fields in a database are grouped to form a data record.<br />
(A record is a collection of related fields)<br />
<br />
Q.20 The database environment has all of the following components except:<br />
(A) users. (B) separate files.<br />
(C) database. (D) database administrator.<br />
Ans: A<br />
<br />
Q.21 The language which has recently become the defacto standard for interfacing application<br />
programs with relational database system is<br />
(A) Oracle. (B) SQL.<br />
(C) DBase. (D) 4GL.<br />
Ans: B<br />
<br />
Q.22 The way a particular application views the data from the database that the application<br />
uses is a<br />
(A) module. (B) relational model.<br />
(C) schema. (D) sub schema.<br />
Ans: D<br />
<br />
Q.23 In an E-R diagram an entity set is represent by a<br />
(A) rectangle. (B) ellipse.<br />
(C) diamond box. (D) circle.<br />
Ans: A<br />
<br />
Q.24 A report generator is used to<br />
(A) update files. (B) print files on paper.<br />
(C) data entry. (D) delete files.<br />
Ans: B<br />
<br />
Q.25 The property / properties of a database is / are :<br />
(A) It is an integrated collection of logically related records.<br />
(B) It consolidates separate files into a common pool of data records.<br />
(C) Data stored in a database is independent of the application programs using it.<br />
(D) All of the above.<br />
Ans: D<br />
<br />
Q.26 The DBMS language component which can be embedded in a program is<br />
(A) The data definition language (DDL).<br />
(B) The data manipulation language (DML).<br />
(C) The database administrator (DBA).<br />
(D) A query language.<br />
Ans: B<br />
<br />
Q.27 A relational database developer refers to a record as<br />
(A) a criteria. (B) a relation.<br />
(C) a tuple. (D) an attribute.<br />
Ans: C<br />
<br />
Q.28 The relational model feature is that there<br />
<br />
(A) is no need for primary key data.<br />
(B) is much more data independence than some other database models.<br />
(C) are explicit relationships among records.<br />
(D) are tables with many dimensions.<br />
Ans: B<br />
<br />
Q.29 Conceptual design<br />
(A) is a documentation technique.<br />
(B) needs data volume and processing frequencies to determine the size of the database.<br />
(C) involves modelling independent of the DBMS.<br />
(D) is designing the relational model.<br />
Ans:C<br />
<br />
Q.30 The method in which records are physically stored in a specified order according to a key<br />
field in each record is<br />
(A) hash. (B) direct.<br />
(C) sequential. (D) all of the above.<br />
Ans: A A method in which records are physically stored in a specified order according<br />
to a key field in each record is hash.<br />
(In hash method, a hash function is performed on the key value to determine the<br />
unique physical address of the record to store or retrieve)<br />
<br />
Q.31 A subschema expresses<br />
(A) the logical view. (B) the physical view.<br />
(C) the external view. (D) all of the above.<br />
Ans: C A subschema expresses the external view.<br />
(External schemas are called also called as subschemas)<br />
<br />
Q.32 Count function in SQL returns the number of<br />
(A) values. (B) distinct values.<br />
(C) groups. (D) columns.<br />
Ans: A Count function in SQL returns the number of values.<br />
(Count function counts all the not null values in the specific column. If we want to<br />
count only distinct values than the DISTINCT keyword is also to be used)<br />
<br />
Q.33 Which one of the following statements is false?<br />
(A) The data dictionary is normally maintained by the database<br />
administrator.<br />
(B) Data elements in the database can be modified by changing the data dictionary.<br />
(C) The data dictionary contains the name and description of each data element.<br />
(D) The data dictionary is a tool used exclusively by the database administrator.<br />
Ans: B<br />
<br />
<br />
Q.34 An advantage of the database management approach is<br />
(A) data is dependent on programs.<br />
(B) data redundancy increases.<br />
(C) data is integrated and can be accessed by multiple programs.<br />
(D) none of the above.<br />
Ans: C<br />
<br />
Q.35 A DBMS query language is designed to<br />
(A) support end users who use English-like commands.<br />
(B) support in the development of complex applications software.<br />
(C) specify the structure of a database.<br />
(D) all of the above.<br />
Ans: D<br />
<br />
Q.36 Transaction processing is associated with everything below except<br />
(A) producing detail, summary, or exception reports.<br />
(B) recording a business activity.<br />
(C) confirming an action or triggering a response.<br />
(D) maintaining data.<br />
Ans: C<br />
<br />
Q.37 It is possible to define a schema completely using<br />
(A) VDL and DDL. (B) DDL and DML.<br />
(C) SDL and DDL. (D) VDL and DML.<br />
Ans: B<br />
<br />
Q.38 The method of access which uses key transformation is known as<br />
(A) direct. (B) hash.<br />
(C) random. (D) sequential.<br />
Ans: B<br />
<br />
Q.39 Data independence means<br />
(A) data is defined separately and not included in programs.<br />
(B) programs are not dependent on the physical attributes of data.<br />
(C) programs are not dependent on the logical attributes of data.<br />
(D) both (B) and (C).<br />
Ans: D both (B) and (C)<br />
<br />
Q.40 The statement in SQL which allows to change the definition of a table is<br />
(A) Alter. (B) Update.<br />
(C) Create. (D) select.<br />
Ans: A<br />
<br />
<br />
Q.41 E-R model uses this symbol to represent weak entity set ?<br />
(A) Dotted rectangle.<br />
(B) Diamond<br />
(C) Doubly outlined rectangle<br />
(D) None of these<br />
Ans: C<br />
<br />
Q.42 SET concept is used in :<br />
(A) Network Model<br />
(B) Hierarchical Model<br />
(C) Relational Model<br />
(D) None of these<br />
Ans: A<br />
<br />
Q.43 Relational Algebra is<br />
(A) Data Definition Language .<br />
(B) Meta Language<br />
(C) Procedural query Language<br />
(D) None of the above<br />
Ans: C<br />
<br />
Q.44 Key to represent relationship between tables is called<br />
(A) Primary key (B) Secondary Key<br />
(C) Foreign Key (D) None of these<br />
Ans: C<br />
<br />
Q.45 _______ produces the relation that has attributes of R1 and R2<br />
(A) Cartesian product (B) Difference<br />
(C) Intersection (D) Product<br />
Ans: A<br />
<br />
Q.46 The file organization that provides very fast access to any arbitrary record of a file is<br />
(A) Ordered file (B) Unordered file<br />
(C) Hashed file (D) B-tree<br />
Ans: C<br />
<br />
Q.47 DBMS helps achieve<br />
(A) Data independence (B) Centralized control of data<br />
(C) Neither (A) nor (B) (D) both (A) and (B)<br />
Ans: D<br />
<br />
Q.48 Which of the following are the properties of entities?<br />
(A) Groups (B) Table<br />
(C) Attributes (D) Switchboards<br />
Ans: C<br />
<br />
Q.49 In a relation<br />
(A) Ordering of rows is immaterial<br />
(B) No two rows are identical<br />
(C) (A) and (B) both are true<br />
(D) None of these.<br />
Ans: C<br />
<br />
Q.50 Which of the following is correct:<br />
(A) a SQL query automatically eliminates duplicates.<br />
(B) SQL permits attribute names to be repeated in the same relation.<br />
(C) a SQL query will not work if there are no indexes on the relations<br />
(D) None of these<br />
Ans: D<br />
<br />
Q.51 It is better to use files than a DBMS when there are<br />
(A) Stringent real-time requirements.<br />
(B) Multiple users wish to access the data.<br />
(C) Complex relationships among data.<br />
(D) All of the above.<br />
Ans: B<br />
<br />
Q.52 The conceptual model is<br />
(A) dependent on hardware.<br />
(B) dependent on software.<br />
(C) dependent on both hardware and software .<br />
(D) independent of both hardware and software.<br />
Ans: D<br />
<br />
Q.53 What is a relationship called when it is maintained between two entities?<br />
(A) Unary (B) Binary<br />
(C) Ternary (D) Quaternary<br />
Ans: B<br />
<br />
Q.54 Which of the following operation is used if we are interested in only certain columns of a<br />
table?<br />
(A) PROJECTION (B) SELECTION<br />
(C) UNION (D) JOIN<br />
Ans: A<br />
<br />
Q.55 Which of the following is a valid SQL type?<br />
(A) CHARACTER (B) NUMERIC<br />
(C) FLOAT (D) All of the above<br />
Ans: D<br />
<br />
Q.56 The RDBMS terminology for a row is<br />
(A) tuple. (B) relation.<br />
(C) attribute. (D) degree.<br />
Ans: A<br />
<br />
Q.57 Which of the following operations need the participating relations to be union compatible?<br />
(A) UNION (B) INTERSECTION<br />
(C) DIFFERENCE (D) All of the above<br />
Ans: D<br />
<br />
Q.58 The full form of DDL is<br />
(A Dynamic Data Language (B) Detailed Data Language<br />
(C) Data Definition Language (D) Data Derivation Language<br />
Ans: C<br />
<br />
Q.59 Which of the following is an advantage of view?<br />
(A) Data security (B) Derived columns<br />
(C) Hiding of complex queries (D) All of the above<br />
Ans: D<br />
<br />
Q.60 Which of the following is a legal expression in SQL?<br />
(A) SELECT NULL FROM EMPLOYEE;<br />
(B) SELECT NAME FROM EMPLOYEE;<br />
(C) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;<br />
(D) None of the above<br />
Ans: B<br />
<br />
Q.61 The users who use easy-to-use menu are called<br />
(A) Sophisticated end users. (B) Naïve users.<br />
(C) Stand-alone users. (D) Casual end users.<br />
Ans: B<br />
<br />
Q.62 Which database level is closest to the users?<br />
(A) External (B) Internal<br />
(C) Physical (D) Conceptual<br />
Ans: A<br />
<br />
<br />
Q.63 Which are the two ways in which entities can participate in a relationship?<br />
(A) Passive and active (B) Total and partial<br />
(C) Simple and Complex (D) All of the above<br />
Ans: B<br />
<br />
Q.64 The result of the UNION operation between R1 and R2 is a relation that includes<br />
(A) all the tuples of R1<br />
(B) all the tuples of R2<br />
(C) all the tuples of R1 and R2<br />
(D) all the tuples of R1 and R2 which have common columns<br />
Ans: D<br />
<br />
Q.65 Which of the following is a comparison operator in SQL?<br />
(A) = (B) LIKE<br />
(C) BETWEEN (D) All of the above<br />
Ans: D<br />
<br />
Q.66 A set of possible data values is called<br />
(A) attribute. (B) degree.<br />
(C) tuple. (D) domain.<br />
Ans: D<br />
<br />
Q.67 Which of the operations constitute a basic set of operations for manipulating relational<br />
data?<br />
(A) Predicate calculus (B) Relational calculus<br />
(C) Relational algebra (D) None of the above<br />
Ans:C<br />
<br />
Q.68 Which of the following is another name for weak entity?<br />
(A) Child (B) Owner<br />
(C) Dominant (D) All of the above<br />
Ans: A<br />
<br />
Q.69 Which of the following database object does not physically exist?<br />
(A) base table (B) index<br />
(C) view (D) none of the above<br />
Ans: C<br />
<br />
Q.70 NULL is<br />
(A) the same as 0 for integer<br />
(B) the same as blank for character<br />
(C) the same as 0 for integer and blank for character<br />
(D) not a value<br />
Ans: D<br />
<br />
Q.71 Which of the following is record based logical model?<br />
(A) Network Model (B) Object oriented model<br />
(C) E-R Model (D) None of these<br />
Ans: A<br />
<br />
Q.72 A data dictionary is a special file that contains:<br />
(A) The name of all fields in all files.<br />
(B) The width of all fields in all files.<br />
(C) The data type of all fields in all files.<br />
(D) All of the above.<br />
Ans: D<br />
<br />
Q.73 A file manipulation command that extracts some of the records from a file is called<br />
(A) SELECT (B) PROJECT<br />
(C) JOIN (D) PRODUCT<br />
Ans: A<br />
<br />
Q.74 The physical location of a record is determined by a mathematical formula that transforms<br />
a file key into a record location is :<br />
(A) B-Tree File (B) Hashed File<br />
(C) Indexed File (D) Sequential file.<br />
Ans: B<br />
<br />
Q.75 Using Relational Algebra the query that finds customers, who have a balance of over<br />
1000 is<br />
(A) Π Customer_name( σ balance >1000(Deposit))<br />
(B) σ Customer_name( Π balance >1000(Deposit))<br />
(C) Π Customer_name( σ balance >1000(Borrow))<br />
(D) σ Customer_name( Π balance >1000(Borrow))<br />
Ans: A<br />
<br />
Q.76 A primary key is combined with a foreign key creates<br />
(A) Parent-Child relation ship between the tables that connect them.<br />
(B) Many to many relationship between the tables that connect them.<br />
(C) Network model between the tables that connect them.<br />
(D) None of the above.<br />
Ans: A<br />
<br />
Q.77 In E-R Diagram derived attribute are represented by<br />
(A) Ellipse (B) Dashed ellipse<br />
(C) Rectangle (D) Triangle<br />
Ans B<br />
<br />
Q.78 Cross Product is a:<br />
(A) Unary Operator (B) Ternary Operator<br />
(C) Binary Operator (D) Not an operator<br />
Ans: C<br />
<br />
Q.79 An instance of relational schema R (A, B, C) has distinct values of A including NULL<br />
values. Which one of the following is true?<br />
(A) A is a candidate key (B) A is not a candidate key<br />
(C) A is a primary Key (D) Both (A) and (C)<br />
Ans: B<br />
<br />
Q.80 Consider the join of a relation R with relation S. If R has m tuples and S has n tuples,<br />
then the maximum size of join is:<br />
(A) mn (B) m+n<br />
(C) (m+n)/2 (D) 2(m+n)<br />
Ans: A<br />
<br />
Q.81 The natural join is equal to :<br />
(A) Cartesian Product<br />
(B) Combination of Union and Cartesian product<br />
(C) Combination of selection and Cartesian product<br />
(D) Combination of projection and Cartesian product<br />
Ans: D<br />
<br />
Q.82 Which one of the following is not true for a view:<br />
(A) View is derived from other tables.<br />
(B) View is a virtual table.<br />
(C) A view definition is permanently stored as part of the database.<br />
(D) View never contains derived columns.<br />
Ans: C<br />
<br />
Q.83 A primary key if combined with a foreign key creates<br />
(A) Parent-Child relationship between the tables that connect them.<br />
(B) Many to many relationship between the tables that connect them.<br />
(C) Network model between the tables that connect them.<br />
(D) None of the above.<br />
Ans: A<br />
<br />
Q.84 In E-R Diagram relationship type is represented by<br />
(A) Ellipse (B) Dashed ellipse<br />
(C) Rectangle (D) Diamond<br />
Ans: D<br />
<br />
Q.85 Hierarchical model is also called<br />
(A) Tree structure (B) Plex Structure<br />
(C) Normalize Structure (D) Table Structure<br />
Ans: A<br />
<br />
Q.86 To delete a particular column in a relation the command used is:<br />
(A) UPDATE (B) DROP<br />
(C) ALTER (D) DELETE<br />
Ans: C<br />
<br />
Q.87 The ______ operator is used to compare a value to a list of literals values that have been<br />
specified.<br />
(A) BETWEEN (B) ANY<br />
(C) IN (D) ALL<br />
Ans: A<br />
<br />
Q.88 A logical schema<br />
A) is the entire database<br />
B) is a standard way of organizing information into a accessible part<br />
C) describe how data is actually stored on disk<br />
D) none of these<br />
Ans: D<br />
<br />
Q.89 A B-tree of order m has maximum of _____________ children<br />
(A) m (B) m+1<br />
(C) m-1 (D) m/2<br />
Ans: A<br />
<br />
Q.90 _____________ function divides one numeric expression by another and returns the<br />
remainder.<br />
(A) POWER (B) MOD<br />
(C) ROUND (D) REMAINDER<br />
Ans: B<br />
<br />
Q.91 A data manipulation command the combines the records from one or more tables is called<br />
(A) SELECT (B) PROJECT<br />
(C) JOIN (D) PRODUCT<br />
Ans: C<br />
<br />
Q.92 In E-R diagram generalization is represented by<br />
(A) Ellipse (B) Dashed ellipse<br />
(C) Rectangle (D) Triangle<br />
Ans: D<br />
<br />
Q.93 _________ is a virtual table that draws its data from the result of an SQL<br />
SELECT statement.<br />
(A) View (B) Synonym<br />
(C) Sequence (D) Transaction<br />
Ans: A<br />
<br />
Q.94 The method of access which uses key transformation is known as<br />
(A) Direct (B) Hash<br />
(C) Random (D) Sequential<br />
Ans: B<br />
<br />
Q.95 A table joined with itself is called<br />
(A) Join (B) Self Join<br />
(C) Outer Join (D) Equi Join<br />
Ans: B<br />
<br />
Q.96 _________ data type can store unstructured data<br />
(A) RAW (B) CHAR<br />
(C) NUMERIC (D) VARCHAR<br />
Ans: A<br />
<br />
Q.97 Which two files are used during operation of the DBMS<br />
(A) Query languages and utilities<br />
(B) DML and query language<br />
(C) Data dictionary and transaction log<br />
(D) Data dictionary and query language<br />
Ans: C<br />
<br />
If any mistakes are there, please help me to correct. Thanks.<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-81879729440548414542012-04-17T19:40:00.000+05:302012-05-05T20:53:24.263+05:30MCQ On INTERNET & WEB TECHNOLOGY<div dir="ltr" style="text-align: left;" trbidi="on">
<br />Q.1 A header in CGI script can specify<br />
(A) format of the document. (B) new location of the document.<br />
(C) (A) & (B) both. (D) start of the document.<br />
Ans: A<br />
A header in CGI script can specify- Format of the document & New location of the document.<br />
<br />
Q.2 All exceptions in Java are subclasses of built in class called<br />
(A) Exception (B) Error.<br />
(C) Throwable. (D) Raise.<br />
Ans: C<br />
All exception in Java are subclasses of built in class called Throwable.<br />
<br />
Q.3 In 32bit IP Addressing scheme all 1’s represent<br />
(A) this computer. (B) directed broadcast.<br />
(C) limited broadcast. (D) loop back.<br />
Ans: C<br />
In 32 bit IP Addressing scheme all 1’s represent limited broadcast.<br />
<br />
Q.4 DMSP stands for<br />
(A) Distributed Mail S ystem Protocol<br />
(B) Distributed Message System Protocol<br />
(C) Distributed Message System Pool<br />
(D) Distributed Mail S ystem Pool<br />
Ans: A<br />
DMSP stands for – Distributed Mail system Protocol.<br />
<br />
Q.5 Which Layer is not present in TCP/ IP model?<br />
(A) Application Layer (B) Internet Layer<br />
(C) Transport Layer (D) Presentation Layer<br />
Ans: D<br />
Presentation layer is not present in TCP/ IP Model.<br />
<br />
Q.6 Let most segment of a name inn DNS represents<br />
(A) Individual Network. (B) Individual computer.<br />
(C) Domain name (D) Network t ype.<br />
Ans: B<br />
Left Most segment of a name in DNS represents- Individual computer<br />
<br />
Q.7 Address 192.5.48.3 belongs to<br />
(A) class A. (B) class B.<br />
(C) class C. (D) class D.<br />
Ans: C<br />
Address 192.5.48.3 belongs to class C.<br />
<br />
Q.8 Unlike Ipv4, Ipv6 does not include the following field in thee base header<br />
(A) Next Header field. (B) Field for Fragmentation<br />
information<br />
(B) Flow Label. (D) Kind field.<br />
Ans: B<br />
Unlike Ipv4, Ipv6 does not include the Field for Fragmentation information in the base header.<br />
<br />
Q.9 The term b yte stuffing refers to:<br />
(A) data stuffing used with character oriented hardware.<br />
(B) data stuffing used with bit oriented hardware.<br />
(C) data stuffing used with both (A) & (B)<br />
(D) data stuffing used with b yte oriented hardware.<br />
Ans: A<br />
The term b yte stuffing refers to data stuffing used with character-oriented<br />
hardware.<br />
<br />
Q.10 FDDI (Fiber Distributed Data Interconnect) is an example of<br />
(A) token ring. (B) token bus<br />
(C) star topology (D) multipoint network.<br />
Ans: A<br />
FDDI is an example of token ring.<br />
<br />
Q.11 Hardware that calculates CRC(C yclic Redundancy Check) uses:<br />
(A) Shift register (B) Xor unit<br />
(C) Both (A) & (B) (D) Instruction register<br />
Ans: B<br />
Hardware that calculates CRC uses shift register and Xor unit.<br />
<br />
Q.12 In TCP protocol header “checksum” is of___________<br />
(A) 8 bits (B) 16 bits<br />
(C) 32 bits (D) 64 bis<br />
Ans: B<br />
In TCP protocol header checksum is of 16 bits.<br />
<br />
Q.13 In IP addressing scheme, class used for multicasting is:<br />
(A) Class A (B) Class B<br />
(C) Class C (D) Class D<br />
Ans: D<br />
In IP addressing scheme, class used for multicasting is class D.<br />
<br />
Q.14 CIDR stands for<br />
(A) Classified Internet Domain Routing<br />
(B) Classless Inter Domain Routing<br />
(C) Classless Internet Domain Routing<br />
(D) Classified Inter Domain Routing<br />
Ans: B<br />
CIDR stands for Classless Inter Domain Routing.<br />
<br />
Q.15 The total number of class of IP address are<br />
(A) 3. (B) 4.<br />
(C) 5. (D) 9.<br />
Ans: C<br />
The total number of class of IP addresses are 5.<br />
<br />
Q.16 Parent class of all Java classes is<br />
(A) java.lang.s ystem (B) java.lang.object<br />
(C) java.lang.class (D) java.lang.reflect.object<br />
Ans: B<br />
Parent class of all Java classes is java.lang.object.<br />
<br />
Q.17 Exceptions of t ype error inn JAVA are handled b y<br />
(A) User program (B) Java run time environment<br />
(C) Operating s ystem kerne (D) Interrupt<br />
Ans: B<br />
Exceptions of t ype error in JAVA are handled b y J AVA run time<br />
environment.<br />
<br />
Q.18 Error detecting method that can detect more errors without increasing<br />
additional information in each packet is<br />
(A) checksum (B) even parit y mechanism<br />
(C) CRC (D) odd parit y mechanism.<br />
Ans: C<br />
Error detecting method that can detect more errors without increasing<br />
additional information in each packet is CRC.<br />
<br />
Q.19 A Network uses a star topology if<br />
(A) Computers are arranged in a closed loop.<br />
(B) All computers attach to a central point.<br />
(C) All computers attach to a single long cable.<br />
(D) Computers attach to multiple hierarchical cables.<br />
Ans: B<br />
A Network uses a star topology if all computers attach to a central point.<br />
<br />
Q.20 MTU is specified b y<br />
(A) IP Datagram size (B) Hardware technology<br />
(C) TCP Segment size (D) None of the above.<br />
Ans: B<br />
MTU is specified b y hardware technology.<br />
<br />
Q.21 Network address prefixed b y 1110 is a<br />
(A) Class A address (B) Multicast address<br />
(C) Class B address (D) Reserve address.<br />
Ans: B<br />
Network address prefixed b y 1110 is a multicast address.<br />
<br />
Q.22 FTP does not use<br />
(A) Two transfer mode.<br />
(B) Control connection to remote computer before file can be transferred.<br />
(C) User Datagram Protocol.<br />
(D) Authorization of a user through login and password verification.<br />
Ans: C<br />
FTP does not use User Datagram Protocol.<br />
<br />
Q.23 A Header in CGI document can represent<br />
(A) format of the document<br />
(B) location if document used to different URL<br />
(C) both (A) & (B)<br />
(D) None of the above.<br />
Ans: B<br />
A header in CGI document can represent format of the document and the<br />
location if document used to different URL.<br />
<br />
Q.24 127.0.0.1 is a<br />
(A) limited broadcast address (B) direct broadcast address<br />
(C) multicast address (D) loop-back address<br />
Ans: D<br />
127.0.0.1 is a loop-back address.<br />
<br />
Q.25 In cyclic redundancy checking CRC is the<br />
(A) divisor (B) quotient.<br />
(C) dividend (D) remainder.<br />
Ans: D<br />
In cyclic redundancy checking CRC is the remainder.<br />
<br />
Q.26 Which one of the following uses the greatest number of layers in the OSI<br />
model?<br />
(A) Bridge (B) Repeater.<br />
(C) Router. (D) Gateway.<br />
Ans: D<br />
Gateway uses the greatest number of layers in the OS I model.<br />
<br />
Q.27 Which of the following 802 standard provides for a collision free protocol?<br />
(A) 802.2 (B) 802.3<br />
(C) 802.5 (D) 802.6<br />
Ans: C<br />
802.5 standards provides for a collision free protocol.<br />
<br />
Q.28 The addressing especiall y used b y Transport Layer is<br />
(A) Station address (B) Network address<br />
(B) Application port address (D) Dialog address<br />
Ans: B<br />
The addressing speciall y used b y transport layer is application port address.<br />
<br />
Q.29 Which one of thee following is an error reporting protocol?<br />
(A) ARP (B) ICMP<br />
(C) TCP (D) UDP<br />
Ans: B<br />
ICMP is an error reporting protocol.<br />
<br />
Q.30 Which t ype of web document is run at the client site<br />
(A) Static (B) Dynamic<br />
(C) Active (D) All of the above<br />
Ans: C<br />
Active web document is run at client side.<br />
<br />
Q.31 The main function of a browser is to<br />
(A) compile HTML (B) interpret HTM L<br />
(C) de-compile HTML (D) interpret CGI programs<br />
Ans: B<br />
The main function of a browser is to interpret HTM L.<br />
<br />
Q.32 Which of the following is associated with SNMP<br />
(A) SMI (B) BER<br />
(C) DNS (D) MIB<br />
Ans: D<br />
MIB is associated with SNMP.<br />
<br />
Q.33 ATM is an example of<br />
(A) Ring topology (B) Star topology<br />
(C) Bus topology (D) None of the above.<br />
Ans: B Star topology<br />
<br />
Q.34 The first part of the address in electronic mailbox identifies:<br />
(A) User’s mailbox (B) Computer on which mail box resides<br />
(C) Both (A) & (B) (D) None of the above<br />
Ans: A User’s mailnbox.<br />
<br />
Q.35 Protocol used to monitor and control network devices operates at:<br />
(A) Application layer (B) Transport layer<br />
(C) Network layer (D) Data Link layer<br />
Ans: A Application layer.<br />
<br />
Q.36 DHCP stands for<br />
(A) Dynamic Host Control Protocol<br />
(B) Dynamic Host Configuration Protocol.<br />
(C) Dynamic Host Connection Protocol.<br />
(D) None of the above.<br />
Ans: B Dynamic Host Configuration Protocol.<br />
<br />
Q.37 The transport protocol used b y TFTP (Trivial File Transfer Protocol) is:<br />
(A) FTP (B) UDP<br />
(C) TCP (D) IP<br />
Ans: B UDP.<br />
<br />
Q.38 The Environment variable SCR IPT_NAME in CGI script specifies:<br />
(A) Domain name of the computer running o server<br />
(B) The path of URL after server name.<br />
(C) Name of the server<br />
(D) None of the above.<br />
Ans: B <br />
The path of URL after server name.<br />
<br />
Q.39 Application layer (layer 4) in TCP/IP model corresponds to:<br />
(A) Layer 4 and 5 in OSI model (B) Layer 5 and 6 in OSI model<br />
(C) Layer 6 and 7 in OSI model (D) Layer 1 and 2 in OSI model<br />
Ans: C <br />
Layer 6 and 7 in OS I model.<br />
<br />
Q.40 UDP (User Diagram Protocol) is<br />
(A) Connectionless (B) Message Oriented<br />
(C) Connection oriented (D) Both (A) and (B)<br />
Ans: D <br />
Both (A) and (B).<br />
<br />
Q.41 A network address prefixed b y 1000 is:<br />
(A) Class A address (B) Class B address<br />
(C) Class C address (D) Class D address<br />
Ans: B Class B address.<br />
<br />
Q.42 In Java S ystem.out is an object of t ype<br />
(A) InputStream (B) PrintStream<br />
(C) OutputStream (D) None of the above.<br />
Ans: B PrintStream.<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-10531249214136044872012-04-17T13:24:00.000+05:302012-05-01T16:45:45.395+05:30Regular Languages<div dir="ltr" style="text-align: left;" trbidi="on"> <style type="text/css">
h3 { margin-bottom: 0.04in; }h3.western { font-family: "Arial",sans-serif; font-size: 13pt; }h3.cjk { font-family: "DejaVu Sans"; font-size: 13pt; }h3.ctl { font-family: "Arial",sans-serif; font-size: 13pt; }h3.style3-western { margin-top: 0in; margin-bottom: 0in; font-family: "Times New Roman",serif; font-size: 12pt; line-height: 150%; }h3.style3-cjk { margin-top: 0in; margin-bottom: 0in; font-family: "Batang","바탕"; font-size: 12pt; line-height: 150%; }h3.style3-ctl { margin-top: 0in; margin-bottom: 0in; font-family: "Arial",sans-serif; line-height: 150%; }p { margin-bottom: 0.08in; }
</style> <br />
<h3 class="style3-western" style="text-align: left;">Regular expression</h3><h3 class="style3-western" style="text-align: left;"> <style type="text/css">
p { margin-bottom: 0in; text-align: justify; }
</style></h3><br />
<style type="text/css">
p { margin-bottom: 0in; text-align: justify; }
</style> <br />
<div align="LEFT"><b>Definition</b>: A regular expression is recursively defined as follows.</div><br />
<br />
<ol><li><div align="JUSTIFY"><span class="Unicode">Φ</span> is a regular expression denoting an empty language.</div></li>
<li><div align="JUSTIFY"><b><span lang="el">ϵ</span></b>(epsilon) is a regular expression indicates the language containing an empty string.</div></li>
<li><div align="JUSTIFY"><i>a</i> is a regular expression which indicates the language containing only {a} </div></li>
<li><div align="JUSTIFY">If R is a regular expression denoting the language L<sub>R</sub> and S is a regular expression denoting the language L<sub>S</sub>, then</div><ol><li><div align="JUSTIFY">R+S is a regular expression corresponding to the language L<sub>R</sub>UL<sub>S</sub>.</div></li>
<li><div align="JUSTIFY">R.S is a regular expression corresponding to the language L<sub>R</sub><b>.</b>L<sub>S.</sub>.</div></li>
<li><div align="JUSTIFY">R* is a regular expression corresponding to the language L<sub>R</sub><sup>*</sup>.</div></li>
</ol></li>
<li>The expressions obtained by applying any of the rules from 1-4 are regular expressions.<br />
</li>
</ol><div lang=""><br />
</div><div align="LEFT" style="margin-bottom: 0.08in;"><span style="font-size: x-small;">The table shows some examples of regular expressions and the language corresponding to these regular expressions.</span></div><center> <table border="1" cellpadding="7" cellspacing="0" style="width: 433px;"><col width="93"></col> <col width="310"></col> <tbody>
<tr valign="TOP"> <td width="93"> Regular expressions<br />
</td> <td width="310"> Meaning <br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (a+b)*<br />
</td> <td width="310"> Set of strings of a’s and b’s of any length including the NULL string. <br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (a+b)*abb<br />
</td> <td width="310"> Set of strings of a’s and b’s ending with the string abb<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> ab(a+b)*<br />
</td> <td width="310"> Set of strings of a’s and b’s starting with the string ab.<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (a+b)*aa(a+b)*<br />
</td> <td width="310"> Set of strings of a’s and b’s having a sub string aa.<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> a*b*c*<br />
</td> <td width="310"> Set of string consisting of any number of a’s(may be empty string also) followed by any number of b’s(may include empty string) followed by any number of c’s(may include empty string).<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> a<sup>+</sup>b<sup>+</sup>c<sup>+</sup><br />
</td> <td width="310"> Set of string consisting of at least one ‘a’ followed by string consisting of at least one ‘b’ followed by string consisting of at least one ‘c’.<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> aa*bb*cc*<br />
</td> <td width="310"> Set of string consisting of at least one ‘a’ followed by string consisting of at least one ‘b’ followed by string consisting of at least one ‘c’.<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (a+b)* (a + bb)<br />
</td> <td width="310"> Set of strings of a’s and b’s ending with either <i>a</i> or <i>bb</i><br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (aa)*(bb)*b<br />
</td> <td width="310"> Set of strings consisting of even number of a’s followed by odd number of b’s<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (0+1)*000<br />
</td> <td width="310"> Set of strings of 0’s and 1’s ending with three consecutive zeros(or ending with 000)<br />
</td> </tr>
<tr valign="TOP"> <td width="93"> (11)*<br />
</td> <td width="310"> Set consisting of even number of 1’s<br />
</td> </tr>
</tbody></table></center> <br />
<br />
<div align="CENTER"> Meaning of regular expressions</div><div align="LEFT"><br />
</div><div align="LEFT"><br />
</div><div align="LEFT"><span style="font-size: x-small;">Obtain a regular expression to accept a language consisting of strings of a’s and b’s of even length.</span></div><div align="LEFT"><br />
</div>String of a’s and b’s of even length can be obtained by the combination of the strings aa, ab, ba and bb. The language may even consist of an empty string denoted by <span style="font-family: Symbol,serif;">ϵ</span>. So, the regular expression can be of the form<br />
<br />
<br />
<div align="CENTER">(aa + ab + ba + bb)*</div><br />
<br />
The * closure includes the empty string. <br />
Note: This regular expression can also be represented using set notation as <br />
<div align="CENTER">L(R) = {(aa + ab + ba + bb)<sup>n</sup> | n <span style="font-family: Symbol,serif;">>=</span> 0}</div><br />
<br />
<div align="LEFT"><br />
</div><div align="LEFT"><span style="font-size: x-small;">Obtain a regular expression to accept a language consisting of strings of a’s and b’s of odd length.</span></div><div align="LEFT"><br />
</div>String of a’s and b’s of odd length can be obtained by the combination of the strings aa, ab, ba and bb followed by either <i>a</i> or <i>b</i>. So, the regular expression can be of the form<br />
<br />
<br />
<div align="CENTER">(aa + ab + ba + bb)* (a+b)</div><br />
<br />
String of a’s and b’s of odd length can also be obtained by the combination of the strings aa, ab, ba and bb preceded by either <i>a</i> or <i>b</i>. So, the regular expression can also be represented as <br />
<br />
<br />
<div align="CENTER">(a+b) (aa + ab + ba + bb)*</div><br />
<br />
Note: Even though these two expression are seems to be different, the language corresponding to those two expression is same. So, a variety of regular expressions can be obtained for a language and all are equivalent.<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-57509915788911183892012-04-05T11:54:00.002+05:302012-04-05T11:59:13.807+05:30Conversion from NFA to DFA<div dir="ltr" style="text-align: left;" trbidi="on"> <style type="text/css">
p { margin-bottom: 0in; text-align: justify; }
</style> <br />
<div align="JUSTIFY" style="margin-top: 0.08in;">Let M<sub>N</sub> = (Q<sub>N</sub>, <span style="font-family: Symbol,serif;">Σ</span><sub>N</sub>, <span style="font-family: Symbol,serif;">δ</span><sub>N</sub>, q<sub>0</sub>, A<sub>N</sub>) be an NFA and accepts the language L(M<sub>N</sub>). There should be an equivalent DFA M<sub>D</sub> = (Q<sub>D</sub>, <span style="font-family: Symbol,serif;">Σ</span><sub>D</sub>, <span style="font-family: Symbol,serif;">δ</span><sub>D</sub>, q<sub>0</sub>, A<sub>D</sub>) such that L(M<sub>D</sub>) = L(M<sub>N</sub>). The procedure to convert an NFA to its equivalent DFA is shown below:</div><div style="margin-top: 0.08in;"><br />
</div><div style="margin-top: 0.08in;">Step1: </div><div style="margin-left: 0.5in; margin-top: 0.08in;">The start state of NFA M<sub>N</sub> is the start state of DFA M<sub>D</sub>. So, add q<sub>0</sub>(which is the start state of NFA) to Q<sub>D</sub> and find the transitions from this state. The way to obtain different transitions is shown in step2.</div><div style="margin-top: 0.08in;">Step2: </div><div style="margin-left: 0.5in; margin-top: 0.08in;">For each state [q<sub>i</sub>, q<sub>j</sub>,….q<sub>k</sub>] in Q<sub>D</sub>, the transitions for each input symbol in <span style="font-family: Symbol,serif;">Σ</span> can be obtained as shown below:</div><ol><li><div style="margin-top: 0.08in;"><span style="font-family: Symbol,serif;">δ</span><sub>D</sub>([q<sub>i</sub>, q<sub>j</sub>,….q<sub>k</sub>], a) = <span style="font-family: Symbol,serif;">δ</span><sub>N</sub>(q<sub>i</sub>, a) U <span style="font-family: Symbol,serif;">δ</span><sub>N</sub>(q<sub>j</sub>, a) U ……<span style="font-family: Symbol,serif;">δ</span><sub>N</sub>(q<sub>k</sub>, a)</div></li>
</ol><div style="margin-top: 0.08in;"> = [q<sub>l</sub>, q<sub>m</sub>,….q<sub>n</sub>] say.</div><ol start="2"><li><div style="margin-top: 0.08in;">Add the state [q<sub>l</sub>, q<sub>m</sub>,….q<sub>n</sub>] to Q<sub>D</sub>, if it is not already in Q<sub>D</sub>.</div></li>
<li><div style="margin-top: 0.08in;">Add the transition from [q<sub>i</sub>, q<sub>j</sub>,….q<sub>k</sub>] to [q<sub>l</sub>, q<sub>m</sub>,….q<sub>n</sub>] on the input symbol <i>a</i> iff the state [q<sub>l</sub>, q<sub>m</sub>,….q<sub>n</sub>] is added to Q<sub>D</sub> in the previous step.</div></li>
</ol><div style="margin-top: 0.08in;">Step3: </div><div style="margin-left: 0.5in; margin-top: 0.08in;">The state [q<sub>a</sub>, q<sub>b</sub>,….q<sub>c</sub>] <span style="font-family: Symbol,serif;">∈</span> Q<sub>D</sub> is the final state, if at least one of the state in q<sub>a</sub>, q<sub>b</sub>, ….. q<sub>c</sub> <span style="font-family: Symbol,serif;">∈</span> A<sub>N</sub> i.e., at least one of the component in [q<sub>a</sub>, q<sub>b</sub>,….q<sub>c</sub>] should be the final state of NFA. </div><div style="margin-top: 0.08in;">Step4: </div><div style="margin-left: 0.5in; margin-top: 0.08in;">If epsilon (<span style="font-family: Symbol,serif;">∈</span>) is accepted by NFA, then start state q<sub>0</sub> of DFA is made the final state.</div></div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-72394141936956585002012-04-05T11:53:00.000+05:302012-04-05T11:59:13.807+05:30Obtain an NFA to accept the following language L = {w | w ∈ abab(power)n or aba(power)n where n >=0}<div dir="ltr" style="text-align: left;" trbidi="on"> <style type="text/css">
p { margin-bottom: 0.08in; }
</style> <br />
<div style="margin-bottom: 0in; margin-top: 0.08in;"><span style="font-size: xx-small;"><span style="font-size: x-small;">The machine to accept either abab</span><sup><span style="font-size: x-small;">n</span></sup><span style="font-size: x-small;"> or aba</span><sup><span style="font-size: x-small;">n</span></sup><span style="font-size: x-small;"> where n </span><span style="font-family: Symbol,serif;"><span style="font-size: x-small;"></span></span><span style="font-size: x-small;"> 0 is shown below:</span></span></div><div style="margin-bottom: 0in; margin-top: 0.08in;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZnJ1k7zlEbCB3Kip6jxxbkos5V40ntpQFsuhHqmmnSb2y1Jw7IyHZj9WPoMckrZ3M7VStqsDlhFuc9Wcb8zlRMxw9aSEKOWA2Ctm20M2UxCxuTq5xVr-yPWgFkc-s9Rb72HtTYVu0YQ7F/s1600/nfa-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZnJ1k7zlEbCB3Kip6jxxbkos5V40ntpQFsuhHqmmnSb2y1Jw7IyHZj9WPoMckrZ3M7VStqsDlhFuc9Wcb8zlRMxw9aSEKOWA2Ctm20M2UxCxuTq5xVr-yPWgFkc-s9Rb72HtTYVu0YQ7F/s1600/nfa-1.jpg" /></a></div><div style="margin-bottom: 0in; margin-top: 0.08in;"><br />
</div></div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-63132292318809353582012-04-05T11:50:00.000+05:302012-04-05T11:59:13.807+05:30Non deterministic finite automata(NFA)<div dir="ltr" style="text-align: left;" trbidi="on"> <style type="text/css">
p { margin-bottom: 0in; text-align: justify; }h3 { margin-bottom: 0.04in; }h3.western { font-family: "Arial",sans-serif; font-size: 13pt; }h3.cjk { font-family: "DejaVu Sans"; font-size: 13pt; }h3.ctl { font-family: "Arial",sans-serif; font-size: 13pt; }h3.style3-western { margin-top: 0in; margin-bottom: 0in; font-family: "Times New Roman",serif; font-size: 12pt; line-height: 150%; }h3.style3-cjk { margin-top: 0in; margin-bottom: 0in; font-family: "Batang","바탕"; font-size: 12pt; line-height: 150%; }h3.style3-ctl { margin-top: 0in; margin-bottom: 0in; font-family: "Arial",sans-serif; line-height: 150%; }
</style> <br />
<div style="margin-top: 0.08in;"><b>Definition</b>: An NFA is a 5-tuple or quintuple M = (Q, <span style="font-family: Symbol,serif;">Σ</span>, <span style="font-family: Symbol,serif;">δ</span>, q<sub>0</sub>, A) where</div><div style="margin-top: 0.08in;"> Q is non empty, finite set of states.</div><div style="margin-top: 0.08in;"> <span style="font-family: Symbol,serif;">Σ</span> is non empty, finite set of input alphabets.</div><div style="margin-left: 1in; margin-top: 0.08in;"><span style="font-family: Symbol,serif;">δ</span> is transition function which is a mapping from </div><div style="margin-left: 1in; margin-top: 0.08in;"> Q x {<span style="font-family: Symbol,serif;">Σ</span> U <b>ε</b>} to subsets of 2<sup>Q</sup>. This function shows </div><div style="margin-left: 1in; margin-top: 0.08in;"> the change of state from one state to a set of states </div><div style="margin-left: 1in; margin-top: 0.08in;"> based on the input symbol.</div><div align="LEFT" style="margin-top: 0.08in;"> q<sub>0</sub> <span style="font-family: Symbol,serif;">∈</span> Q is the start state.</div><div align="LEFT" style="margin-top: 0.08in;"> A <span style="font-family: Symbol,serif;">⊆</span> Q is set of final states.</div><h3 class="style3-western" style="line-height: 100%; margin-top: 0.08in;"> Acceptance of language</h3><div style="margin-top: 0.08in;"><b>Definition</b>: Let M = (Q, <span style="font-family: Symbol,serif;">Σ</span>, <span style="font-family: Symbol,serif;">δ</span>, q<sub>0</sub>, A) be a DFA where Q is set of finite states, <span style="font-family: Symbol,serif;">Σ</span> is set of input alphabets (from which a string can be formed), <span style="font-family: Symbol,serif;">δ</span> is transition function from Q x {<span style="font-family: Symbol,serif;">Σ</span>U<span style="font-family: Symbol,serif;"></span>} to 2<sup>Q</sup>, q<sub>0</sub> is the start state and A is the final or accepting state. The string (also called language) <i>w</i> accepted by an NFA can be defined in formal notation as:</div><br />
<br />
<div align="LEFT"> L(M) = { w | w <span style="font-family: Symbol,serif;">∈</span> <span style="font-family: Symbol,serif;">Σ</span>*and <span style="font-family: Symbol,serif;">δ</span>*(q<sub>0</sub>, w) = Q with atleast one </div><div align="LEFT"> Component of Q in A}</div></div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-73327019602820072982012-04-05T11:47:00.000+05:302012-04-05T11:59:13.808+05:30Regular language and Applications of Finite Automata<div dir="ltr" style="text-align: left;" trbidi="on"> <style type="text/css">
p { margin-bottom: 0in; text-align: justify; }h3 { margin-bottom: 0.04in; }h3.western { font-family: "Arial",sans-serif; font-size: 13pt; }h3.cjk { font-family: "DejaVu Sans"; font-size: 13pt; }h3.ctl { font-family: "Arial",sans-serif; font-size: 13pt; }h3.style3-western { margin-top: 0in; margin-bottom: 0in; font-family: "Times New Roman",serif; font-size: 12pt; line-height: 150%; }h3.style3-cjk { margin-top: 0in; margin-bottom: 0in; font-family: "Batang","바탕"; font-size: 12pt; line-height: 150%; }h3.style3-ctl { margin-top: 0in; margin-bottom: 0in; font-family: "Arial",sans-serif; line-height: 150%; }
</style> <br />
<div style="margin-top: 0.08in;"><b>Definition</b>: Let M = (Q, <span style="font-family: Symbol,serif;">Σ</span>, <span style="font-family: Symbol,serif;">δ</span>, q<sub>0</sub>, A) be a DFA. The language L is regular if there exists a machine M such that L = L(M). </div><h3 class="style3-western" style="line-height: 100%; margin-top: 0.08in;"> * Applications of Finite Automata *</h3><div style="margin-top: 0.08in;"><b>String matching/processing</b></div><div style="margin-top: 0.08in;"><b>Compiler Construction</b></div><div style="margin-top: 0.08in;">The various compilers such as C/C++, Pascal, Fortran or any other compiler is designed using the finite automata. The DFAs are extensively used in the building the various phases of compiler such as </div><ul><li><div style="margin-top: 0.08in;">Lexical analysis (To identify the tokens, identifiers, to strip of the comments etc.)</div></li>
<li><div style="margin-top: 0.08in;">Syntax analysis (To check the syntax of each statement or control statement used in the program)</div></li>
<li><div style="margin-top: 0.08in;">Code optimization (To remove the un wanted code)</div></li>
<li><div style="margin-top: 0.08in;">Code generation (To generate the machine code)</div></li>
</ul><br />
<br />
<div align="LEFT" style="margin-top: 0.08in;">Other applications</div><div style="margin-top: 0.08in; text-indent: 0.25in;">The concept of finite automata is used in wide applications. It is not possible to list all the applications as there are infinite number of applications. This section lists some applications:</div><ol><li><div align="JUSTIFY" style="margin-top: 0.08in;">Large natural vocabularies can be described using finite automaton which includes the applications such as spelling checkers and advisers, multi-language dictionaries, to indent the documents, in calculators to evaluate complex expressions based on the priority of an operator etc. to name a few. Any editor that we use uses finite automaton for implementation.</div></li>
<li><div align="JUSTIFY" style="margin-top: 0.08in;">Finite automaton is very useful in recognizing difficult problems i.e., sometimes it is very essential to solve an un-decidable problem. Even though there is no general solution exists for the specified problem, using theory of computation, we can find the approximate solutions. </div></li>
<li><div align="JUSTIFY" style="margin-top: 0.08in;">Finite automaton is very useful in hardware design such as circuit verification, in design of the hardware board (mother board or any other hardware unit), automatic traffic signals, radio controlled toys, elevators, automatic sensors, remote sensing or controller etc.</div></li>
<li><div align="JUSTIFY" style="margin-top: 0.08in;">In game theory and games wherein we use some control characters to fight against a monster, economics, computer graphics, linguistics etc., finite automaton plays a very important role.</div></li>
</ol></div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-84707085981255617342012-04-05T11:42:00.000+05:302012-04-05T11:59:13.808+05:30DFA Examples<div dir="ltr" style="text-align: left;" trbidi="on"> <style type="text/css">
</style><br />
<style type="text/css">
<style type="text/css">h6 { margin-bottom: 0.04in; page-break-after: auto; }h6.western { font-family: "Liberation Serif",serif; font-size: 11pt; }h6.cjk { font-family: "DejaVu Sans"; font-size: 11pt; }h6.ctl { font-family: "DejaVu Sans"; font-size: 11pt; }p { margin-bottom: 0.08in; }
</style>
<h6 class="western">Draw a DFA to accept string of 0’s and 1’s
ending with the string 011.</h6><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDHRIiX3aNUUA2SNylGpqWpadkkhQ-v994zjiVHdexykSNbkHXmXxEhAB9IShjgGivXbAsmAcmguPOogpzAfkCKyk6zs6J6v_-wz6CQAxG4UYFk3gwnpGs2qdiuF6O1Q78IR6pZ_BR19YN/s1600/dfa-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDHRIiX3aNUUA2SNylGpqWpadkkhQ-v994zjiVHdexykSNbkHXmXxEhAB9IShjgGivXbAsmAcmguPOogpzAfkCKyk6zs6J6v_-wz6CQAxG4UYFk3gwnpGs2qdiuF6O1Q78IR6pZ_BR19YN/s1600/dfa-2.jpg" /></a> </div><div class="separator" style="clear: both; text-align: center;">
<style type="text/css">
h6 { margin-bottom: 0.04in; page-break-after: auto; }h6.western { font-family: "Liberation Serif",serif; font-size: 11pt; }h6.cjk { font-family: "DejaVu Sans"; font-size: 11pt; }h6.ctl { font-family: "DejaVu Sans"; font-size: 11pt; }p { margin-bottom: 0.08in; }
</style>
</div><h6 class="western">Obtain a DFA to accept strings of a’s and b’s
having a sub string aa</h6><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrJeBfUJUlmLSxUv-gvDaKPZP_HxOwIetzY-OCBAHHVxQJ6LMZkr3lIBv_nSGCW7nBQ5Lintk0zi4wOr9w0b_Cpc6oML6ILRA8enbKZnwzv5-NUJhVc-wkifKFMK4X2aQy_1RXgUdrp14/s1600/dfa-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrJeBfUJUlmLSxUv-gvDaKPZP_HxOwIetzY-OCBAHHVxQJ6LMZkr3lIBv_nSGCW7nBQ5Lintk0zi4wOr9w0b_Cpc6oML6ILRA8enbKZnwzv5-NUJhVc-wkifKFMK4X2aQy_1RXgUdrp14/s1600/dfa-3.jpg" /></a></div><h6 class="western">
<style type="text/css">
h6 { margin-bottom: 0.04in; page-break-after: auto; }h6.western { font-family: "Liberation Serif",serif; font-size: 11pt; }h6.cjk { font-family: "DejaVu Sans"; font-size: 11pt; }h6.ctl { font-family: "DejaVu Sans"; font-size: 11pt; }p { margin-bottom: 0.08in; }
</style>
</h6><h6 class="western">Obtain a DFA to accept strings of a’s and b’s
except those containing the substring aab.</h6><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKlOKgi9rmqTv8e8mLhMtRLllTNIlqZP_VDgv4_hZnGhqwdAYFk8VJHIf9yx9hCWjxKee7K3nmtpIjjYz2jZjwxHZ8s_maeQJ67kUK6h1861lS5iojnv1XVvJcAuZ43jswk6ZkyzOAfLMb/s1600/dfa-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKlOKgi9rmqTv8e8mLhMtRLllTNIlqZP_VDgv4_hZnGhqwdAYFk8VJHIf9yx9hCWjxKee7K3nmtpIjjYz2jZjwxHZ8s_maeQJ67kUK6h1861lS5iojnv1XVvJcAuZ43jswk6ZkyzOAfLMb/s1600/dfa-4.jpg" /></a></div><h6 class="western"> </h6>
<style type="text/css">
h6 { margin-bottom: 0.04in; page-break-after: auto; }h6.western { font-family: "Liberation Serif",serif; font-size: 11pt; }h6.cjk { font-family: "DejaVu Sans"; font-size: 11pt; }h6.ctl { font-family: "DejaVu Sans"; font-size: 11pt; }p { margin-bottom: 0.08in; }
</style>
<h6 class="western">Obtain a DFA to accept strings of a’s and b’s
having even number of a’s and b’s</h6><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRt61CEwyEObtonZL6ernLjJrlfaANmt6evjnZeBqjhCUIFMeZ6XEpKesdfApvbalWF5Kn6mbWxiiI5CkWuoV4Ceq6I53VYjfcd-avm0CMDLxHHMWWbg7xFZ-aBLE5ekjitLLkc2Ihi0F4/s1600/dfa-5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRt61CEwyEObtonZL6ernLjJrlfaANmt6evjnZeBqjhCUIFMeZ6XEpKesdfApvbalWF5Kn6mbWxiiI5CkWuoV4Ceq6I53VYjfcd-avm0CMDLxHHMWWbg7xFZ-aBLE5ekjitLLkc2Ihi0F4/s1600/dfa-5.jpg" /></a></div><h6 class="western"> </h6>
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0tag:blogger.com,1999:blog-5712790273933037367.post-70691677982924551452012-04-05T11:28:00.001+05:302012-04-05T11:59:13.808+05:30DFA to accept strings of a’s and b’s starting with the string ab<div dir="ltr" style="text-align: left;" trbidi="on"><style type="text/css">
p { margin-bottom: 0in; text-align: justify; }h6 { margin-bottom: 0.04in; page-break-after: auto; }h6.western { font-family: "Liberation Serif",serif; font-size: 11pt; }h6.cjk { font-family: "DejaVu Sans"; font-size: 11pt; }h6.ctl { font-family: "DejaVu Sans"; font-size: 11pt; }
</style> <br />
<h6 class="western">Obtain a DFA to accept strings of a’s and b’s starting with the string ab </h6><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQje_8_IgsSLVsBrvvepEwXFZLPK5BeRB6yLwjSQ6GkPuT2fq0ItPwjp0HoeTsjluisYFfH5sGq1UfJe5pZ_Hnsqjzf7TbQbYBP8sIiyVWxEUusTSUpfUI-bi0WR3npHkVM7N1z0QXSbV/s1600/dfa-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQje_8_IgsSLVsBrvvepEwXFZLPK5BeRB6yLwjSQ6GkPuT2fq0ItPwjp0HoeTsjluisYFfH5sGq1UfJe5pZ_Hnsqjzf7TbQbYBP8sIiyVWxEUusTSUpfUI-bi0WR3npHkVM7N1z0QXSbV/s1600/dfa-1.jpg" /></a></div><br />
<div align="CENTER"><b></b><b> Transition diagram to accept string ab(a+b)*</b></div><br />
<br />
So, the DFA which accepts strings of a’s and b’s starting with the string <i>ab </i>is given by M = (Q, <span style="font-family: Symbol,serif;">Σ</span> , <span style="font-family: Symbol,serif;">δ</span>, q<sub>0</sub>, A) where<br />
<div align="LEFT">Q = {q<sub>0</sub>, q<sub>1</sub>, q<sub>2</sub>, q<sub>3</sub>}</div><div align="LEFT"><span style="font-family: Symbol,serif;">Σ</span> = {a, b}</div><div align="LEFT">q<sub>0</sub> is the start state</div><div align="LEFT">A = {q<sub>2</sub>}.</div><div align="LEFT">q3=Dead State</div><div lang=""><br />
</div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>Kalikinkar Dashttp://www.blogger.com/profile/08036776819452105313noreply@blogger.com0