Operating Systems questions

Q10

GATE CS 2013 CSSchedulingMCQ1 mark−1/3 if wrong
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (the lowest priority). The scheduler re-evaluates the process priorities every TT time units and decides the next process to schedule. Which one of the following is TRUE if the processes have no I/O operations and all arrive at time zero?
Show answer without attempting

Answer: B

Q16

GATE CS 2013 CSDeadlocksMCQ1 mark−1/3 if wrong
Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the PP operation (i.e., wait) on semaphores aa, bb and cc; process Y executes the PP operation on semaphores bb, cc and dd; process Z executes the PP operation on semaphores cc, dd, and aa before entering the respective code segments. After completing the execution of its code segment, each process invokes the VV operation (i.e., signal) on its three semaphores. All semaphores are binary semaphores initialized to one. Which one of the following represents a deadlock-free order of invoking the PP operations by the processes?
Show answer without attempting

Answer: B

Q29

GATE CS 2013 CSFile SystemsMCQ2 marks−2/3 if wrong
Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., surface no., sector no.>. A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
Show answer without attempting

Answer: D

Q34

GATE CS 2013 CSConcurrency and SynchronizationMCQ2 marks−2/3 if wrong
A shared variable xx, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads xx from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads xx from memory, decrements by two, stores it to memory, and then terminates. Each process before reading xx invokes the PP operation (i.e., wait) on a counting semaphore SS and invokes the VV operation (i.e., signal) on the semaphore SS after storing xx to memory. Semaphore SS is initialized to two. What is the maximum possible value of xx after all processes complete execution?
Show answer without attempting

Answer: D

Q39

GATE CS 2013 CSConcurrency and SynchronizationMCQ2 marks−2/3 if wrong
A certain computation generates two arrays aa and bb such that a[i]=f(i)a[i]=f(i) for 0≤i<n0 \le i < n and b[i]=g(a[i])b[i] = g(a[i]) for 0≤i<n0 \le i < n. Suppose this computation is decomposed into two concurrent processes X and Y such that X computes the array aa and Y computes the array bb. The processes employ two binary semaphores RR and SS, both initialized to zero. The array aa is shared by the two processes. The structures of the processes are shown below.
Process X:
private i;
for (i=0; i<n; i++) {
  a[i] = f(i);
  ExitX(R, S);
}

Process Y:
private i;
for (i=0; i<n; i++) {
  EntryY(R, S);
  b[i] = g(a[i]);
}
Which one of the following represents the CORRECT implementations of ExitX and EntryY?
Show answer without attempting

Answer: C

Q53

GATE CS 2013 CSMemory ManagementMCQ2 marks
What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?
Show answer without attempting

Answer: C

0/70 correct0 marks

Related topics in GATE CS