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.

  1. A. a, b, c, d, e
  2. B. b, a, c, d, e
  3. C. b, a, d, c, e
  4. 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

Exams that ask this topic