Home / GATE 2017-2018 / GATE CSE :: Practice Test Paper 1

GATE 2017-2018 :: GATE CSE

  1. In the IPv4 addressing format, the number of networks allowed under Class C addresses is
  2. A.
    214
    B.
    27
    C.
    221
    D.
    224

  3. Which of the following problems are decidable? 
    1) Does a given program ever produce an output? 
    2) If L is a context-free language, then, is  also context-free? 
    3) If L is a regular language, then, is  also regular? 
    4) If L is a recursive language, then, is  also recursive?
  4. A.
    1, 2, 3, 4
    B.
    1, 2
    C.
    2, 3, 4
    D.
    3, 4

  5. Given the language L = {ab, aa, baa}, which of the following strings are in L*? 
    1) abaabaaabaa 
    2) aaaabaaaa 
    3) baaaaabaaaab 
    4) baaaaabaa
  6. A.
    1, 2 and 3
    B.
    2, 3 and 4
    C.
    1, 2 and 4
    D.
    1, 3 and 4

  7. Which of the following graphs is isomorphic to

  8. A.
    .

    B.
    .

    C.
    .

    D.
    .


  9. Consider the following transactions with data items P and Q initialized to zero:

    Any non-serial interleaving of T1 and T2 for concurrent execution leads to
  10. A.
    a serializable schedule
    B.
    a schedule that is not conflict serializable
    C.
    a conflict serializable schedule
    D.
    a schedule for which a precedence graph cannot be drawn

  11. The bisection method is applied to compute a zero of the function f(x) = x4 - x3 - x2 - 4 in the interval [1,9]. The method converges to a solution after “““““ iterations.
  12. A.
    1
    B.
    3
    C.
    5
    D.
    7

  13. What is the minimal form of the Karnaugh map shown below? Assume that X denotes a don't care term.

  14. A.
    .

    B.
    .

    C.
    .

    D.
    .


  15. Consider the 3 processes, P1, P2 and P3 shown in the table.

    The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
  16. A.
    FCFS: P1, P2, P3 RR2: P1, P2, P3
    B.
    FCFS: P1, P3, P2 RR2: P1, P3, P2
    C.
    FCFS: P1, P2, P3 RR2: P1, P3, P2
    D.
    FCFS: P1, P3, P2 RR2: P1, P2, P3

  17. Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudo code shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.

    AcquireLock(L){
    while (Fetch_And_Add(L,1))
    L = 1;
    }
    ReleaseLock(L){
    L = 0;
    }
    This implementation
  18. A.
    fails as L can overflow
    B.
    fails as L can take on a non-zero value when the lock is actually available
    C.
    works correctly but may starve some processes
    D.
    works correctly without starvation

  19. Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6?
  20. A.
    10/21
    B.
    5/12
    C.
    2/3
    D.
    1/6