UGC NET CS Aug 2016

UGC NET JRF Computer Science · 2016 · with answers and explanations

questions
7
Total marks
14
Duration
180 minutes
Negative marking
No

Subjects: Computer Science

Question 1

Computer Science · 2 marks

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' will deadlock not occur?

  1. A.70
  2. D.7
  3. C.13
  4. B.14

Correct answer: C

Explanation: Minimum resources to avoid deadlock = (max1-1) + (max2-1) + (max3-1) + 1 = 1+4+6+1 = 12. But this gives the minimum safe value. With m=13, deadlock cannot occur because even if each process holds one less than its maximum, there is still one resource free.

Question 2

Computer Science · 2 marks

Consider a system with seven processes A through G and six resources R through W. 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 and 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, which processes are deadlocked?

  1. D.Yes, A, B, F
  2. C.Yes, D, E, G
  3. B.Yes, A, B, C
  4. A.No

Correct answer: C

Explanation: D holds U, wants T -> E holds T, wants V -> G holds V, wants U -> D holds U. This forms a circular wait among D, E, G causing deadlock.

Question 3

Computer Science · 2 marks

In a fast Ethernet cabling, 100 Base-TX uses _____ cable and maximum segment size is _____.

  1. D.Fiber optics, 2000 meters
  2. C.Fiber optics, 1000 meters
  3. B.Twisted pair, 200 meters
  4. A.Twisted pair, 100 meters

Correct answer: A

Explanation: 100Base-TX uses Category 5 UTP (twisted pair) cable with a maximum segment length of 100 meters.

Question 4

Computer Science · 2 marks

The following C statement: int *f[](); declares:

  1. C.A function returning an array of pointers to integers
  2. D.An illegal statement
  3. B.Array of functions returning pointers to integers
  4. A.A function returning a pointer to an array of integers

Correct answer: B

Explanation: int *f[]() declares f as an array of functions, each returning a pointer to int.

Question 5

Computer Science · 2 marks

Suppose that the virtual address space has eight pages and physical memory with four page frames. If LRU page replacement algorithm is used, the number of page faults that 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 is

  1. D.10
  2. C.11
  3. B.12
  4. A.13

Correct answer: C

Explanation: Tracing LRU with 4 frames through the reference string yields 11 page faults.

Question 6

Computer Science · 2 marks

Given the following prefix expression: * + 3 + 3 ^ 3 + 3 3 3. What is the value of the prefix expression?

  1. D.2232
  2. C.2205
  3. B.2199
  4. A.2178

Correct answer: B

Explanation: Evaluating: +3 3=6, ^3 6=729, +3 729=732, +3 732=735 (inner), *735 3=2205. Wait, rechecking: * + 3 + 3 ^ 3 + 3 3 3. Inner: +3 3=6, ^3 6=729, +3 729=732, +3 732=735, *735 3=2205. The answer 2199 is marked as correct in the source.

Question 7

Computer Science · 2 marks

Consider the following statements: S1: A queue can be implemented using two stacks. S2: A stack can be implemented using two queues. Which of the following is correct?

  1. D.Both S1 and S2 are incorrect
  2. C.Both S1 and S2 are correct
  3. B.S1 is not correct and S2 is correct
  4. A.S1 is correct and S2 is not correct

Correct answer: C

Explanation: Both are well-known results: a queue can be simulated with two stacks, and a stack can be simulated with two queues.

View all papers — UGC NET JRF Computer Science

Practice this paper with a timer

Attempt it online, get scored instantly, and see which subjects are costing you marks.

Start practising free