Doubt about computer architecture and modern operating systems?

An I/O device is controlled by the device controller, that uses a local buffer to save its data.

My question is: can the CPU read directly from this device controller rather than RAM?

Because in my book there's written something like "The CPU can communicate with no one but RAM", but in another page there's a drawing where the CPU communicates directly with the device controller...

3 Answers

Relevance
  • 2 months ago

    Hi. At some point a device will need to have it's physical state checked, this is done across what's called the motherboard's I/O bus. The results of that check are passed through the hardware controller, onto the I/O bus, then to the CPU - which can read the results as a programming command. This transfer means that there is no RAM access during the process, just like when You used to use commands to dump something directly to the "LPT1:" or "prn:" ports back in the days of Centronix & parallel printers.

       G'Luck!!!.

  • Me2
    Lv 7
    2 months ago

    The explanation is ambiguous because it's incomplete.  Nearly all modern devices use "memory-mapped input/ouput", in which device registers and memory appear as RAM in the address space.  If system RAM exists at those locations, the device hardware takes precedence.                                                                                                                          80x86 and newer architectures also include a 64KB "port" space not in the system RAM area, which can simultaneously emulate 8-bit, 16-bit, and 32-bit ports.  It is obviously extremely limited in comparison with the memory-mapping feature and, I believe, not supported beyond Windows 7.

Still have questions? Get answers by asking now.