Functional and hierarchical model IO system

The main target is the IO IO system management device and a corresponding device controller. Its main role is to complete the IO request of users, improving IO rates, and improve equipment utilization, and provides a convenient interface for the high-level process.

The basic functions of I / O System

A, user I / O devices

1. Hide the physical details of the device

  I / O devices often have a variety of types, each transmission direction has different properties, a data size, transmission speed, etc., to hide the details of these complex, simple interface is exposed only to the upper layer.

2. Independence and equipment

  Users can not only use the abstract I / O command, but also be able to use the existing logical device name to select the control I / O devices, and to add a new device driver.

Second, the increase in CPU and I / O utilization

1. improve equipment utilization

  As far as possible so that CPU and I / O devices parallel execution

2. I / O device control

  • Programmable I polled I / O device / O mode
  • Interrupted I / O
  • DMA Direct Memory Access
  • I / O communication road

Third, the sharing of equipment, systems and orderly execution

1. Ensure proper sharing of equipment

  The exclusive device: interprocess exclusive access class resources

  Sharing equipment: such as disk, disk read and write multiple processes can cross

2. Error Handling

  Temporary error: Retry the operation

  Persistence operations: report to the top

Hierarchy I / O system

1. User level I / O software

  Achieve interaction with a user, the user can directly call interface layer provides this function, and the like;

2. Device Independence software

  And a user program for realizing a unified interface to the device driver, the device name, and device protection device allocation and release, while providing the necessary space for the transmission of data

3. Device Drivers

  Directly related hardware to implement the system is applied to a specific hardware instruction

4. The interrupt handler

  Interrupted CPU environment protection, into the interrupt handler, processing, and returns restoration site

Interface I / O system

1. The block device interface

This interface reflects the most essential characteristics of the disk storage, for controlling input and output of such equipment.

(1) block device: data access in units of blocks

(2) a two-dimensional hidden disk structure: converting two physical disk structure of the one-dimensional linear

(3) is a low-level commands are mapped to the abstract operation: converting the commands into simple interface to the upper layer can be recognized by the underlying operating

2. Flow Device Interface

Also known as a character device interface.

(1) character devices: access data in units of characters

(2) get and put operations: not addressable character device, using only sequential access manner, usually with a buffer

(3) in-control instruction: a plurality of character device type, for processing in a uniform manner, it is necessary to provide a common instruction, the instruction comprising a parameter corresponding to different devices

3. The network communication interface

And network protocols and network levels related to network-oriented operating system to provide a variety of interfaces.

(1) network protocols: UDP, TCP, etc.

(2) network architecture: OSI seven-layer model, the TCP / IP protocol is actually used, only five

 

Guess you like

Origin www.cnblogs.com/fusiji/p/11409788.html