GATE-CS-2007

Last Updated :
Discuss
Comments

Question 1

Consider the following statements about user level threads and kernel level threads. Which one of the following statement is FALSE?

  • A

    Context switch time is longer for kernel level threads than for user level threads.

  • B

    User level threads do not need any hardware support.

  • C

    Related kernel level threads can be scheduled on different processors in a multi-processor system.

  • D

    Blocking one kernel level thread blocks all related threads.

Question 2

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:Here, wants1 and wants2 are shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?v

  /* P1 */
while (true) {
wants1 = true;
while (wants2 == true);
/* Critical
Section */
wants1=false;
}
/* Remainder section */


/* P2 */
while (true) {
wants2 = true;
while (wants1==true);
/* Critical
Section */
wants2 = false;
}
/* Remainder section */
  • A

    It does not ensure mutual exclusion.

  • B

    It does not ensure bounded waiting.

  • C

    It requires that processes enter the critical section in strict alternation.

  • D

    It does not prevent deadlocks, but ensures mutual exclusion.

Question 3

There are n stations in a slotted LAN. Each station attempts to transmit with a probability p in each time slot. What is the probability that ONLY one station transmits in a given time slot?

  • A

    (1-p)(n-1)

  • B

    np(1-p)(n-1)

  • C

    p(1-p)(n-1)

  • D

    1-(1-p)(n-1)

Question 4

In Ethernet when Manchester encoding is used, the bit rate is:

  • A

    Half the baud rate.

  • B

    Twice the baud rate.

  • C

    Same as the baud rate.

  • D

    None of the above

Question 5

In a token ring network the transmission speed is 10^7 bps and the propagation speed is 200 meters/micro second. The 1-bit delay in this network is equivalent to:
 

  • A

    500 metres of cable.
     

  • B

    200 metres of cable.
     

  • C

    20 metres of cable.
     

  • D

    50 metres of cable.
     

Question 6

The message 11001001 is to be transmitted using the CRC polynomial x3 + 1 to protect it from errors. The message that should be transmitted is:

  • A

    11001001000

  • B

    11001001011

  • C

    11001010

  • D

    110010010011

Question 7

The distance between two stations M and N is L kilometers. All frames are K bits long. The propagation delay per kilometer is t seconds. Let R bits/second be the channel capacity. Assuming that processing delay is negligible, the minimum number of bits for the sequence number field in a frame for maximum utilization, when the sliding window protocolis used, is:

GATECS200770

  • A

    A

  • B

    B

  • C

    C

  • D

    D

Question 8

Consider the following segment of C-code:

  int j, n;
j = 1;
while (j <= n)
j = j*2;

The number of comparisons made in the execution of the loop for any n > 0 is: Base of Log is 2 in all options.

  • A

    CEIL(logn) + 2

  • B

    n

  • C

    CEIL(logn)

  • D

    FLOOR(logn) + 2

Question 9

Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. What is the average length of Huffman codes?

  • A

    3

  • B

    2.1875

  • C

    2.25

  • D

    1.9375

Question 10

Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. Which of the following is the Huffman code for the letter a, b, c, d, e, f?

  • A

    0, 10, 110, 1110, 11110, 11111

  • B

    11, 10, 011, 010, 001, 000

  • C

    11, 10, 01, 001, 0001, 0000

  • D

    110, 100, 010, 000, 001, 111

Tags:

There are 85 questions to complete.

Take a part in the ongoing discussion