GATE-IT-2004

Last Updated :
Discuss
Comments

Question 1

The semaphore variables full, empty and mutex are initialized to 0, n and 1, respectively. Process P1 repeatedly adds one item at a time to a buffer of size n, and process Prepeatedly removes one item at a time from the same buffer using the programs given below. In the programs, K, L, M and N are unspecified statements.
 P1
while (1) {     K; P(mutex); Add an item to the buffer; V(mutex);     L; } P2 while (1) {    M; P(mutex); Remove an item from the buffer; V(mutex);     N; } The statements K, L, M and N are respectively
  • P(full), V(empty), P(full), V(empty)

  • P(full), V(empty), P(empty), V(full)

  • P(empty), V(full), P(empty), V(full)

  • P(empty), V(full), P(full), V(empty)

Question 2

A process executes the following segment of code :

 for(i = 1; i < = n; i++)

fork ();

The number of new processes created is  

  • n

  • ((n(n + 1))/2)

  • 2n - 1

  • 3n - 1

Question 3

In a certain operating system, deadlock prevention is attempted using the following scheme. Each process is assigned a unique timestamp, and is restarted with the same timestamp if killed. Let Ph be the process holding a resource R, Pr be a process requesting for the same resource R, and T(Ph) and T(Pr) be their timestamps respectively. The decision to wait or preempt one of the processes is based on the following algorithm.
 if T(Pr) < T(Ph)

     then kill Pr

else wait
Which one of the following is TRUE?
  • The scheme is deadlock-free, but not starvation-free

  • The scheme is not deadlock-free, but starvation-free

  • The scheme is neither deadlock-free nor starvation-free

  • The scheme is both deadlock-free and starvation-free

Question 4

Which one of the following statements is FALSE?

  • Packet switching leads to better utilization of bandwidth resources than circuit switching.

  • Packet switching results in less variation in delay than circuit switching.

  • Packet switching requires more per packet processing than circuit switching

  • Packet switching can lead to reordering unlike in circuit switching

Question 5

Consider a simplified time slotted MAC protocol, where each host always has data to send and transmits with probability p = 0.2 in every slot. There is no backoff and one frame can be transmitted in one slot. If more than one host transmits in the same slot, then the transmissions are unsuccessful due to collision. What is the maximum number of hosts which this protocol can support, if each host has to be provided a minimum through put of 0.16 frames per time slot?

  • 1

  • 2

  • 3

  • 4

Question 6

Consider the undirected graph below:  Using Prim's algorithm to construct a minimum spanning tree starting with node A, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?

 
  • (E, G), (C, F), (F, G), (A, D), (A, B), (A, C)

  • (A, D), (A, B), (A, C), (C, F), (G, E), (F, G)

  • (A, B), (A, D), (D, F), (F, G), (G, E), (F, C)

  • (A, D), (A, B), (D, F), (F, C), (F, G), (G, E)

Question 7

A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)

  • 2 and 3

  • 3 and 3

  • 3 and 4

  • 4 and 4

Question 8

The storage area of a disk has innermost diameter of 10 cm and outermost diameter of 20 cm. The maximum storage density of the disk is 1400bits/cm. The disk rotates at a speed of 4200 RPM. The main memory of a computer has 64-bit word length and 1µs cycle time. If cycle stealing is used for data transfer from the disk, the percentage of memory cycles stolen for transferring one word is  

  • 0.5%

  • 1%

  • 5%

  • 10%

Question 9

Which one of the following is NOT shared by the threads of the same process?

  • Stack

  • Address Space

  • File Descriptor Table

  • Message Queue

Question 10

In a particular Unix OS, each data block is of size 1024 bytes, each node has 10 direct data block addresses and three additional addresses: one for single indirect block, one for double indirect block and one for triple indirect block. Also, each block can contain addresses for 128 blocks. Which one of the following is approximately the maximum size of a file in the file system?  

  • 512 MB

  • 2GB

  • 8GB

  • 16GB

Tags:

There are 88 questions to complete.

Take a part in the ongoing discussion