Javatpoint Logo
Javatpoint Logo

GATE 2016 CS Set 2

57) Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first.

GATE 2016 CS Set 2

The average turn around time of these processes is ______________ milliseconds.

  1. 4.25
  2. 8.25
  3. 8.50
  4. 9

Answer: B

Explanation:

The Gantt chart of the following process are:

GATE 2016 CS Set 2

We know,

            Turn Around Time = Completion Time ? Arrival Time             Turn Around Time for P1 = 20 ? 0 = 20             Turn Around Time for P2 = 10 ? 3 = 7             Turn Around Time for P3 = 8- 7 = 1             Turn Around Time for P4 = 13 ? 8 = 5

Hence, Average Turn Around Time = Total TAT of all the processes / no of processes

                  = ( 20+7+1+5 ) / 4 = 33 / 4 = 8.25 milliseconds

Therefore option (B) is the right answer.


58) Consider the following two-process synchronization solution.

GATE 2016 CS Set 2

The shared variable turn is initialized to zero. Which one of the following is TRUE?

  1. This is a correct two-process synchronization solution.
  2. This solution violates mutual exclusion requirement.
  3. This solution violates progress requirement.
  4. This solution violates bounded wait requirement.

Answer: C

Explanation:

The third option is correct. Here Process 1 does not want to go in the critical section because initially, the semaphore value is zero. Process 1 can go in critical section only after Process 0. Since it is a strict alteration, process 0 can go in only once, and then keep waiting forever. So Progress requirement is not ensured. Therefore option (C) is the right answer.


59) Consider a non-negative counting semaphore S. The operation P(S) decrements S, and V (S) increments S. During an execution, 20 P(S) operations and 12 V (S) operations are issued in some order. The largest initial value of S for which at least one P(S) operation will remain blocked is ______________.

  1. 7
  2. 8
  3. 9
  4. 10

Answer: A

Explanation:

If we get a negative value in counting the semaphore, then it must be in the blocked state. Thus, the largest initial value of S so that at least one process gets blocked is: S-20+12 = -1

So, S = 7

Therefore option (A) will be the right answer.


60) A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is 1 ms and to read a block from the disk is 10 ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10 MB.

GATE 2016 CS Set 2

The smallest cache size required to ensure an average read latency of less than 6ms is ______________ MB.

  1. 35
  2. 20
  3. 25
  4. 30

Answer: D

Explanation:

Given,

           Cache Latency = 1ms
           Main Memory Latency = 10ms

Now, for 20 MB

              Miss rate = 60% , Hit rate = 40%
              Avg = Hit rate * Cache Latency + Miss rate * Main Memory Latency
              = 0.4 * 1 + 0.6 * 10
              = 0.4 + 6 = 6.4 ms > 6 ms

Next for 30 MB

              Miss rate = 40% , Hit rate = 60%
              Avg = 0.6 * 1 + 0.4 * 10
              = 0.6 + 4 = 4.6 ms < 6 ms

Hence, the smallest cache size required to ensure an average read latency of less than 6ms: 30 MB

Therefore option(D) is the right answer.


61) Consider the following database schedule with two transactions, T1 and T2.

        S = r2(X); r1(X); r2(Y ); w1(X); r1(Y ); w2(X); a1 ; a2

where ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and a i denotes an abort by transaction Ti.

Which one of the following statements about the above schedule is TRUE?

  1. S is non-recoverable
  2. S is recoverable, but has a cascading abort
  3. S does not have a cascading abort
  4. S is strict

Answer: C

Explanation:

GATE 2016 CS Set 2

The given transaction is not strict recoverable as W1(X), and W2(X) are two write operations on same data item X, and W2(X) is executed before aborting of T1. Here cascading Abort can be possible if Abort of T1 required abort of T2 but as T2 is already aborted, its not a cascade abort. Hence option (C) is the right answer.


62) Consider the following database table named water_schemes:

GATE 2016 CS Set 2

The number of tuples returned by the following SQL query is ______________.

  1. 1
  2. 2
  3. 3
  4. 4

Answer: B

Explanation:

The first query will return:

GATE 2016 CS Set 2

Then, Total average capacity = 100/4 = 25

The second query will return the name of the district which has total capacity >= 25. Thus it will return only two district names.

GATE 2016 CS Set 2

Therefore option (B) will be the right answer.


63) A network has a data transmission bandwidth of 20 × 10 6 bits per second. It uses CSMA/CD in the MAC layer. The maximum signal propagation time from one node to another node is 40 microseconds. The minimum size of a frame in the network is ______________ bytes.

  1. 150
  2. 100
  3. 200
  4. 250

Answer: C

Explanation:

Given,

Bandwidth (B) = 20 * 106 bits/sec
Propogation time (Tp) = 40 microseconds

Suppose, the minimum frame size is L bits. Then,

Transmission Time (Tx) = L / B

As, Tx = 2 Tp = L / B

L / B = 2 * 40
L = B * 80 = 20 * 106 * 80 = 1600 bits = 200 bytes

Therefore option (C) is the right answer.


64) For the IEEE 802.11 MAC protocol for wireless communication, which of the following statements is/are TRUE?

I. At least three non-overlapping channels are available for transmissions.
II. The RTS-CTS mechanism is used for collision detection.
III. Unicast frames are ACKed.

  1. All I, II, and III
  2. I and III only
  3. II and III only
  4. II only

Answer: B

Explanation:

IEEE 802.11 MAC protocol for wireless communication uses at least 3 non-overlapping channel for transmission. These are RTS(Request To Send), CTS(Clear To Send) and NAV(Network Allocation Vector). So statement (I) is true.

RTS and CTS are control frames. It provides the exchange between stations and helps in collision reduction and not DETECTION. So statement (II) is false.

Let Station 1 sends an RTS frame to Station 2, then in response Station 2 sends back CTS frame. When the data is received by Station 2, it sends Acknowledgement frame(ACKed). The process of sending an Acknowledgement to a single recipient over a network, Unicast Frames are acknowledged. So statement (III) is true.

Therefore option(B) is the right answer.


65) Consider a 128×103 bits/second satellite communication link with one way propagation delay of 150 milliseconds. Selective retransmission (repeat) protocol is used on this link to send data with a frame size of 1 kilobyte. Neglect the transmission time of acknowledgement. The minimum number of bits required for the sequence number field to achieve 100% utilization is ______________.

  1. 4
  2. 3
  3. 2
  4. 10

Answer: A

Explanation:

To achieve 100% efficiency, the number of frames that we have to send (Ws) = 1 + 2 * Tp / Tt

Where, Tp = Propagation time = 150 milliseconds

Tt = Transmission time

Now,

Tp / Tt = 150 / (1024×8/128) = 150 / 64 = 2.34,

Thus, Ws = 1 + 2 * Tp / Tt = 5.6875 ≈ 6

As the protocol used is Selective repeat, then, No. of distinct sequence numbers required = 6 + 6 = 12

Number of bits required to represent 12 distinct numbers = log212 = 4

Therefore option (A) is the right answer.


GATE 2016 CS Set 2-1
GATE 2016 CS Set 2-2
GATE 2016 CS Set 2-3
GATE 2016 CS Set 2-4
GATE 2016 CS Set 2-5
GATE 2016 CS Set 2-6
GATE 2016 CS Set 2-7

Next TopicGATE Index





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA