Javatpoint Logo
Javatpoint Logo

57) Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table entry requires 48 bits, then the size of the per-process page table is megabytes __________.

  1. 384
  2. 348
  3. 438
  4. 192

Answer: A

Explanation:

Given,
   Page Table Entry Size(E) = 6 Bytes
   Size of memory = 240
   Page size = 16KB = 24 * 210 Byte = 214 Byte
   No of pages (N) = size of Memory/ page size = 240 / 214 = 240-14 = 226
   Size of page table = N*E = 226 *6 bytes = 26 * 6 MB = 384 MB

Therefore option (A) will be the correct answer.


58) Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is __________.

  1. 163
  2. 346
  3. 173
  4. 175

Answer: B

Explanation:

The head movement would be:

63 ->> 87 = 24 (87-63)
87 ->> 92 = 5 (92-87)
92 ->> 121 = 29 (121-92)
121 ->> 191 = 70 (191-121)
191 ->> 10 = 181 (191-10)
10 ->> 11 = 1 (11-10)
11 ->> 38 = 27 (38-11)
38 ->> 47 = 9 (47-38)
Total head movements = 24+5+29+70+181+1+27+9 = 346

Therefore option (B) will be the correct answer.


59) Consider a computer system with ten physical page frames. The system is provided with an access sequence (a1 , a2 , . . . , a20 , a1 , a2 , . . . , a20 ), where each ai is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy is __________.

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

Answer: B

Explanation:

No. of page faults in LIFO:

Page fault in a1 to a10 = 10 pages. Page fault in a11 to a20 = 10 pages. Because a11 replace a10, a12 replace a11 and so on till a20, so 10 page faults will occur. Now a20 will be stack top and a9....a1 are remaining. In above a1 to a9 are already present. So there is no page faults occur from a1 to a9. Again a10 replace a20, a11 replace a10 and so on. So from a10 to a20 11 page faults occurs.

Thus total page faults will be: 10+10+11 = 31.

No. of page faults in Optimal:

Page fault in a1 to a10 = 10 pages.

Page fault in a1 to a10 = 10 pages. Page fault in a11 to a20 = 10 pages. Because a11 replace a10, a12 replace a11 and so on till a20, so 10 page faults will occur. Now a20 will be stack top and a9...a1 are remaining. In above a1 to a9 are already present. So there is no page faults occur from a1 to a9. Again a10 replace a1 because it will not be used later. So from a10 to a19 10 page faults occurs.

Thus total optimal page faults will be: 10+10+10 = 30.
Hence, Difference = 31 - 30 = 1
Therefore option (B) is the right answer.


60) Consider the following proposed solution for the critical section problem. There are n processes: P0 . . . Pn-1. In the code, function pmax returns an integer not smaller than any of its arguments. For all i, t[i] is initialized to zero.

Code for Pi:

Which one of the following is TRUE about the above solution?

  1. At most one process can be in the critical section at any time
  2. The bounded wait condition is satisfied
  3. The progress condition is satisfied
  4. It cannot cause a deadlock

Answer: A

Explanation:

The synchronization solution for the above n process guarantees mutual exclusion. But it doesn't guarantees progress. The above solution may lead the processes in deadlock position. Bounded waiting is also not satisfied because the deadlock and bounded waiting both are arising from the same reason as if t[j] == t[i] is possible then starvation is possible means infinite waiting. Thus the above code satisfied the mutual exclusion which ensures that only one process is executing its critical section at a time.

Therefore option (A) will be the correct answer.


61) 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

  1. guarantee serializability and deadlock-freedom
  2. guarantee neither serializability nor deadlock-freedom
  3. guarantee serializability but not deadlock-freedom
  4. guarantee deadlock-freedom but not serializability

Answer: A

Explanation:

The above steps are Conservative 2PL. In this protocol, a transaction may lock all the items it accesses before the transaction begins execution. It avoids deadlocks. Also, it is conflict serializable. Thus it guarantees serializability.

A conservative 2PL protocol ensures:

  1. serializability
  2. deadlock freedom
  3. strict recoverable
  4. starvation possible
  5. Throughput decreases
  6. degree of concurrency decreases
  7. resource utilization decreases

Therefore option (A) will be the right answer.


62) 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 K-x and K+x for x = A, B, respectively. Let Kx(m) represent the operation of encrypting m with a key Kx 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?

  1. {m, K+B (H(m))}
  2. {m, K-B (H(m))}
  3. {m, K-A (H(m))}
  4. {m, K+A (m)}

Answer: B

Explanation:

B wants to send message 'm' that is digitally signed to A.

Private and public keys are denoted by K-x and K+x for x = A, B, respectively.

k(m) represents encryption of m with key Kx

H(m) represents message digest

To send a digitally signed message from B to A, the message needs to be encrypted by private key of B. So,{m, K-B (H(m))} must be the correct way of sending the message.

Therefore option (B) is the right answer.


63) 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 100 bytes. Assume that the size of the IP header is 20 bytes. The number of fragments that the IP datagram will be divided into for transmission is __________.

  1. 10
  2. 11
  3. 12
  4. 13

Answer: D

Explanation:

Given,
   IP Datagram size = 1000 bytes
   MTU = 100 bytes
   IP header size = 20 bytes
   So, size of data transmitted in one fragment = 100 - 20 = 80 bytes
   Total Size of data to be transmitted = Size of datagram - size of header
         = 1000 - 20 = 980 bytes
So no. of fragments = Size of data to be transmitted / size of data transmitted in one fragment
         = 980 / 80 = 12.25 =~ 13 fragments.

Therefore option (D) is the right answer.


64) 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 10 megabytes per second. The token bucket is currently full and the machine needs to send 12 megabytes of data. The minimum time required to transmit the data is __________ seconds.

  1. 0.1
  2. 1.1
  3. 2.1
  4. 2.2

Answer: B

Explanation:

Given,
   M = 20 MB
   P = 10 MB
   C = 1 MB

According to the token bucket algorithm, the minimum time required to send 1 MB of data or the maximum rate of data transmission is given by:

S = C / (M - P)
Where,
   M = Maximum output rate,
   P = Rate of arrival,
   C = capacity of the bucket
So,
   S = 1 / (20- 10) = 0.1 sec

According to a question, initially the token bucket is full, it already has 1 MB to transmit, and the machine needs to send 12 MB of data. So, we have to transmit only (12 - 1), i.e., 11 MB of data. Thus, Time required to send the 11 MB: 11 * 0.1 = 1.1 sec.

Therefore option (B) will be the right answer.


65) A sender uses the Stop-and-Wait ARQ protocol for reliable transmission of frames. Frames are of size 1000 bytes and the transmission rate at the sender is 80 Kbps (1Kbps = 1000 bits/second). Size of an acknowledgement is 100 bytes and the transmission rate at the receiver is 8 Kbps. The one-way propagation delay is 100 milliseconds. Assuming no frame is lost, the sender throughput is __________ bytes/second.

  1. 1500
  2. 2000
  3. 2300
  4. 2500

Answer: D

Explanation:

Given,
   Frame Size = 1000bytes
   Transmission rate at sender = 80 kbps
   Transmission rate at receiver = 8kbps
   Size of ACK = 100bytes
   Propagation Delay = 100 milliseconds

Total time = Sender transmission time + 2* Propagation Delay + Ack-Time.
Sender transmission time = 1000×8 / (80×1000) = 0.1 sec
Propagation Delay = 100ms = 0.1 sec
ACK time = 100*8/8*1000 = 0.1 sec.

Thus, Total Time = 0.1 + 2*0.1 + 0.1 = 0.1 + 0.2 + 0.1 = 0.4 sec.

Now,
   Throughput = Frame Size / Total Time = 1000/0.4 = 2500 bytes/sec.
   Therefore option (D) is the right answer.


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

Next Topic





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