Operating Systems questions

Q8

GATE CS 2012 CSProcesses and ThreadsMCQ1 mark−1/3 if wrong
A process executes the code
fork();
fork();
fork();
The total number of child processes created is
Show answer without attempting

Answer: C

Q31

GATE CS 2012 CSSchedulingMCQ2 marks−2/3 if wrong
Consider the 3 processes, P1, P2 and P3 shown in the table.
ProcessArrival timeTime Units Required
P105
P217
P334
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
Show answer without attempting

Answer: C

Q32

GATE CS 2012 CSConcurrency and SynchronizationMCQ2 marks−2/3 if wrong
Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
AcquireLock(L){
      while (Fetch_And_Add(L,1))
            L = 1;
}

ReleaseLock(L){
      L = 0;
}
This implementation
Show answer without attempting

Answer: B

Q41

GATE CS 2012 CSFile SystemsMCQ2 marks−2/3 if wrong
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
Show answer without attempting

Answer: B

Q42

GATE CS 2012 CSMemory ManagementMCQ2 marks−2/3 if wrong
Consider the virtual page reference string
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then
Show answer without attempting

Answer: B

0/50 correct0 marks

Related topics in GATE CS