Operating System--io Management

Source: Internet
Author: User

I. IO system architecture

In a computer system, the CPU interacts with many peripherals. such as mouse, keyboard, network card and so on.

1. How does io coordinate the work?

(1) For the equipment, it has two parts, part is the mechanical part, the other part is the electronic control part.

and the electronic control part is through the various registers and the CPU carries on the communication, is controlled by the CPU.

such as control registers, data registers, status registers. They are connected to the control bus, data bus, and state bus respectively.

(2) Management of IO devices by operating system

Mainly divided into three parts: logic io, device driver, interrupt service Program

Device drivers: Complete a variety of controls on different devices, providing interfaces to the application layer.

Interrupt Service Program: When the device ends, the interrupt signal is signaled to the CPU.



2, the classification of equipment--by the data organization

2.1 Pieces of equipment: a unit of data block as the transport storage

2.2-character Device: stores transmission information in characters.


3. The goals and tasks of IO Management (why device Management)

(1) According to the user's request, control the various operation of the equipment. Completes the IO device and memory data exchange, finally completes the IO request.

Device Allocation and recycling: View the status of the device, invoke the relevant allocation policy, and make the allocation of the device.

Execute device driver: The user completes the control of the device through the device driver.

Set Interrupt handling: Interrupts the CPU when the device is complete.

(2) to establish a convenient and unified device-independent interface

Convenience: The user provides a convenient interface, so that the control of external devices without regard to complex physical characteristics.

(3) Make full use of various technologies (channel, interrupt, buffer, etc.) to improve the parallel working ability between CPU and equipment, equipment and equipment.


4. IO control mode

(1) Polling method: Constantly view the status information of the IO device, and then respond.

(2) Interrupt mode: Interrupts the CPU when the device completes operation.

(3) DMA: No direct data exchange via CPU, memory and IO devices.


5. Design of IO Software


Layered design ideas.

The bottom layer is the control and operation of the hardware. The upper level is the logical operation.

(1) User-level IO software: The user performs input and output system calls to format IO data.

(2) device-independent software layer

(3) Device driver layer

(4) Interrupt processing layer: When the IO operation is complete, the device driver process is awakened and the interrupt processing is performed.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Operating System--io Management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.