Welcome to Operating System Quiz, Advanced Level !!

Question 1. Consider Peterson?s algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below
          flag [i] = true;
          turn = j;
          while ( P ) do no-op;
          Enter critical section, perform actions, then exit critical section
      flag [ i ] = false;
      Perform other non-critical section actions
     until false;

For the program to guarantee mutual exclusion, the predicate P in the while loop should be

flag [j] = true and turn = i

flag [j] = true and turn = j

flag [i] = true and turn = j

flag [i] = true and turn = i

Question 2. Suppose the time to service a page fault is on the average 10 milliseconds, while a memory access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time of

1.9999 milliseconds

1 millisecond

9.999 microseconds

1.9999 microseconds

Question 3. The degree of Multiprogramming is controlled by

CPU Scheduler

Context Switching

Long-term Scheduler

Medium term Scheduler

Question 4. In Priority Scheduling a priority number (integer) is associated with each process. The CPU is allocated to the process with the highest priority (smallest integer = highest priority). The problem of, Starvation ? low priority processes may never execute, is resolved by ?

Terminating the process.


Mutual Exclusion


Question 5. In interactive environments such as time-sharing systems, the primary requirement is to provide reasonably good response time and in general, to share system resources equitably. In such situations, the scheduling algorithm that is most popularly applied is ________.

Shortest Remaining Time Next (SRTN) Scheduling

Priority Based Preemptive Scheduling

Round Robin Scheduling

none of the above

Question 6. _________ is a high speed cache used to hold recently referenced page table entries a part of paged virtual memory

Translation Lookaside buffer

Inverse page table

Segmented page table

all of the above

Question 7. _________ allocates the largest hole (free fragment) available in the memory.

best fit

worst fit

first fit

none of the above

Question 8. If all page frames are initially empty, and a process is allocated 3 page frames in real memory and references its pages in the order 1 2 3 2 4 5 2 3 2 4 1 and the page replacement is FIFO, the total number of page faults caused by the process will be ?





Question 9. Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4KB, what is the approximate size of the page table?

16 MB

8 MB

2 MB

24 MB

Question 10. In one of the deadlock prevention methods, impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. This violates which condition of deadlock

Mutual exclusion

Hold and Wait

Circular Wait

no preemption