Revision as of 17:34, 6 August 2009 editMeganMc08 (talk | contribs)1 edit →Interface← Previous edit | Latest revision as of 02:36, 1 December 2024 edit undoVelvetune (talk | contribs)183 editsm Undid revision 1260496644 by TMP2023 (talk) rv unexplained wikilink removalTag: Undo | ||
(678 intermediate revisions by more than 100 users not shown) | |||
Line 1: | Line 1: | ||
{{short description|Communication between an information processing system and the outside world}} | |||
{{Redirect7|"I/O", "I/O device", "I/O interface", "Read/write channel", and "Transput" all|the use of the term "input-output" in economics|Input-output model|the medical term, see ]. For other uses of the term "I/O"|I/O (disambiguation)}} | |||
{{Redirect|I/O|other uses|I/O (disambiguation)}} | |||
{{More citations needed|date=November 2019}} | |||
{{OS}} | |||
In ], '''input/output''' ('''I/O''', '''i/o''', or informally '''io''' or '''IO''') is the communication between an information processing system, such as a ], and the outside world, such as another computer system, peripherals, or a human operator. ] are the signals or data received by the system and outputs are the signals or ] sent from it. The term can also be used as part of an action; to "perform I/O" is to perform an ]. | |||
'''{{vanchor|I/O devices|IO_DEVICE}}''' are the pieces of ] used by a human (or other system) to communicate with a computer. For instance, a ] or ] is an ] for a computer, while ]s and ]s are ]s. Devices for communication between computers, such as ]s and ]s, typically perform both input and output operations. Any interaction with the system by an interactor is an ] and the reaction the system responds is called the output. | |||
The designation of a device as either input or output depends on perspective. Mice and keyboards take physical movements that the human user outputs and convert them into input signals that a computer can understand; the output from these devices is the computer's input. Similarly, printers and monitors take signals that computers output as input, and they convert these signals into a representation that human users can understand. From the human ]'s perspective, the process of reading or seeing these representations is receiving output; this type of interaction between computers and humans is studied in the field of ]. A further complication is that a device traditionally considered an input device, e.g., card reader, keyboard, may accept control commands to, e.g., select stacker, display keyboard lights, while a device traditionally considered as an output device may provide status data (e.g., low toner, out of paper, paper jam). | |||
In computer architecture, the combination of the ] and ] |
In computer architecture, the combination of the ] and ], to which the CPU can read or write directly using individual ], is considered the brain of a computer. Any transfer of information to or from the CPU/memory combo, for example by reading data from a ], is considered I/O.<ref name="teco">{{cite book|title=The Essentials of Computer Organization and Architecture|last=Null|first=Linda|author2=Julia Lobur|year=2006|publisher=Jones & Bartlett Learning|isbn=0763737690|page=185|url=https://books.google.com/books?id=QGPHAl9GE-IC|access-date=11 December 2016|url-status=live|archive-url=https://web.archive.org/web/20161220112332/https://books.google.com.au/books?id=QGPHAl9GE-IC|archive-date=20 December 2016|language=en}}</ref> The CPU and its supporting circuitry may provide ] that is used in low-level ], such as in the implementation of ]s, or may provide access to ]. An ] is one designed to exploit locality and perform efficiently when exchanging data with a secondary storage device, such as a disk drive. | ||
==Interface== | ==Interface== | ||
⚫ | An I/O interface is required whenever the I/O device is driven by a processor. Typically a CPU communicates with devices via a ]. The interface must have the necessary logic to interpret the device address generated by the processor. ] should be implemented by the interface using appropriate commands (like BUSY, READY, and WAIT), and the processor can communicate with an I/O device through the interface. If different data formats are being exchanged, the interface must be able to convert serial data to parallel form and vice versa. Because it would be a waste for a processor to be idle while it waits for data from an input device there must be provision for generating ]s<ref name="fcoa"/> and the corresponding type numbers for further processing by the processor if required.{{Clarify|reason=meaning unclear|date=December 2016}} | ||
A computer that uses ] accesses hardware by reading and writing to specific memory locations, using the same assembly language instructions that computer would normally use to access memory. An alternative method is via instruction-based I/O which requires that a CPU have specialized instructions for I/O.<ref name="teco"/> Both input and output devices have a ] rate that can vary greatly.<ref name="fcoa">{{cite book|title=Fundamentals of Computer Organization and Architecture|last=Abd-El-Barr|first=Mostafa|author2=Hesham El-Rewini|year=2005|publisher=John Wiley & Sons|isbn=9780471478331|pages=161–162|url=https://play.google.com/store/books/details?id=m6uFlL41TlIC|access-date=11 December 2016|url-status=live|archive-url=https://web.archive.org/web/20161221033042/https://play.google.com/store/books/details?id=m6uFlL41TlIC|archive-date=21 December 2016|language=en}}</ref> With some devices able to exchange data at very high speeds ] to memory (DMA) without the continuous aid of a CPU is required.<ref name="fcoa"/> | |||
⚫ | I/O |
||
===Higher-level implementation=== | |||
A computer that uses ] accesses hardware by reading and writing to specific memory locations, system]] and programming facilities employ separate, more abstract I/O concepts and ] family, traditionally abstract files and devices as ] for input and output. | |||
Higher-level ] and programming facilities employ separate, more abstract I/O concepts and ]s. For example, most operating systems provide application programs with the concept of ]s. Most programming languages provide I/O facilities either as statements in the language or as ] in a standard library for the language. | |||
An alternative to special primitive functions is the ], which permits programs to just describe I/O, and the actions are carried out outside the program. This is notable because the {{nowrap|I/O}} functions would introduce ]s to any programming language, but this allows ] to be practical. | |||
In the context of the ] programming language, the ''input'' and ''output'' facilities are An alternative to special | |||
The I/O facilities provided by operating systems may be ], with files containing ], or stream-oriented, with the file containing a stream of bytes. | |||
==Addressing mode== | |||
==Channel I/O== | |||
There are many ways through which data can be read or stored in the memory. Each method is an addressing mode, and has its own advantages and limitations. | |||
] requires the use of instructions that are specifically designed to perform I/O operations. The I/O instructions address the channel or the channel and device; the channel asynchronously accesses all other required addressing and control information. This is similar to DMA, but more flexible. | |||
⚫ | ==Port-mapped I/O== | ||
There are many type of addressing modes such as direct addressing, indirect and addressing. | |||
] also requires the use of special I/O instructions. Typically one or more ports are assigned to the device, each with a special purpose. The port numbers are in a separate address space from that used by normal instructions. | |||
⚫ | |||
In this type of address of the data is a part of the instructions itself. When the processor decodes the instruction, it doesn't gets the memory address from where it can be read/store the required information. | |||
⚫ | ==Direct memory access== | ||
Mov Reg. | |||
] (DMA) is a means for devices to transfer large chunks of data to and from memory independently of the CPU. | |||
⚫ | ==See also== | ||
Here the <tt>Addr</tt> operand points to a memory location which holds the data and copies it into the specified Reg. | |||
* ] | |||
* ] | |||
⚫ | * ] | ||
* ] | |||
==References== | |||
===Indirect address=== | |||
{{Reflist}} | |||
Here the address can be stored in a register. The instructions will have the register which has the address. So to fetch the data, the instruction must be decoded appropriate register selected. | |||
⚫ | == |
||
] usually requires the use of instructions which are specifically designed to perform I/O operations. | |||
⚫ | ==See also== | ||
*] | |||
==External links== | |||
] | |||
*{{Commons category-inline|Input/output}} | |||
{{DEFAULTSORT:Input output}} | |||
] | |||
] | ] | ||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
⚫ | ] | ||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] |
Latest revision as of 02:36, 1 December 2024
Communication between an information processing system and the outside world "I/O" redirects here. For other uses, see I/O (disambiguation).This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Input/output" – news · newspapers · books · scholar · JSTOR (November 2019) (Learn how and when to remove this message) |
Operating systems |
---|
Common features |
In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs are the signals or data received by the system and outputs are the signals or data sent from it. The term can also be used as part of an action; to "perform I/O" is to perform an input or output operation.
I/O devices are the pieces of hardware used by a human (or other system) to communicate with a computer. For instance, a keyboard or computer mouse is an input device for a computer, while monitors and printers are output devices. Devices for communication between computers, such as modems and network cards, typically perform both input and output operations. Any interaction with the system by an interactor is an input and the reaction the system responds is called the output.
The designation of a device as either input or output depends on perspective. Mice and keyboards take physical movements that the human user outputs and convert them into input signals that a computer can understand; the output from these devices is the computer's input. Similarly, printers and monitors take signals that computers output as input, and they convert these signals into a representation that human users can understand. From the human user's perspective, the process of reading or seeing these representations is receiving output; this type of interaction between computers and humans is studied in the field of human–computer interaction. A further complication is that a device traditionally considered an input device, e.g., card reader, keyboard, may accept control commands to, e.g., select stacker, display keyboard lights, while a device traditionally considered as an output device may provide status data (e.g., low toner, out of paper, paper jam).
In computer architecture, the combination of the CPU and main memory, to which the CPU can read or write directly using individual instructions, is considered the brain of a computer. Any transfer of information to or from the CPU/memory combo, for example by reading data from a disk drive, is considered I/O. The CPU and its supporting circuitry may provide memory-mapped I/O that is used in low-level computer programming, such as in the implementation of device drivers, or may provide access to I/O channels. An I/O algorithm is one designed to exploit locality and perform efficiently when exchanging data with a secondary storage device, such as a disk drive.
Interface
An I/O interface is required whenever the I/O device is driven by a processor. Typically a CPU communicates with devices via a bus. The interface must have the necessary logic to interpret the device address generated by the processor. Handshaking should be implemented by the interface using appropriate commands (like BUSY, READY, and WAIT), and the processor can communicate with an I/O device through the interface. If different data formats are being exchanged, the interface must be able to convert serial data to parallel form and vice versa. Because it would be a waste for a processor to be idle while it waits for data from an input device there must be provision for generating interrupts and the corresponding type numbers for further processing by the processor if required.
A computer that uses memory-mapped I/O accesses hardware by reading and writing to specific memory locations, using the same assembly language instructions that computer would normally use to access memory. An alternative method is via instruction-based I/O which requires that a CPU have specialized instructions for I/O. Both input and output devices have a data processing rate that can vary greatly. With some devices able to exchange data at very high speeds direct access to memory (DMA) without the continuous aid of a CPU is required.
Higher-level implementation
Higher-level operating system and programming facilities employ separate, more abstract I/O concepts and primitives. For example, most operating systems provide application programs with the concept of files. Most programming languages provide I/O facilities either as statements in the language or as functions in a standard library for the language.
An alternative to special primitive functions is the I/O monad, which permits programs to just describe I/O, and the actions are carried out outside the program. This is notable because the I/O functions would introduce side-effects to any programming language, but this allows purely functional programming to be practical.
The I/O facilities provided by operating systems may be record-oriented, with files containing records, or stream-oriented, with the file containing a stream of bytes.
Channel I/O
Channel I/O requires the use of instructions that are specifically designed to perform I/O operations. The I/O instructions address the channel or the channel and device; the channel asynchronously accesses all other required addressing and control information. This is similar to DMA, but more flexible.
Port-mapped I/O
Port-mapped I/O also requires the use of special I/O instructions. Typically one or more ports are assigned to the device, each with a special purpose. The port numbers are in a separate address space from that used by normal instructions.
Direct memory access
Direct memory access (DMA) is a means for devices to transfer large chunks of data to and from memory independently of the CPU.
See also
References
- ^ Null, Linda; Julia Lobur (2006). The Essentials of Computer Organization and Architecture. Jones & Bartlett Learning. p. 185. ISBN 0763737690. Archived from the original on 20 December 2016. Retrieved 11 December 2016.
- ^ Abd-El-Barr, Mostafa; Hesham El-Rewini (2005). Fundamentals of Computer Organization and Architecture. John Wiley & Sons. pp. 161–162. ISBN 9780471478331. Archived from the original on 21 December 2016. Retrieved 11 December 2016.
External links
- Media related to Input/output at Wikimedia Commons