Operating System |Gate-2009| previous year question|Set-12

Set-15 Operating System Questions

Operating System |Gate-2009|

  1. In which one of the following page replacement policies, Belady’s anomaly may occur? [GATE – 2009]

b. Optimal
c. MRU
d. LRU

Answer : a)

  1. The essential content(s) in each entry of a page table is / are : [GATE – 2009]

a. Virtual page number
b. Page frame number
c. Both virtual page number and page frame number
d. Access right information

Answer : b)

  1. A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because. [GATE – 2009]

a. It reduces the memory access time to read or write a memory location.
b. It helps to reduce the size of page table needed to implement the virtual address space of a process.
c. It is required by the translation lookaside buffer.
d. It helps to reduce the number of page faults in page replacement algorithms.

Answer : b)

4.  The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows:

void enter_CS(X) { while (test-and-set(X)); } void leave_CS(X) { X=0; } In the above solution, X is a memory location associated with the CS and is initialized to 0. Now consider the following statements: I.lThe above solution to CS problem is deadlock-free II.The solution is starvation III.The processes enter CS in FIFO IV.More than one process can enter CS at the same time. Which of the above statements is TRUE?  [GATE – 2009]

a. I only
b. I and II
c. II and III
d. IV only

Answer : a)

5. Consider a disk system with 100 cylinders. The requests to access the cylinders occur in following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20 Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1ms to move from one cylinder to adjacent one and shortest seek time first policy is used?  [GATE – 2009]

a. 95 ms
b. 276 ms
c. 233 ms
d. 119 ms

Answer : d)

6. Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.

Process P1:Process P2:Process P3:
t=0: request 2 units of R2
t=1: request 1 units of R3
t=3: request 2 units of R1
t=5: request 1 units of R2 and 1 unit of R1.
t=7: request 1 units of R3 t=8: request 2 units of R4 t=10: Finishes
t=0: request 2 units of R3
t=2: request 1 units of R4
t=4: request 1 units of R1
t=6: request 1 units of R3
t=8: Finishes
t=0: request 1 units of R4
t=2: request 2 units of R1
t=5: request 2 units of R1
t=7: request 1 units of R2
t=8: request 1 units of R3
t=9: Finishes

Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0?  [GATE – 2009]

a. Only P1 and P2 will be in deadlock.
b. Only P1 and P3 will be in a deadlock.
c. All processes will finish without any deadlock.
d. All three processes will be in deadlock.

Answer : c)
Operating System |Gate-2009|


Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *