CS FundamentalsModerateGATE CS
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 executes a trap instruction; (c) the process is moved to the waiting state and another process runs; (d) the disk interrupt marks the process ready; (e) the data is copied to the user buffer and read() returns.
- A. a, b, c, d, e
- B. b, a, c, d, e
- C. b, a, d, c, e
- D. b, c, a, d, e
Correct answer: B. b, a, c, d, e
The trap enters the kernel, which validates and starts the I/O, then blocks the caller and schedules another process; the completion interrupt wakes the caller, which finishes the copy and returns to user mode.
More Operating Systems questions
- 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?
- A pipe has capacity 64 KB. A writer process writes 100 KB with a single write() call while no process ever reads from the pipe. What…