Operating Systems questions

Q20

GATE CS 2016 CS-1SchedulingMCQ1 mark−1/3 if wrong
Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?
Show answer without attempting

Answer: A

Q47

GATE CS 2016 CS-1Memory ManagementNAT2 marks
Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table entry requires 48 bits, then the size of the per-process page table is ________ megabytes.
Show answer without attempting

Answer: 384.0

Q48

GATE CS 2016 CS-1SchedulingNAT2 marks
Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is ________.
Show answer without attempting

Answer: 346.0

Q49

GATE CS 2016 CS-1Memory ManagementNAT2 marks
Consider a computer system with ten physical page frames. The system is provided with an access sequence (a1,a2,…,a20,a1,a2,…,a20)(a_1, a_2, \dots, a_{20}, a_1, a_2, \dots, a_{20}), where each aia_i is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy is ________.
Show answer without attempting

Answer: 1.0

Q50

GATE CS 2016 CS-1Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
Consider the following proposed solution for the critical section problem. There are n processes: P0…Pn−1P_0 \dots P_{n-1}. In the code, function pmax returns an integer not smaller than any of its arguments. For all i, t[i] is initialized to zero.
Code for PiP_i:
do {
    c[i]=1; t[i] = pmax(t[0],...,t[n-1])+1; c[i]=0;
    for every j ≠ i in {0,...,n-1} {
        while (c[j]);
        while (t[j] != 0 && t[j]<=t[i]);
    }
    Critical Section;
    t[i]=0;
    Remainder Section;
} while (true);
Which one of the following is TRUE about the above solution?
Show answer without attempting

Answer: A

Q20

GATE CS 2016 CS-2Memory ManagementMCQ1 mark−1/3 if wrong
In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
Show answer without attempting

Answer: D

Q47

GATE CS 2016 CS-2SchedulingNAT2 marks
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.
ProcessArrival TimeBurst Time
P1P_1010
P2P_236
P3P_371
P4P_483
The average turn around time of these processes is _________ milliseconds.
Show answer without attempting

Answer: 8.2 to 8.3

Q48

GATE CS 2016 CS-2Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
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?
Show answer without attempting

Answer: C

Q49

GATE CS 2016 CS-2Concurrency and SynchronizationNAT2 marks
Consider a non-negative counting semaphore SS. The operation P(S)P(S) decrements SS, and V(S)V(S) increments SS. During an execution, 20 P(S)20\, P(S) operations and 12 V(S)12\, V(S) operations are issued in some order. The largest initial value of SS for which at least one P(S)P(S) operation will remain blocked is _________.
Show answer without attempting

Answer: 7.0

Q50

GATE CS 2016 CS-2File SystemsNAT2 marks
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.

The smallest cache size required to ensure an average read latency of less than 6 ms is _________ MB.
Question figure
Show answer without attempting

Answer: 30.0

0/100 correct0 marks

Related topics in GATE CS