Monday, July 18, 2011

INTRODUCTION TO CONTROL INPUT / OUTPUT

Definitions and Requirements for Control I / O A control system I / O aims to provide assistance to users to enable them to access files, regardless of the details of the characteristics and storage time. Control I / O related to file management and management tools that are part of the operating system. The task of the Control System I / O is: 1) Maintaining a directory of files and location information 2) Determine the path for the flow of data between main memory and secondary storage devices 3) Coordinate komunimasi between the CPU and secondary storage devices 4) Prepare a file using the input or output has been completed
Channel On most computer systems, the CPU is not burdened handle tasks associated with the I / O. But the responsibility for control of equipment delivered to the processor I / O, known as the channel I / O (I / O channels). Channel I / O processor itself is programmed. The programs in this so-called channel-execute the program. This program determines the operating channel, which is required for equipment access and control the data path (data pathway).
Types of Channel 1. Channel selector; Can regulate the flow of data between main memory with a piece of equipment at that time. Since the channel is a fast processors then the channel selector normally only use I / O device with high speed, like a disk. Use of equipment with low speeds, eg card reader. 2. Multiplexor Channel; Can regulate the flow of data between main memory with some equipment. Multiplexor channel is more effective when using equipment with low speeds, as compared with channel selector. With the multiplexor channel, some equipment can be activated simultaneously, but the channels must complete the channel program for the equipment before starting the other program channels. 3. Block Multiplexor Channel; Regulate the flow of data to various devices. Block Multiplexor Channel can execute one instruction of the program channels to one device, can then transfer instructions from the channel program to other equipment.
Miscellaneous Device 1. Dedicated Device; Used for access by one person at any time. Example: Terminal. 2. Shared Device; Used for access by multiple users simultaneously. Example: Disk.
Activity I / O to shared devices is very complex compared to the activity I / O on a dedicated device. Two very important function of the shared device is the allocation of places and the provision of timely access. Channel Activity The purpose of the channel I / O is as an intermediary between the CPU, main memory with a storage controller unit. CPU communicates with the channel through a few simple commands. Some channels will give the command: Test I / O, to determine whether the pathway (pathway) that led to the equipment is busy. Start I / O, on certain equipment. Halt I / O, on certain equipment. Channel typically communicates with the CPU through an interrupt. Interruptions will occur, if the error condition is detected, such as CPU instructions are incorrect or if the activity I / O has been terminated. If an interrupt occurs, control will be forked through regularly interrupt handler (interrupt-handler routine), where the control will determine the cause of the interruption, doing the right activities, then return control to the caller (caller).
Buffer Management Divided into four types of management are: 1. Single Buffering; 2. Anticipatory Buffering; 3. Double Buffering; 4. Three Buffers; 1. Single Buffering;


The picture above shows the structure of the data from the buffer in the form of a simple, consisting of one record per block and one buffer per file, where it serves to fill the request buffer of a program. This buffer structure contains a pointer to the start address & channel program to the file. The basic structure of the channel program to fill the buffer is: Wait for instructions from the program READ Inform instruction start I / O to the control unit Wait until the buffer is emptied Inform interruptions in the program so it can start reading from the buffer The problem that arises here is the user program at the time idle waiting for the buffer filled.
2. Anticipatory Buffering; Another approach that can eliminate some things that might be to wait for the CPU is using Anticipatory Buffering. With the anticipatory buffering, the control system I / O will try to put the needs of the program data. Endeavored that the buffer is always full. Channel always test this flag. If the buffer is near empty, because the user program has to read its contents then the flag will be reset and channel programs will menginitates replenishment buffer. The structure of the channel program to fill a buffer with anticipatory buffer is shown in the figure below:

3. Double Buffering; To reduce the possibility of waiting for the program, then the double buffer can be used. Two of the buffers that exist, only one set for the file. The basic idea of ​​double buffering is if the consumer emptied one buffer, then the producer can fill into the buffer to another, when the first buffer is empty, then the second buffer must be fully charged. Then the consumer can mengkosongkan a second buffer, when the first producer to fill buffers, and so on.

4. Three Buffers;
pfill: which indicates the next buffer will be filled or being filled pempty: which indicates the next buffer will be emptied or being emptied

0 comments:

Post a Comment