• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2016 (Set 2)

Question 51

Which one of the following grammars is free from left recursion? z3
  • A
  • B
  • C
  • D

Question 52

A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example,
int a[10][3]; 
The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num.
Grammar G1
D → int L;
L → id [E
E → num]
E → num] [E

Grammar G2
D → int L;
L → id E
E → E[num]
E → [num] 
Which of the grammars correctly generate the declaration mentioned above?
  • Both G1 and G2
  • Only G1
  • Only G2
  • Neither G1 nor G2

Question 53

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. z5 The average turn around time of these processes is ___________ milliseconds.   Note : This question was asked as Numerical Answer Type.
  • 8.25
  • 10.25
  • 6.35
  • 4.25

Question 54

Consider the following two-process synchronization solution.
Process 0                             Process 1                          

Entry: loop while (turn == 1);        Entry: loop while (turn == 0);
       (critical section)                    (critical section)
       Exit: turn = 1;                       Exit turn = 0; 

The shared variable turn is initialized to zero. Which one of the following is TRUE?
  • This is a correct two-process synchronization solution.
  • This solution violates mutual exclusion requirement.
  • This solution violates progress requirement.
  • This solution violates bounded wait requirement.

Question 55

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 ________.
  • 7
  • 8
  • 9
  • 10

Question 56

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. y9 The smallest cache size required to ensure an average read latency of less than 6 ms is _______ MB.
  • 10
  • 20
  • 30
  • 40

Question 57

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 ai denotes an abort by transaction Ti . Which one of the following statements about the above schedule is TRUE?
  • S is non-recoverable
  • S is recoverable, but has a cascading abort
  • S does not have a cascading abort
  • S is strict

Question 58

Consider the following database table named water_schemes : x1 The number of tuples returned by the following SQL query is
with total(name, capacity) as
   select district_name, sum(capacity)
   from water_schemes
   group by district_name
with total_avg(capacity) as
   select avg(capacity)
   from total
select name
   from total, total_avg
   where total.capacity >= total_avg.capacity
  • 1
  • 2
  • 3
  • 4

Question 59

A network has a data transmission bandwidth of 20 × 106 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. Note : This question was asked as Numerical Answer Type.
  • 200
  • 250
  • 400
  • 1200

Question 60

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.
  • All I, II, and III
  • I and III only
  • II and III only
  • II only

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion