CS FundamentalsModerateGATE CS
Which of the following events causes a process to move from RUNNING to READY (not to WAITING)?
- A. It issues a read() on a disk file that is not cached
- B. It calls wait() on a semaphore whose value is 0
- C. It calls sleep(5)
- D. A timer interrupt signals the end of its time slice
Correct answer: D. A timer interrupt signals the end of its time slice
Preemption by the timer leaves the process runnable, so it goes back to the ready queue. I/O requests, blocking semaphore waits and sleep all make it wait for an event.
More Operating Systems questions
- How many of these transitions are possible in the standard five-state model (new, ready, running, waiting, terminated)? 1. waiting →…
- Which of these does a context switch between two threads of the SAME process need NOT change, but a switch between two different processes…
- Which items are shared by all threads of one process? 1. Heap 2. Stack 3. Open file descriptors 4. Program counter 5. Global variables
- In the many-to-one threading model, which statement is correct?
- Assertion (A): User-level thread switching is usually faster than kernel-level thread switching. Reason (R): Switching user-level threads…
- A process is in the middle of a system call when a hardware interrupt arrives. Which statement about mode and stacks is correct on a…