Skip to main content

CPU and IOP communication

Short answer

The CPU tests the IOP’s status, then sends a start I/O command with the I/O program address before resuming its own work. The IOP independently fetches and executes the I/O program, transferring data directly to/from memory, and interrupts the CPU only when the operation completes.

Explain the communication between CPU and IOP with necessary block diagram.

The CPU and the IOP communicate through memory and a few control instructions. The CPU does not execute the I/O; it only starts an I/O program and the IOP runs it.

Block diagram

        +---------+          +-------------------+
        | Memory  |<-------->|   Memory bus      |
        |  unit   |          +----+---------+----+
        +---------+               |         |
                              +---v---+  +--v----+
                              |  CPU  |  |  IOP  |
                              +-------+  +--+----+
                                            | I/O bus
                          +---------+-------+---------+
                          v         v                 v
                      Keyboard    Printer           Disk
                                  (peripherals)

Sequence of communication

   CPU                             IOP
    | -- test IOP path ----------> |
    | <-- status (ready/busy) ---- |
    | -- start I/O (device,        |
    |    address of program) ----> |
    |   (CPU continues own work)   | fetch I/O program
    |                              | from memory (DMA)
    |                              | transfer data
    | <-- interrupt -------------- | (transfer done)
    | -- read status word -------> |
    | <-- status ----------------- |
    | -- check status, error? ---- |
  1. The CPU sends an instruction to test the IOP path to see if the IOP is ready. The IOP replies with a status word (ready or busy, errors).
  2. If the IOP is ready, the CPU sends the start I/O instruction with the device address and the address of the I/O program (a list of commands) in memory. The CPU then continues its own program.
  3. The IOP fetches the I/O program from memory, interprets the commands (read or write, block size, memory address) and transfers data directly with the memory by cycle stealing, controlling the device through the interface.
  4. When the transfer is complete, or on an error, the IOP sends an interrupt to the CPU.
  5. The CPU responds by reading the IOP status word from memory and checking whether the transfer was good, and then continues or starts another I/O.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 7 questions →