Memory-mapped I/O And Port-mapped I/O
Memory-mapped I/O (MMIO) and port-mapped I/O (PMIO) are two complementary strategies of performing input/output (I/O) between the central processing unit (CPU) and peripheral gadgets in a pc (often mediating access via chipset). Another strategy is using dedicated I/O processors, commonly generally known as channels on mainframe computer systems, which execute their very own directions. The Memory Wave Experience and registers of the I/O gadgets are mapped to (associated with) tackle values, so a memory deal with could seek advice from either a portion of bodily RAM or to memory and registers of the I/O system. Each I/O system either monitors the CPU's handle bus and responds to any CPU access of an deal with assigned to that machine, connecting the system bus to the desired gadget's hardware register, or makes use of a dedicated bus. To accommodate the I/O units, Memory Wave Experience some areas of the handle bus utilized by the CPU must be reserved for I/O and should not be accessible for normal bodily memory; the vary of addresses used for Memory Wave Experience I/O devices is set by the hardware.
The reservation could also be everlasting, or non permanent (as achieved through bank switching). An example of the latter is found in the Commodore 64, which uses a type of memory mapping to cause RAM or I/O hardware to appear within the 0xD000-0xDFFF range. Port-mapped I/O typically uses a particular class of CPU instructions designed particularly for performing I/O, such because the in and out instructions discovered on microprocessors based mostly on the x86 structure. Different types of those two directions can copy one, two or four bytes (outb, outw and outl, respectively) between the EAX register or one in all that register's subdivisions on the CPU and a specified I/O port deal with which is assigned to an I/O device. I/O devices have a separate deal with space from basic memory, both completed by an additional "I/O" pin on the CPU's bodily interface, or a complete bus devoted to I/O. As a result of the deal with space for I/O is isolated from that for major memory, Memory Wave Experience this is generally referred to as remoted I/O.
On the x86 architecture, index/information pair is often used for port-mapped I/O. Different CPU-to-system communication strategies, equivalent to memory mapping, don't affect the direct memory access (DMA) for a device, as a result of, by definition, DMA is a memory-to-gadget communication methodology that bypasses the CPU. Hardware interrupts are another communication technique between the CPU and peripheral gadgets, nevertheless, for a number of causes, interrupts are all the time treated individually. An interrupt is gadget-initiated, as opposed to the methods mentioned above, that are CPU-initiated. It is also unidirectional, as information flows solely from gadget to CPU. Lastly, each interrupt line carries only one bit of knowledge with a set that means, specifically "an event that requires consideration has occurred in a device on this interrupt line".