All mock tests are FREE till 31 December — register to save your progress
Paper 2 CS · UNIT 05 · MOCK TEST

System Software and Operating System — Mock Test 1

25 questions · about 30 minutes. Press End Mock any time to see your score and the correct answers.

0 / 25 answered 00:00
Q1.
Match List – I with List – II.
List I: (A) LRU (B) Demand cleaning (C) Long term scheduling (D) Medium term scheduling
List II: (I) Page not referenced for the longest time is replaced (II) Page is written to secondary memory only when it has been selected for replacement (III) Decision to add a process to the pool of processes to be executed (IV) Decision to add a process, partially or fully, to main memory
Q2.
Three processes arrive as follows:
ProcessArrival TimeBurst Time
P00 ms7 ms
P11 ms3 ms
P22 ms7 ms
The preemptive shortest-job-first (SJF) scheduling algorithm is used, with scheduling decisions made only at a process arrival or completion. What is the average waiting time for the three processes?
Q3.
Three processes arrive as follows:
ProcessArrival TimeBurst Time
P00 ms7 ms
P11 ms3 ms
P22 ms7 ms
The preemptive shortest-job-first (SJF) scheduling algorithm is used, with scheduling decisions made only at a process arrival or completion. What is the average waiting time for the three processes?
Q4.
For the following set of processes scheduled using FCFS policy, determine the average waiting time. Assume that the processes arrived in the order P1, P2, P3, P4.
ProcessBurst Time (ms)
P18
P215
P310
P47
Q5.
Which of the following statements are true?
(A) Shortest remaining time first scheduling may cause starvation.
(B) Preemptive scheduling may cause starvation.
(C) Round robin is better than FCFS in terms of response time.
Q6.
An OS follows round robin scheduling with a time quantum of 4 ms. Assuming that the CPU is free now and there are 20 processes waiting in the ready queue, what is the maximum amount of time that a process waits before getting into the CPU?
Q7.
If an operating system does not allow a child process to exist when the parent process has been terminated, this phenomenon is called:
Q8.
Consider the following 3 processes, with the length of the CPU burst time given in milliseconds:
ProcessArrival TimeBurst Time
P108
P214
P329
What is the average waiting time for these processes if they are scheduled using the preemptive shortest-job-first (shortest-remaining-time-first) scheduling algorithm?
Q9.
Assuming that the system call fork() never fails, consider the following C programs P1 and P2 executed on a UNIX/Linux system.
P1P2
int main() {
  fork();
  fork();
  fork();
  printf("Happy\n");
}
int main() {
  fork();
  printf("Happy\n");
  fork();
  printf("Happy\n");
  fork();
  printf("Happy\n");
}
Statement I: P1 displays "Happy" 8 times.
Statement II: P2 displays "Happy" 12 times.
In light of the above statements, choose the most appropriate answer.
Q10.
Consider the following four processes with the arrival time and length of CPU burst given in milliseconds:
ProcessArrival TimeBurst Time
P108
P214
P329
P435
Using the preemptive shortest job first (SJF / SRTF) scheduling algorithm, what is the average waiting time (in ms) for these processes?
Q11.
Which module gives control of the CPU to the process selected by the short-term scheduler?
Q12.
A fair share scheduler computes the priority of a process based on which of the following?
(1) Processor utilization by the individual process.
(2) Weight assigned to the user/group.
(3) Processor utilization by the user/group.
Q13.
Which of the following CPU scheduling algorithms may cause starvation of a process? (1) First-Come-First-Served (2) Round Robin (3) Priority scheduling (4) Shortest-Process-Next (5) Shortest-Remaining-Time-First
Q14.
A scheduling algorithm assigns a process's priority proportional to how long it has been waiting; every process starts at priority zero (the lowest), and the scheduler re-evaluates all priorities and picks the next process to run every T time units. If no process performs I/O and all arrive at time zero, which classical scheduling discipline does this scheme effectively implement?
Q15.
Which of the following statements are CORRECT?
(A) A process always checks the state of the currently executing process to enter its critical section.
(B) Spin locks use busy waiting.
(C) Periodically testing a variable until some value appears is known as busy waiting.
(D) A critical region/section is the part of a program where shared memory (a shared resource) is accessed.
(E) A printer daemon continuously checks to see if there are any files to be printed.
Q16.
At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operations and 'x' V operations were performed on this semaphore. If the final value of the semaphore is 5, what is x?
Q17.
Match List I with List II:
List I: (A) Critical region (B) Wait/Signal (C) Working set (D) Deadlock
List II: (I) Hoare's monitor (II) Mutual exclusion (III) Principle of locality (IV) Circular wait
Choose the correct match from A-D to I-IV.
Q18.
At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operations and 'x' V operations were performed on this semaphore. If the final value of the semaphore is 5, what is x?
Q19.
Match List I with List II:
List I: (A) Critical region (B) Wait/Signal (C) Working set (D) Deadlock
List II: (I) Hoare's monitor (II) Mutual exclusion (III) Principle of locality (IV) Circular wait
Choose the correct match from A-D to I-IV.
Q20.
In the design protocol of the critical section problem, each process must ask permission to enter the critical section in …… code; it then executes in the critical section; once it finishes executing in the critical section it enters the …… code. The process then enters the …… code.
Q21.
Consider a system with five processes P0 through P4 and three resource types A, B and C, with 7, 2 and 6 total instances respectively. At time T0 the system state is:
ProcessAllocation (A,B,C)Request (A,B,C)
P0010000
P1200202
P2303000
P3211100
P4022002
Available = (0, 0, 0). Applying the deadlock detection algorithm, the system is:
Q22.
The Bounded Buffer problem is also known as the ________.
Q23.
Two atomic operations permissible on semaphores are ________ and ________.
Q24.
Three processes share a single counting semaphore S whose initial value is 1. All three execute wait(S) one after another, in the order P2, P1, P3. After this, P2 exits its critical section by executing signal(S), and then P1 exits by executing signal(S). What is the value of S after these five operations?
Q25.
In the UNIX operating system, when a process creates a child process using the fork() system call, which of the following is genuinely shared between the parent and child process, rather than being copied?