1
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
An operating system uses Shortest Remaining Time first $$(SRT)$$ process scheduling algorithm. Consider the arrival times and execution times for the following processes: GATE CSE 2007 Operating Systems - Process Concepts and Cpu Scheduling Question 20 English

What is the total waiting time for process $$P2?$$

A
$$5$$
B
$$15$$
C
$$40$$
D
$$55$$
2
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:
 /* P1 */
  while(true){
  want s1=true;
  while(wants2 == true){
  /* Critical Section */
   wants1 = false;
  }
  /* Reminder Section */
 }
 /* P2 */
  while(true){
  want s2=true;
  while(wants1 == true){
  /* Critical Section */
   Wants2 = false;
  }
  /* Reminder Section */
 }
Here wants1 and wants2 are shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?
A
It does not ensure the mutual exclusion.
B
It does not ensure bounded waiting.
C
It requires that processes enter the critical section in strict alternation
D
It does not prevent deadlocks, but ensures mutual exclusion
3
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements:
$$P:$$ Increasing the number of page frames allocated to a process sometimes increases the page fault rate.
$$Q:$$ Some programs do not exhibit locality of reference.

Which one of the following is TRUE?

A
Both P and Q are true, and Q is the reason for P
B
Both P and Q are true, but Q is not the reason for P.
C
P is false, but Q is true
D
Both P and Q are false.
4
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
A process has been allocated $$3$$ page frames. Assume that none of the pages of the process are available in the memory initially. The process makes the following sequence of page references (reference string): $$$1, 2, 1, 3, 7, 4, 5, 6, 3, 1$$$

If optimal page replacement policy is used, how many page faults occur for the above reference string?

A
$$7$$
B
$$8$$
C
$$9$$
D
$$10$$
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12