GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

I/O Subsystem

Artur Assis Operating Systems Superior Portugiesisch

I/O Subsystem

Inhalt der Mindmap

I/O Subsystem

  1. I/O Hardware

    • I/O devices
      • Storage
      • Transmission
      • Human Interface
    • Controller
      • Operates ports, bussess, and devices. Contains processor, microcode, private memory, bus controller, etc.
    • Typical PC bus structure
      • OBS.: Chipset is responsible for controlling the PCIe bus.
    • Device Registers
      • Devices usually have registers where device driver places commands, addresses, and data to write or read.
      • Data-in register
      • Data-out register
      • Status Register
      • Control register
    • Device address
      • Device data and command registers mapped to processor address space.
  2. Mechanism to wait for I/O

    • Polling
      • Apply the concept of busy-wait.
      • Reasonable for fast devices, but inefficient for slow devices
    • Interrupt
      • CPU interrupt-request line is triggered by I/O device. Processor checks for interruption after each clock cycle. It avoids the busy-wait necessary in polling technique.
      • Interrupt Handler
        • Receives interrupts. It the interrupt is maskable, it can be delayed or ignored.
      • Interrupt Vector
        • Dispatches interrupt to correct handler.
      • Interrupt-driven I/O cycle
      • Used for exceptions
      • Trap
        • Executed by system call to trigger kernel to execute the request. Interrupt generated by software.
  3. Direct Memory Access (DMA)

    • Mechanism to bypass CPU allowing direct data transfer between I/O device and memory.
    • It requires a DMA controller
    • Steps
  4. Characteristics of I/O devices

    • Types
      • Block I/O
      • Character I/O (stream)
      • Memory-mapped file access
      • Network socket
    • Block and Character devices
      • Block
        • Commands
          • read
          • write
          • seek
        • DMA
        • Memory-mapped file access possible
        • Ex. Disk drives
      • Character
        • Commands
          • get
          • put
        • Ex. keyboard, mouse, serial ports
    • Network devices
      • may transfer blocks or characters, depending on the characteristics of the network device
      • Ex. Socket interface
    • Clocks and Timers
      • Provide current time, elapsed time.
      • Programmable intercval timer
        • Used for timings or periodic interrupts
  5. blocking/nonblocking/asynchronous I/O operation protocol

    • Blocking
      • The process is suspended until I/O is completed.
      • Blocking
    • Nonblocking
      • Small blocking operations. Partial results are returned as long as they are available.
        • select() to check if data is ready then read and write to transfer that data.
    • Asynchronous
      • Process keep running while the I/O operation is executed. After finishing i/O operation, the hardware send interruption and the I/O result is handled.
      • Asynchronous
  6. Vectored I/O

    • Ex. UNIX readve() accepts a vector of multiple buffers to read/write.
    • Allows one system call to perform multiple I/O operations
    • Better than multiple individual I/O operations
      • Avoid context switching
      • Less system call overhead
  7. Kernel

    • Kernel I/O structure
    • Kernel I/O subsystem
      • Scheduling
      • Buffering
        • Store data in memory while transferring between devices
        • deal with
          • speed mismatch
          • size mismatch
        • Double buffering
          • Two copies of the data
            • Kernel and user, Varying sizes, etc.
      • Device Status Table
      • Caching
        • Improve performance
      • Spooling
        • Hold output for a device
      • Device reservation
      • Error Handling
        • OS can recover from read/write failures, device unavailable.
        • Actions
          • Retry read/write
          • Return error number or code when I/O request fails
          • Sendo error report to system error logs.
      • I/O protection
        • I/O instructions defined to be privileged
        • I/O must be performed via system calls
      • Power Management
        • I/O related
        • Very important in mobile computing
          • Ex. Android system
            • Component-level power management
              • Understands relationship between components
              • Device tree representing physiucal device topology
                • Turn off unused branches
              • Turn off unused components
            • Power collapse
              • Put device into deep sleep.
        • Advanced Configuration and Power Interface (ACPI)
          • Firmware that provides code that runs routines called by kernel for device discovery, error and power management.
    • Kernel Data Structures
      • Kernel keeps state info for I/O components, including open file tables, network connections, character device state. It also has data structures to keep track of buffers, memory allocation, "dirty" blocks, etc.
      • Unix kernel I/O data structure
  8. Kernel I/O subsystem summary

    • Management of the name space for files and devices
    • Access control to files and devices
    • Operation control
    • File system space allocation
    • Device allocation
    • Buffering, caching, and spooling
    • I/O scheduling
    • Device-status monitoring, error handling, and failure recovery
    • Device-driver configuration and initialization
    • Power management of I/O devices
  9. I/O request to hardware operations

    • 1. Determine the device holding file;
      • 2. Translate name to device representation;
        • 3. Physically read data from disk into buffer;
          • 4. Make data available to requesting process;
            • 5. Return controll to process;
  10. Life cycle of an I/O request

Bilder und Dateien der Mindmap

  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem
  • I/O Subsystem

Informationen

Beschreibung
Superior Operating Systems Mindmap am I/O Subsystem, erstellt von Artur Assis am 18/06/2022.
Erstellt von
Artur Assis
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck