Operating system class notes (7) device management

Source: Internet
Author: User

1. device management tasks and functions

Device management tasks

(1) access external devices as required by users. The system allocates and manages and controls according to certain algorithms, so that users do not have to worry about the actual address and control commands of devices;

(2) improve the utilization rate of input and output devices as much as possible, such as the real parallel working capability between the host and peripherals and between peripherals.

Device management

(1) Allocate Devices

(2) control and implement real input/output operations

(3) Manage the input/output buffer zone

(4) Implement Virtual Device Technology in some large systems

2. External Device category

(1) By system and user: System devices and user devices

(2) input/output-based transmission mode (UNIX or Linux operating system): balanced devices and block Devices

(3) By resource features: exclusive devices, shared devices, and Virtual Devices

(4) Hardware physical characteristics: sequential Device Access and direct Device Access

(5) device usage: physical devices, logical devices, and pseudo Devices

Device I/O methods: inquiry, channel, and interruption

I/O device allocation algorithm: first-come first-served (FCFS), allocation by priority

3. device management technology

(1) I/O setting cache reasons

Resolve the inconsistency between the arrival rate and departure rate of information;

Cache acts as a transfer station;

So that the information entered at one time can be used multiple times;

You can set local registers in the channel or controller as the buffer memory to store I/O information to reduce the number of CPU interruptions. This situation can be further promoted, so that the information read at one time can be reused multiple times.

(2) technology of virtual devices (SPOOLing)

SPOOLing is a technology used to exchange information between a slow character device and a computer host ". It is a management technology for pre-input, slow output, and dump.

SPOOLing system features:

Improved I/O speed;

Transform an exclusive device into a shared device (a typical example is the "sharing" of a printer ");

Implements the virtual device function.

4. device processing procedure

Features of the device driver

(1) convert the received abstract requirements into specific requirements;

(2) Check the legality of the user's I/O Request, understand the status of the I/O device, pass the I/O parameter, and set the working method of the device;

(3) Issue the I/O command, start the allocated I/O device, and complete the specified I/O operation;

(4) Respond to the interrupt request sent by the Controller or channel in a timely manner, and call the corresponding interrupt handler Based on the interrupt type for processing;

(5) For computer systems with channels, drivers should be able to automatically form channel programs based on user I/O requests.

Features of Device Drivers

(1) The driver is mainly a communication program between the process requesting I/O and the device controller.

(2) drivers are closely related to the characteristics of I/O devices.

(3) The driver is closely related to the I/O control mode.

(4) because the driver program is closely related to the hardware, some of the programs are written in assembly language. At present, there are many drivers whose basic parts have been fixed and placed in ROM.

Device Processing Method

(1) Converting abstract requirements into specific requirements

(2) check the validity of the I/O Request

(3) read and check the device status

(4) Transmit necessary parameters

(5) setup and I/O device startup


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.