GATE 2015 (Session 2)
64 questions
MCQ 42 · NAT 221-mark 29 · 2-mark 35
Questions 31–35 of 64
With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query:
"Get all records with a search key greater than or equal to 7 and less than 15"
is ____________.
"Get all records with a search key greater than or equal to 7 and less than 15"
is ____________.
Answer: 5
Look up key 7: start at the root (9) go to the left internal node (5) reach the leaf [5, 7].
Next, move along the leaf links to [9, 11] and then [13, 15]. The key 15 tells us to stop here.
Nodes fetched = root + 1 internal + 3 leaves = 5
Answer: 5
Next, move along the leaf links to [9, 11] and then [13, 15]. The key 15 tells us to stop here.
Nodes fetched = root + 1 internal + 3 leaves = 5
Answer: 5
Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIx socket API.
Answer: (B)
On the server: first socket, then bind (links the address), listen (makes the socket passive), accept (takes one connection), and recv (reads the data).
Answer: bind, listen, accept, recv
Answer: bind, listen, accept, recv
A link has a transmission speed of bits/sec. It uses data packets of size 1000 bytes each. Assume that the acknowledgment has negligible transmission delay, and that its propagation delay is the same as the data propagation delay. Also assume that the processing delays at nodes are negligible. The efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of the one-way propagation delay (in milliseconds) is ________.
Answer: 12
Transmission time:
ms.
Efficiency and propagation delay:
ms
Answer: 12
ms.
Efficiency and propagation delay:
ms
Answer: 12
Which one of the following statements is NOT correct about HTTP cookies?
Answer: (A)
A cookie is a small amount of data (text in name-value form) that the browser keeps. It is not code that can run.
The other statements are true. A cookie arrives through the Set-Cookie HTTP header. It has an expiry time. It can also be used to track how a user browses a site.
Answer: A cookie is a piece of code that has the potential to compromise security
The other statements are true. A cookie arrives through the Set-Cookie HTTP header. It has an expiry time. It can also be used to track how a user browses a site.
Answer: A cookie is a piece of code that has the potential to compromise security
Consider the following routing table at an IP router:
For each IP address in Group I identify the correct choice of the next hop from Group II using the entries from the routing table above.
For each IP address in Group I identify the correct choice of the next hop from Group II using the entries from the routing table above.
Answer: (A)
Take the AND of each address with the mask, then pick the longest match:
- i) 171 AND 254 = 170 Interface 0 (a)
- ii) 167 AND 254 = 166 R2 (c)
- iii) 163: with /23 the result is 162, with /22 the result is 160, so nothing matches default R4 (e)
- iv) 165: with /23 the result is 164 (but no /23 entry exists), with /22 the result is 164 R3 (d)
Answer: i-a, ii-c, iii-e, iv-d
- i) 171 AND 254 = 170 Interface 0 (a)
- ii) 167 AND 254 = 166 R2 (c)
- iii) 163: with /23 the result is 162, with /22 the result is 160, so nothing matches default R4 (e)
- iv) 165: with /23 the result is 164 (but no /23 entry exists), with /22 the result is 164 R3 (d)
Answer: i-a, ii-c, iii-e, iv-d