Catatan Popular

Khamis, 24 Mac 2011

Input Output Management

Input Output Procedure

A computer system uses a device controller to facilitate the transfer of information between the device and the CPU. A complex controller like small computer system interface (SCSI) may permit connecting several I/O devices simultaneously.

BUFFERING
A)    SINGLE BUFFER
The simplest time of support that the operating system can provide is single buffering. 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.  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 approach will generally provide a speed up compared with the lack of system buffering. The user process can be processing one block of data while the next block is being read in. 


The operating system is able to swap the process out because the input operation is taking place into system memory rather than into user process memory. This technique does, however, complicate the logic in the operating system. 

B)    DOUBLE BUFFER
An improvement over single buffering can be had by assigning to system buffer to the operation. A process now transfer data to  one buffer while the operating system empties or fills the other. 

 It is therefore possible to keep the block oriented device going at fullspeed if . On the other hand, if  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. 
SPOOLING
Spooling is a way of dealing with dedicated I/O devices in a multiprogramming system.  Instead what is done to create a special process, called a daemon and a special directory, is a spooling directory. Spooling is not only use for printers it is also used in other situation. For example, file transfer over a network often uses a network daemon. 


To send a file somewhere, a user puts it in a network spooling directory. Later on, the network daemon takes it out and transmit it.  This network consists of thousand of machine around the world communicating by dial up telephone lines and many computer network

Tiada ulasan:

Catat Ulasan