Input / Output
Access to peripherals is done through special locations associated to a certain address. In the 80x86 it can happen in two ways:
-Memory mapped, with which the memory access occurs with a regular instruction. This means that the addressing is occupied by the addresses of the devices.
-Isolated I / O, with which you use specific instructions. It follows that the devices have dedicated addresses.
The address space for I / O is 64K, because the addresses are on 16bit.
Subsystem I / O architecture 80x86
In the management of I / O system bus plays a major role, because it determines how to manage the peripheral, as realized transactions subsequent to the instructions of I / O. The address space for I / O indicates how many records associated with the I / O can have. It 'important that all devices communicating on the same bus, have common rules of communication. The BUS system defines all the rules:
-Transfer modes (single or block)
-Connection mode (interrupts, DMA)
The classical model predicts that there are a number of interfaces that allow devices I / O to communicate with the system bus. Each interface provides several registers:
-Status, which displays information on the peripheral.
-Command, specifying which statement should be made.
-Data, that allow to exchange data with other devices.
There are also parts for bus addresses and data signals R / W and CS.
There are two ways of interconnection between the microprocessor and I / O.
Memory-mapped, for which the addresses of peripheral registers are contained within the same address space assigned to physical memory. In this way the registers are directly accessible through the normal assembly instructions. The limitation is due to the fact that the addresses occupied by the peripheral can not be used by the physical memory. In most areas of RAM in which to include this information must be known a priori.
-Isolated I / O, for which the devices have a reserved address space, which can not be accessed from the normal assembly instructions. Are in fact necessary specific instructions (IN, OUT) to permit the reading and writing of the registers of the subsystem. With this technique, the address space of the memory is not reduced by the devices of the I / O
Management of I / O
The function of the system I / O of a computer is the transfer of data between main memory and peripheral interfaces. The methods used by the CPU to handle requests for service from the remote I / O can occur in two ways:
-Polling; the management of the polling cycle takes place by means of a software reading of the state of all the devices. Every now and each device is polled and if it has requested, the service runs. Most of the time, however, is used in the management of the polling cycle, and this leads to high latency for some devices. The positive factor is the ease of implementation.
-Interrupt, in this type of management does not query the CPU for I / O. When a device needs to be served activates an interrupt request. To do this it is necessary that the interface has a data ready signal / data being transmitted. After the execution of the CPU acknowledges the interrupt request and need, by doing the interrupt handler. A dedicated circuit, said interrupt controller manages interrupt requests.
-DMA (direct memory access).
Depending on the mode of transport data, the peripheral can be distinguished:
-A character, in which the access time is the most influential factor.
-Block, in which the dominant factor is given by the sum of the time of access and the transfer time (disks, network).
Input / Output