CS FundamentalsModerateGATE CS
What is the purpose of the dual-mode (user/kernel) bit together with a timer interrupt?
- A. Dual mode speeds up arithmetic; the timer tracks the date
- B. Dual mode stops user code from executing privileged instructions, and the timer ensures the OS regains control even if a process never makes a system call
- C. The timer prevents page faults; dual mode prevents deadlock
- D. Both exist only to support virtual memory
Correct answer: B. Dual mode stops user code from executing privileged instructions, and the timer ensures the OS regains control even if a process never makes a system call
Without the mode bit, any program could reprogram hardware; without a timer, an infinite loop in user mode would never give the CPU back to the OS.
More Operating Systems questions
- A system call such as getpid() costs about 100 ns, while a plain function call costs about 2 ns. Which is the main reason?
- In which order does the long-term, medium-term and short-term scheduler act on a process, and which one runs most frequently?
- Which scheduling algorithm can be implemented as a special case of priority scheduling where priority = 1 / (predicted next CPU burst)?
- Which scheduling algorithms can lead to STARVATION? 1. FCFS 2. Non-preemptive SJF 3. SRTF 4. Round Robin 5. Priority without aging
- A system uses Round Robin with quantum q. As q → ∞ it becomes FCFS. What does it approach as q → 0 (ignoring switch overhead)?
- Under a fair-share / proportional-share scheduler, user A runs 1 process and user B runs 4 processes, all CPU-bound, and the two users…