Thursday, 22 September 2016

CBSE UGC NET Computer Science Paper II August 2016 (Re-test) - Part 4

31.       The number of strings of length 4 that are generated by the regular expression (0+1+|2+3+)*, where | is an alternation character and {+, *} are quantification characters, is:
(A) 08     (B) 09
(C) 10     (D) 12
Answer: C
32.       The content of the accumulator after the execution of the following 8085 assembly language program, is
MVI A, 35H
MOV B, A
STC
CMC
RAR
XRA B
(A) 00H              (B) 35H
(C) EFH             (D) 2FH
Answer: D
33.       In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction?
(A) Replace P + P by 2 * P or Replace 3 + 4 by 7.
(B) Replace P * 32 by P<<5
(C) Replace P * 0 by 0
(D) Replace (P<<4) – P by P * 15
Answer: B
34.       Which of the following are the principles tasks of the linker?
I. Resolve external references among separately compiled program units.
II. Translate assembly language to machine code.
III. Relocate code and data relative to the beginning of the program.
IV. Enforce access-control restrictions on system libraries.
(A) I and II         (B) I and III
(C) II and III       (D) I and IV
Answer: B
35.       Which of the following is FALSE?
(A) The grammar S→aS|aSbS|Î, where S is the only non-terminal symbol, and Î is the null string, is ambiguous.
(B) An unambiguous grammar has same left most and right most derivation.
(C) An ambiguous grammar can never be LR(k) for any k.
(D) Recursive descent parser is a top-down parser.
Answer: B

36.       Consider a system with seven processes A through G and six resources R through W.
Resource ownership is as follows:
process A holds R and wants T
process B holds nothing but wants T
process C holds nothing but wants S
process D holds U and wants S & T
process E holds T and wants V
process F holds W and wants S
process G holds V and wants U
Is the system deadlocked ? If yes, ............. processes are deadlocked.
(A) No                            (B) Yes, A, B, C
(C) Yes, D, E, G           (D) Yes, A, B, F
Answer: C
37.       Suppose that the virtual Address space has eight pages and physical memory with four page frames. If LRU page replacement algorithm is used, .............. number of page faults occur with the reference string.
0 2 1 3 5 4 6 3 7 4 7 3 3 5 5 3 1 1 1 7 2 3 4 1
(A) 11     (B) 12
(C) 10     (D) 9
Answer: A
38.       Consider a system having ‘m’ resources of the same type. These resources are shared by three processes P1, P2 and P3 which have peak demands of 2, 5 and 7 resources respectively. For what value of ‘m’ deadlock will not occur?
(A) 70     (B) 14
(C) 13     (D) 7
Answer: B
39.       Five jobs A, B, C, D and E are waiting in Ready Queue. Their expected runtimes are 9, 6, 3, 5 and x respectively. All jobs entered in Ready queue at time zero. They must run in ............. order to minimize average response time if 3 < x < 5.
(A) B, A, D, E, C           (B) C, E, D, B, A
(C) E, D, C, B, A           (D) C, B, A, E, D
Answer: B
40.    Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing Shortest Remaining Time first (pre-emptive scheduling) algorithm, then .............. context switches are required (suppose context switch at the beginning of Ready queue and at the end of Ready queue are not counted).
(A) 3       (B) 2
(C) 4       (D) 5
Answer: A

Pages   2   3   4   5 

0 comments:

Post a Comment

UGC NET Computer Science

Computer GK App