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
      repeat
          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. The degree of Multiprogramming is controlled by

CPU Scheduler

Context Switching

Long-term Scheduler

Medium term Scheduler

Question 3. 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 4. _________ page replacement alogorithm suffers from Belady's anamoly.

LRU

MRU

FIFO

LIFO

Question 5. 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

Question 6. Using Priority Scheduling algorithm, find the average waiting time for the following set of processes given with their priorities in the order: Process : Burst Time : Priority respectively . P1 : 10 : 3 , P2 : 1 : 1 , P3 : 2 : 4 , P4 : 1 : 5 , P5 : 5 : 2.

8 milliseconds

8.2 milliseconds

7.75 milliseconds

3 milliseconds

Question 7. More than one word are put in one cache block to

exploit the temporal locality of reference in a program

exploit the spatial locality of reference in a program

reduce the miss penalty

none of the abov

Question 8. An optimal scheduling algorithm in terms of minimizing the average waiting time of a given set of processes is

FCFS scheduling algorithm

Round robin scheduling algorithm

Shorest job - first scheduling algorithm

None of the above

Question 9. Consider the two statements.
(A) A network operating system, the users access remote resources in the same manner as local resource.
(B) In a distributed operating system, the user can access remote resources either by logging into the appropriate remote machine or transferring data from the remote machine to their own machine.
Which of the statement is true?

A true, B false

B true, A false

Both A and B false

Both A and B true

Question 10. Demand paged memory allocation

allows the virtual address space to be independent of the physical memory

allows the virtual address space to be a multiple of the physical memory size

allows deadlock to be detected in paging schemes

is present only in Windows NT