The write operation in I/O operation does the following:

2025

The write operation in I/O operation does the following:

  1. A.

    Transfer data from I/O device to memory

  2. B.

    Transfer data from memory to I/O device

  3. C.

    Transfer data from CPU register to memory

  4. D.

    Transfer data from CPU register to I/O device

Attempted by 368 students.

Show answer & explanation

Correct answer: B

Answer: The write operation transfers data from memory to an I/O device.

Typical sequence for a write operation:

  1. The CPU issues a write request specifying the device and the memory buffer containing the data.

  2. Data transfer is performed by one of the following methods:

  3. Programmed I/O: the CPU moves data via registers to the device.

  4. Interrupt-driven I/O: CPU initiates transfers and the device interrupts when ready for more data.

  5. DMA (Direct Memory Access): a DMA controller transfers data directly from memory to the device without continuous CPU involvement.

  6. The device acknowledges completion of the transfer.

Why the other descriptions are incorrect:

  • Transferring data from an I/O device to memory is a read operation, not a write.

  • Transferring data from a CPU register to memory is a CPU memory store; it does not describe moving data to an external I/O device.

  • Transferring from a CPU register to an I/O device can occur in programmed I/O, but the canonical I/O write concept emphasizes moving data from memory to the device; implementations may use registers or DMA to achieve that transfer.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor