GATE-CS-2007 (original) (raw)

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

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 */

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?

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

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:

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:

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

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.

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?

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?

There are 85 questions to complete.

Take a part in the ongoing discussion