GATE 2014 (Session 2)
65 questions
MCQ 42 · NAT 231-mark 30 · 2-mark 35
Questions 36–40 of 65
Consider the store and forward packet switched network given below. Assume that the bandwidth of each link is bytes / sec. A user on host A sends a file of size bytes to host B through routers R1 and R2 in three different ways. In the first case a single packet containing the complete file is transmitted from A to B. In the second case, the file is split into 10 equal parts, and these packets are transmitted from A to B. In the third case, the file is split into 20 equal parts and these packets are sent from A to B. Each packet contains 100 bytes of header information along with the user data. Consider only transmission time and ignore processing, queuing and propagation delays. Also assume that there are no errors during transmission. Let T1, T2 and T3 be the times taken to transmit the file in the first, second and third case respectively. Which one of the following is CORRECT?
Answer: (D)
The link speed is B/s, so sending 1 byte takes 1 . The path has 3 links (AR1R2B). With pipelining, the total time is (number of packets + 2) the time for one packet.
- T1: one packet of 1000 + 100 = 1100 B 3 1100 = 3300
- T2: 10 packets of 100 + 100 = 200 B 12 200 = 2400
- T3: 20 packets of 50 + 100 = 150 B 22 150 = 3300
Answer: T1 = T3, T3 T2
- T1: one packet of 1000 + 100 = 1100 B 3 1100 = 3300
- T2: 10 packets of 100 + 100 = 200 B 12 200 = 2400
- T3: 20 packets of 50 + 100 = 150 B 22 150 = 3300
Answer: T1 = T3, T3 T2
An IP machine Q has a path to another IP machine H via three IP routers R1, R2, and R3.
Q---R1---R2---R3---H
H acts as an HTTP server, and Q connects to H via HTTP and downloads a file. Session layer encryption is used, with DES as the shared key encryption protocol. Consider the following four pieces of information:
[I1] The URL of the file downloaded by Q
[I2] The TCP port numbers at Q and H
[I3] The IP addresses of Q and H
[I4] The link layer addresses of Q and H
Which of I1, I2, I3, and I4 can an intruder learn through sniffing at R2 alone?
Q---R1---R2---R3---H
H acts as an HTTP server, and Q connects to H via HTTP and downloads a file. Session layer encryption is used, with DES as the shared key encryption protocol. Consider the following four pieces of information:
[I1] The URL of the file downloaded by Q
[I2] The TCP port numbers at Q and H
[I3] The IP addresses of Q and H
[I4] The link layer addresses of Q and H
Which of I1, I2, I3, and I4 can an intruder learn through sniffing at R2 alone?
Answer: (C)
Session-layer encryption hides everything above the session layer. The HTTP request is hidden, so the URL (I1) cannot be seen.
- The TCP header (ports, I2) and the IP header (addresses of Q and H, I3) sit below the session layer. They are sent in clear so R2 can see them.
- Link layer addresses change at every hop. At R2 the frame carries the MAC addresses of R1/R2/R3, not those of Q and H so I4 cannot be seen.
Answer: Only I2 and I3
- The TCP header (ports, I2) and the IP header (addresses of Q and H, I3) sit below the session layer. They are sent in clear so R2 can see them.
- Link layer addresses change at every hop. At R2 the frame carries the MAC addresses of R1/R2/R3, not those of Q and H so I4 cannot be seen.
Answer: Only I2 and I3
A graphical HTML browser resident at a network client machine Q accesses a static HTML webpage from a HTTP server S. The static HTML page has exactly one static embedded image which is also at S. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)?
Answer: (B)
The HTML page and the embedded image are two different objects. So Q must send at least 2 HTTP GET requests.
With persistent HTTP (keep-alive), Q can send both requests over one TCP connection.
Answer: Q needs to send at least 2 HTTP requests to S, but one TCP connection is enough
With persistent HTTP (keep-alive), Q can send both requests over one TCP connection.
Answer: Q needs to send at least 2 HTTP requests to S, but one TCP connection is enough
Consider the following schedule S of transactions T1, T2, T3, T4:
Which one of the following statements is CORRECT?
Which one of the following statements is CORRECT?
Answer: (C)
Sequence of operations: R2(X), W3(X), C3, W1(X), C1, W2(Y), R2(Z), C2, R4(X), R4(Y), C4.
Conflict edges are: T2 T3, T2 T1, T3 T1 (on X), T1 T4, T3 T4 (on X), and T2 T4 (on Y). The graph has no cycle so S is conflict serializable, with order T2, T3, T1, T4.
T4 reads X from T1 and Y from T2. Both of them commit before T4 commits so S is recoverable.
Answer: S is both conflict-serializable and recoverable
Conflict edges are: T2 T3, T2 T1, T3 T1 (on X), T1 T4, T3 T4 (on X), and T2 T4 (on Y). The graph has no cycle so S is conflict serializable, with order T2, T3, T1, T4.
T4 reads X from T1 and Y from T2. Both of them commit before T4 commits so S is recoverable.
Answer: S is both conflict-serializable and recoverable
Consider a join (relation algebra) between relations r(R)and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R))size(s(S)), the join will have fewer number of disk block accesses if
Answer: (A)
One buffer holds the outer relation and one holds the inner relation. The number of block accesses is .
The product term does not change when the relations swap places. So the cost is lower when the outer relation has fewer blocks. Relation r is the smaller one, so r goes in the outer loop.
Answer: relation r(R) is in the outer loop
The product term does not change when the relations swap places. So the cost is lower when the outer relation has fewer blocks. Relation r is the smaller one, so r goes in the outer loop.
Answer: relation r(R) is in the outer loop