GATE 2016 (Session 1)
65 questions
MCQ 39 · NAT 261-mark 30 · 2-mark 35
Questions 61–65 of 65
Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1,... ,Ok}. This is done in the following manner:
Step 1. T acquires exclusive locks to O1,...,Ok in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.
This protocol will
Step 1. T acquires exclusive locks to O1,...,Ok in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.
This protocol will
Answer: (A)
T gets all its locks first. It does its operations only after that, and it frees the locks at the very end so the schedule follows two-phase locking and is serializable.
Every transaction asks for locks in increasing order of address. Because of this, no circular wait can occur so the protocol is deadlock-free.
Answer: guarantee serializability and deadlock-freedom
Every transaction asks for locks in increasing order of address. Because of this, no circular wait can occur so the protocol is deadlock-free.
Answer: guarantee serializability and deadlock-freedom
Consider that B wants to send a message m that is digitally signed to A. Let the pair of private and public keys for A and B be denoted by and for x = A,B, respectively. Let represent the operation of encrypting m with a key and H(m) represent the message digest. Which one of the following indicates the CORRECT way of sending the message m along with the digital signature to A?
Answer: (B)
To sign, B encrypts the message digest with B's private key: . A then uses B's public key to decrypt it and checks the result against H(m).
Answer: {m, }
Answer: {m, }
An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit)is 100bytes. Assume that the size of the IP header is 20bytes.
The number of fragments that the IP datagram will be divided into for transmission is _________.
The number of fragments that the IP datagram will be divided into for transmission is _________.
Answer: 13
The data part is 1000 20 = 980 bytes.
Each fragment can carry 100 20 = 80 bytes of data. This is already a multiple of 8.
Number of fragments =
Answer: 13
Each fragment can carry 100 20 = 80 bytes of data. This is already a multiple of 8.
Number of fragments =
Answer: 13
For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 megabyte and the maximum output rate is 20 megabytes per second. Tokens arrive at a rate to sustain output at a rate of 10megabytes per second. The token bucket is currently full and the machine needs to send 12megabytes of data. The minimum time required to transmit the data is _____seconds.
Answer: 1.1
The bucket is full at the start, so it holds 1 MB. While the bucket empties, the host sends at 20 MB/s and new tokens come in at 10 MB/s:
s, and 2 MB is sent in this time.
The other 10 MB is sent at 10 MB/s, which takes 1 s.
Total time = 0.1 + 1 = 1.1 s
Answer: 1.1
s, and 2 MB is sent in this time.
The other 10 MB is sent at 10 MB/s, which takes 1 s.
Total time = 0.1 + 1 = 1.1 s
Answer: 1.1
A sender uses the Stop-and Wait ARQ protocol for reliable transmission of frames. Frames are of size 1000bytes and the transmission rate at the sender is 80Kbps(1Kbps=1000 bits/second). Size of anacknowledgement is 100bytes and the transmission rate at the receiver is 8Kbps. The one-way propagation delay is 100milliseconds.
Assuming no frame is lost, the sender throughput is _____bytes/second.
Assuming no frame is lost, the sender throughput is _____bytes/second.
Answer: 2500
Work out each time:
- Frame transmission time: 8000 bits / 80 Kbps = 0.1 s
- ACK transmission time: 800 bits / 8 Kbps = 0.1 s
- Propagation time: 0.1 s in each direction
So one frame is sent in 0.1 + 0.1 + 0.1 + 0.1 = 0.4 s throughput = 1000 / 0.4 = 2500 bytes/s
Answer: 2500
- Frame transmission time: 8000 bits / 80 Kbps = 0.1 s
- ACK transmission time: 800 bits / 8 Kbps = 0.1 s
- Propagation time: 0.1 s in each direction
So one frame is sent in 0.1 + 0.1 + 0.1 + 0.1 = 0.4 s throughput = 1000 / 0.4 = 2500 bytes/s
Answer: 2500