I/O device concept:
It refers to all devices inside the computer except the central processor and memory, also known as external devices.
I/O device category:
· Classification by interaction object:
· Human-Computer Interaction Device
· Devices that interact with computers or other electronic devices
· Same-Email devices between computers
· Classification by interaction:
· Input (readable)
· Output (writable)
· Input/output (read/write)
· Classification by peripheral features:
· Features
· Data transfer rate
· Information Organization Features
I/O Control Mode:
· Program Access Control Method
· Interrupt control mode
· DMA (Direct Memory addressing): Data Transfer in memory
· Channel mode (represented by USB)
I/O software goals:
· Device independence: when accessing a device, you do not need to know the specific operation method of the device.
· Uniform Naming
I/O hierarchy:
· User layer
· Device independent Layer
· Device driver layer
· Medium fault
· Hardware layer
I/O scheduling concept:
Scheduling a group of requests is to determine a good order to run these requests.
The operating system maintains a request pair column for each device for scheduling.
One way for the I/O core subsystem to improve computer efficiency is to schedule I/O operations and use memory or disk storage technology, such as buffering, high-speed cache, and off-line.
Cache:
High-speed cache is a high-speed memory that can retain data copies. The cache copy access is more efficient than the original data access.
Cache zone:
A buffer is the memory area used to store data between two devices or between devices and applications.
Three Functions of buffering are used:
· The speed difference between producers and consumers who process data streams
· Coordinating devices with inconsistent data sizes
· Copy semantics of application I/O
Buffer zone:
· Single Buffer
· Dual Buffering
· Circular buffer
· Buffer Pool
Device allocation Overview:
· For an exclusive device process, you must apply for allocation before I/O transmission.
· For shared devices and Virtual Devices, there is no need to consider allocation issues. The process can be directly requested through file systems.
Principles of device allocation:
Depends on the device features, user requirements, and system configurations.
Device allocation methods: Static and Dynamic Allocation
Device allocation policy: first request first allocation (FIFO), first allocation of higher priority
Spooling ):
Convert an exclusive device into a shared Device
Composition of the spooling system:
· Input and Output wells (stored in external storage)
· Input buffer and output buffer (in memory)
· Input process SP1 and output process sp0
Error handling:
If an error occurs on the I/O device, it should be handled by I/O.
Chapter 5: input/output (IO) Management