CS FundamentalsHardGATE CS
Which of these instructions must be privileged (allowed only in kernel mode) for the OS to keep control? 1. Disable interrupts 2. Read the time-of-day clock 3. Set the timer 4. Change the page-table base register 5. Issue a trap (system call) instruction
- A. 1, 2, 3, 4 and 5
- B. 1, 3 and 4
- C. 2 and 5
- D. 1, 3, 4 and 5
Correct answer: B. 1, 3 and 4
Disabling interrupts, setting the timer and changing memory mapping would let a user program seize the machine. Reading the clock is harmless, and the trap instruction must be unprivileged because it is how user code enters the kernel.
More Operating Systems questions
- A process calls read() on a file. Put these in the correct order: (a) the kernel validates arguments and starts I/O; (b) the process…
- Which of the following is TRUE about a zombie process?
- A program has 5% serial code and runs on 16 cores. By Amdahl's law, what is the best speedup possible, and what is the limit as the number…
- A web server creates a new process per request using fork() (copy-on-write). Compared with creating a thread per request, which is the…
- vfork() differs from fork() in that:
- Which inter-process communication mechanism does NOT need the kernel to copy the data between the two processes for each message?