[Operating system] IO system concept

IO device classification

  • By using the characteristics of the device
    • Storage devices
    • Input and output devices
    • Terminal Equipment
    • Offline device
  • System point of view
    • According to data transfer rate
      • Low-speed devices
        • keyboard
      • Medium-speed devices
        • laser printer
      • High-speed devices
        • Disk drive
    • Press transmission (switching unit)
      • Character device
        • Bytes transmitted / characters belonging unstructured / slow devices
        • printer
        • Not addressable, the IO interrupt-driven, relatively low transmission rate
      • Block device
        • Typically as a storage device, a transmission units between the block size is 512B-4KB
        • Disk
        • Addressable, usually a DMA (direct memory access memory, direct access) mode
    • According to the shared property
      • The exclusive device
        • Only allows a period of time a user (process) access devices
        • Use: apply, use, use, ..., released
      • Shared Device
        • A period of time may allow more than one user (process) access devices
        • Use: use, use, use, ...
      • Virtual Device
        • Virtualization technology by the exclusive programming that can be shared logical device, available for multiple processes simultaneously access
        • -> spooling technology

Using a high-speed large-capacity devices can share the block (disk) to simulate the operation of the exclusive device, so that a plurality of devices into account independence can be used concurrently virtual device

Feature

  • Increase speed IO
  • The exclusive device instead shared device
  • To achieve the function of the virtual device

IO control

  • Direct control program
    • Direct control program (polling)
      • Without interruption mechanism
    • Interrupt control mode
      • Interrupt mechanism is introduced, CPU, and parallel device
    • DMA control
      • Open up a direct information channel between peripherals and memory
    • Control channel
      • A simple processor is simplified CPU (with its own instruction)

The main task of device management: control the data transfer between the device and memory / cpu

 

Buffering

  • purpose
    • Matching CPU and peripheral speed
    • Reducing interrupt frequency
    • Improve the parallelism
  • classification
    • Single buffer
    • Double buffering
    • Circular buffer
    • Buffer pool
  • Buffer operation
    • Semaphore mechanism

Space for time, speed up data processing speed IO system

Guess you like

Origin blog.csdn.net/sinat_39763590/article/details/93157241