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?

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

  • User level threads do not need any hardware support.

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

  • 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 */
  • It does not ensure mutual exclusion.

  • It does not ensure bounded waiting.

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

  • 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?

  • (1-p)(n-1)

  • np(1-p)(n-1)

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

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

Question 4

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

  • Half the baud rate.

  • Twice the baud rate.

  • Same as the baud rate.

  • 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:
 

  • 500 metres of cable.
     

  • 200 metres of cable.
     

  • 20 metres of cable.
     

  • 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:

  • 11001001000

  • 11001001011

  • 11001010

  • 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

  • B

  • C

  • 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.

  • CEIL(logn) + 2

  • n

  • CEIL(logn)

  • 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?

  • 3

  • 2.1875

  • 2.25

  • 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?

  • 0, 10, 110, 1110, 11110, 11111

  • 11, 10, 011, 010, 001, 000

  • 11, 10, 01, 001, 0001, 0000

  • 110, 100, 010, 000, 001, 111

Tags:

There are 85 questions to complete.

Take a part in the ongoing discussion