Javatpoint Logo
Javatpoint Logo

GATE 2017 CS Set 1

25) Consider a two-level cache hierarchy L1 and L2 caches. An application incurs 1.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache 0.1, the L2 cache experience on average of 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is ______________.

  1. 0.05
  2. 0.06
  3. 0.07
  4. 0.08

Answer: A

Explanation:

Given,
1 instruction takes = 1.4 memory access (ma)
miss rate for L1 cache = 0.1
So, for 1000 instruction an application will take = 1000 * 1.4 = 1400 ma
We know miss rate = no. of misses/total no. of ma
so, 0.1= no. of misses / 1400
thus, no. of misses of L1 cache = 140

Now, we have to calculate the miss rate of L2
miss rate of L2 = 7
total no. of ma = 140
so, miss rate for l2 cache to two decimal places is = 7 / 140 = 0.05

Therefore option (A) is the correct answer.


26) Let G = (V, E) be any connected undirected edge-weighted graph. The weights of the edges in E are positive any distinct. Consider the following statements:

   I. Minimum Spanning Tree of G is always unique.
   II. Shortest path between any two vertices of G is always unique.

Which of the above statements is/are necessarily true?

  1. I only
  2. II only
  3. both I and II
  4. neither I and II

Answer: A

Explanation:

According to the definition of minimum spanning tree of a graph, we know that the minimum spanning tree of a graph is always unique if all the edges are unique.

The second statement is incorrect because a graph may contain more that one shortest path.

Therefore option (A) is the correct answer.


27) A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock l without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are:

  1. x = 1, y = 2
  2. x = 2, y = 1
  3. x = 2, y = 2
  4. x = 1, y = 1

Answer: D

Explanation:

In computer science, Reentrant (Recursive) locks is a particular type of mutual exclusion (mutex) device that allows a thread to reacquire the lock. That means same process/thread can claim the lock multiple times without causing a deadlock.

Non-reentrant (Non-recursive) lock does not allow a thread to reacquire the lock. That means same process/thread cannot claim the lock multiple times without releasing it. So, if a thread/process is unable to acquire an already owned lock, will get blocked. This situation is deadlocked.

Hence, if process/thread try to reacquire lock, then only one thread and only one lock can cause deadlock.

Therefore option (D) is the correct answer.


28) The value of the given expression

lim x7-2x5+1/x3-3x2+2
x->1

  1. 0
  2. -1
  3. 1
  4. Does not exist

Answer: C

Explanation:

If we put x = 1 then we get 0 / 0 which is indeterminate.

Now, we applying here L'Hospital rule and differentiate the give function w.r.t x. Wwe get,
lim 7x6 - 10x4 / 3x2 - 6x
x->1
Putting x = 1, we get
= -3 / -3 = 1

Therefore option (C) is the correct answer.


29) Let p, q, and r be the propositions and the expression (p -> q) -> r be a contradiction. Then, the expression (r -> p)-> q is

  1. a tautology
  2. a contradiction
  3. always TRUE when p is FALSE
  4. always TRUE when q is TRUE

Answer: D

Explanation:

Given,
    ( p → q ) → r is a contradiction so r = False and ( p → q ) = True

Now,
    ( r → p ) → q ------> eq.1

As we know that (F → p) is always true. So,
   ( r → p ) = T Since, r = False

Then, put the value of ( r → p ) in eq.1. We get,
   T → q which is True when q is True,

Hence option (D) is the correct answer.


30) Let u and v be two vectors in R2 whose Euclidean norms satisfy |u| = 2|v|. What is the value α such that w = u + αv bisects the angle between u and v?

  1. 2
  2. 1/2
  3. 1
  4. -1/2

Answer: A

Explanation:

If we find two vectors with equal magnitude in the direction of given vectors, then their sum will bisect the angle between them.

Given, |u| = 2|v| = |2v|
Since, u and 2v are vectors of the same length in directions of u and v, so their sum u+2v bisects the angle.
∴ In the vector w = u + αv = u + 2v
∴ We choose α = 2

Hence option (A) is the correct answer.


31) Let A be n×n real valued square symmetric matrix of rank 2 with expression given below.

Gate 2017 CS set 1 Aij2 = 50

Consider the following statements

   (i) One eigenvalue must be in [-5, 5].
   (ii) The eigenvalue with the largest magnitude must be strictly greater than 5.

Which of the above statements about engenvalues of A is/are necessarily CORRECT?

  1. Both (i) and (ii)
  2. (i) only
  3. (ii) only
  4. Neither (i) nor (ii)

Answer: B

Explanation:

Rank of An⋆n = 2, which means n-2 eigen values are zero.
Let λ1, λ2, 0, 0 be the eigen values.

Now, We know that
Gate 2017 CS set 1Aij2 = Trace of (AAT) = Trace of A2 (A is symmetric)

= λ21+ λ22 + 0 + 0 + 0 ..... + 0 ........ (1)

As given,
Gate 2017 CS set 1Aij2 = 50 ........ (2)

From 1 and 2, λ2122 = 50

So we can say that at least one eigen value lies between [-5,5]
i.e. λ1= -5 or +5 , λ2 = -5 or +5. Hence statement 1 is true. Therefore option (B) is the correct answer.


32) A computer network uses polynomial over GF(2) for error checking with 8 bits as information bits and uses x3 + x + 1 as the generator polynomial to generate the check bits. In this network, the message 01011011 is transmitted as:

  1. 01011011010
  2. 01011011011
  3. 01011011101
  4. 01011011100

Answer: C

Explanation:

Generator: x3 + 0. x2 + x + 1
                   1       0        1     1

Since degree of generator = 3. So 3 redundant bit will be added to the data.
So, data will be 01011011000
Now, dividing 01011011000 with 1011 gives remainder 101. The remainder will be added to the LSB of the original message, that should be transmitted to the receiver.
Therefore, transmitted message = 01011011000 + 1011 = 01011011101
Hence option (C) is the correct answer.


GATE 2017 CS Set 1-1
GATE 2017 CS Set 1-2
GATE 2017 CS Set 1-3
GATE 2017 CS Set 1-5
GATE 2017 CS Set 1-6
GATE 2017 CS Set 1-7
GATE 2017 CS Set 1-8






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA