NET JUNE 2014 PAPER -2 SOLVED PART 4


PAGES 1 2 3 4 5


  1. In a paged memory management algorithm, the hit ratio is 70%. If it takes 30 nanoseconds to search Translation Look-aside Buffer (TLB) and 100 nanoseconds (ns) to access memory, the effective memory access time is

(A) 91 ns (B) 69 ns

(C) 200 ns (D) 160 ns

Answer: D


  1. Match the following:

List-I List-II

  1. Multilevel feedback queue i. Time-slicing
  2. FCFS ii. Criteria to move processes between queues
  3. Shortest process next iii. Batch processing
  4. Round Robin Scheduling iv. Exponential Smoothening

Codes:

a b c d

(A) i iii ii iv

(B) iv iii ii i

(C) iii i iv i

(D) ii iii iv i

Answer: B


  1. Consider a system with five processes P0 through P4 and three resource types R1, R2 and R3. Resource type R1 has 10 instances, R2 has 5 instances and R3 has 7 instances. Suppose that at time T0, the following snapshot of the system has been taken :

Allocation

R1 R2 R3

P0 0 1 0

P1 2 0 0

P2 3 0 2

P3 2 1 1

P4 0 2 2

Max

R1 R2 R3

7 5 3

3 2 2

9 0 2

2 2 2

4 3 3

Available

R1 R2 R3

3 3 2

Assume that now the process P1 requests one additional instance of type R1 and two instances of resource type R3. The state resulting after this allocation will be

(A) Ready State (B) Safe State

(C) Blocked State (D) Unsafe State

Answer: B


  1. Match the following:

List-I List-II

  1. Contiguous Allocation i. This scheme supports very large file sizes.
  2. Linked allocation ii. This allocation technique supports only sequential files.
  3. Indexed allocation iii. Number of disks required to access file is minimal.
  4. Multi-level indexed iv. This technique suffers from maximum wastage of space in storing pointers

Codes:

a b c d

(A) iii iv ii i

(B) iii ii iv i

(C) i ii iv iii

(D) i iv ii iii

Answer: B


  1. Which of the following out commands will output “onetwothree”?

(A) for val; do echo-n $val; done < one two three

(B) for one two three; do echo-n-; done

(C) for n in one two three; do echo-n $n; done

(D) for n in one two three {echo-n $n}

Answer: C


  1. Merge sort makes two recursive calls. Which statement is true after these two recursive calls finish, but before the merge step?

(A) The array elements from a heap

(B) Elements in each half of the array are sorted amongst themselves.

(C) Elements in the first half of the array are less than or equal to elements in second half of the array

(D) All of the above

Answer: B


  1. A text is made up of the characters α, β, γ, δ and σ with the probability 0.12, 0.40,0.15, 0.08 and 0.25 respectively. The optimal coding technique will have the average length of

(A) 1.7 (B) 2.15

(C) 3.4 (D) 3.8

Answer: B


  1. Searching for an element in the hash table requires O(1) time for the …………… time, whereas for direct addressing it holds for the …………. time.

(A) worst-case, average

(B) worst-case, worst-case

(C) average, worst-case

(D) best, average

Answer: C


  1. An algorithm is made up of 2 modules M1 and M2. If time complexity of modules M1 and M2 are h(n) and g(n) respectively, the time complexity of the algorithm is

(A) min (h(n),g(n))

(B) max (h(n),g(n))

(C) h(n) + g(n)

(D) h(n) * g(n)

Answer: B

Explanation:

Three cases are possible with f(n) and g(n),

Case (i) : f(n) > g(n)

In this case we take O(f(n)) the complexity of the algorithm as g(n) is a lower order term, we drop it.

Case (ii) : f(n) < g(n)

In this case we take O(g(n)) the complexity of the algorithm as f(n) is a lower order term, we drop it.

Case (iii) : f(n) = g(n)

Time Complexity can be either O(g(n)) or O(f(n)) (which is equal asympotically).


  1. What is the maximum number of parenthesis that will appear on the stack at any one time for parenthesis expression given by

( () (()) (()) )

(A) 2 (B) 3

(C) 4 (D) 5

Answer: B


PAGES 1 2 3 4 5


Leave a comment