Input and Output Management
Input / Output management refers to the communication between an information processing system (such as a computer), and the outside world, possibly a human, or another information processing system. 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 used by a person (or other system) to communicate with a computer. For instance, a keyboard or a mouse may be an input device for a computer, while monitors and printers are considered output devices for a computer. Devices for communication between computers, such as modems and network cards, typically serve for both input and output.
The output from these devices is input for the computer. Similarly, printers and monitors take as input signals that a computer outputs. They then convert these signals into representations that human users can see or read. For a human user the process of reading or seeing these representations is receiving input. These interactions between computers and humans is studied in a field called human–computer interaction.
The combination of the CPU and main memory (i.e. memory that the CPU can read and write to directly, with individual instructions) is considered the brain of a computer, and from that point of view any transfer of information from or to that combination, for example to or from a disk drive, is considered I/O. The CPU and its supporting circuitry provide memory-mapped I/O that is used in low-level computer programming in the implementation of device drivers. An I/O algorithm is one designed to exploit locality and perform efficiently when data reside on secondary storage, such as a disk drive.
Buffer Basic Concept
A link has some capacity that determines the number of message that can reside
in it temporarily. This property can be viewed as a queue of message attached to
the link. Basically, there are three ways that such a queue can be implemented:
Zero capacity: The queue has maximum length 0; thus the link cannot have any message in it. In this case the sender must wait until the recipient receives the message.
A link has some capacity that determines the number of message that can reside
in it temporarily. This property can be viewed as a queue of message attached to
the link. Basically, there are three ways that such a queue can be implemented:
Zero capacity: The queue has maximum length 0; thus the link cannot have any message in it. In this case the sender must wait until the recipient receives the message.
The processes must be synchronized for 0a1 message.
Bounded capacity: The queue has finite length n, thus at most n
message can reside in it. If the queue is not full when a new message is sent, the latter is placed in the queue and the sender can continue execution without waiting. If the link is full, the sender must be delayed until space is available in the queue.
Unbounded capacity: The queue has potentially infinite, thus any number of message can wait in it. The sender is never delayed.
Bounded capacity: The queue has finite length n, thus at most n
message can reside in it. If the queue is not full when a new message is sent, the latter is placed in the queue and the sender can continue execution without waiting. If the link is full, the sender must be delayed until space is available in the queue.
Unbounded capacity: The queue has potentially infinite, thus any number of message can wait in it. The sender is never delayed.
Single Buffer
- The simplest time of support that the operating system can provide.
- When a user process issues an I/O request the operating system assign a buffer in the system portion of main memory to the operation.
- For block oriented devices, the single buffering scheme can be described as follows.
- Input transfers are made to the system buffer.
- When the transfer is complete, the process moves the block into users space and immediately request another block.
- This is called reading ahead, or anticipated input; It is done in the expectation that the block will eventually be needed.
- For many types of computation, this is a reasonable assumption most of the time.
- Only at the end of a sequence of processing will a block be read in unnecessarily.
Double Buffer
- An improvement over single buffering can be had by assigning to system buffer to the operation.
- A process now transfer data to (or from) one buffer while the operating system empties (or fills) the other.
- This techniques is known as double buffering or buffer swapping.
- For block oriented transfer we can roughly estimate the transfer time as max [C,T].
- It is therefore possible to keep the block oriented device going at full speed if C< T.
- On the other hand, if C>T, double buffering ensures the process will not have to wait for I/O.
- In either case, an improvement over single buffering is achieved.
- Again, this improvement comes at the cost of increase complexity.
- For stream oriented input, we again are faced with the two alternative mod of operation.
- For line-at-a-time I/O, the user process need not be suspended for input or output unless the process runs ahead of the double buffers.
- For byte-at-a-time operation, the double buffer offers no particular advantage over a single buffer of twice the length.
Recognize spooling technique
Ø In computer science, spooling refers to a process of transferring data by placing it in a temporary working area where another program may access it for processing at a later point in time.
Ø The normal English verb "spool" can refer to the action of a storage device that incorporates a physical spool or reel, such as a tape drive.
Ø Spooling refers to copying files in parallel with other work. The most common use is in reading files used by a job into or writing them from a buffer on a magnetic tape or a disk.
Ø Spooling is useful because devices access data at different rates. The buffer provides a waiting station where data can rest while the slower device catches up. This temporary working area would normally be a file or storage device.
Ø The most common spooling application is print spooling: documents formatted for printing are stored onto a buffer (usually an area on a disk) by a fast processor and retrieved and printed by a relatively slower printer at its own rate.
Ø Spooler or print management software may allow priorities to be assigned to jobs, notify users when they have printed, distribute jobs among several printers, allow stationery to be changed or select it automatically, generate banner pages to identify and separate print jobs, etc.
Ø The temporary storage area to which E-mail is delivered by a Mail Transfer Agent and in which it waits to be picked up by a Mail User Agent is sometimes called a mail spool.


No comments:
Post a Comment