Docsity

Input Output Hardware - Advanced Operating System - Lecture Slides, Slides of Computer Science

Toggle sidebar
bg1
I/O Hardware
COMP755 1
I/O Hardware
COMP755 Advanced Operating
Systems
I/O Devices
Disk Keyboard
hard Speakers
floppy Printer
CD Mouse
DVD Scanner
Monitor Game controller
Many, many more
I/O Controller
• Connects the I/O devices to the system.
• Communicates with the CPU and the RAM
over the bus.
• A single I/O controller may control multiple
devices.
• Most computers have several I/O
controllers.
• Actions are initiated by the CPU.
Differences in I/O Devices
• Complexity of control
• Unit of transfer
– stream of bytes
– large blocks
• Data representation
– Encoding schemes
• Error conditions
– Devices respond to errors differently
Differences in I/O Devices
• Programmed I/O
– Process is busy-waiting for the operation to
complete
• Interrupt-driven I/O
– I/O command is issued
– Processor continues executing instructions
– I/O module sends an interrupt when done
Differences in I/O Devices
• Data rate
– May be differences of several orders of
magnitude between the data transfer rates
– High speed devices may run faster than the
CPU or bus can process the input.
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Input Output Hardware - Advanced Operating System - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

I/O Hardware

COMP755 Advanced Operating Systems

I/O Devices

Disk Keyboard hard Speakers floppy Printer CD Mouse DVD Scanner Monitor Game controller

Many, many more

I/O Controller

  • Connects the I/O devices to the system.
  • Communicates with the CPU and the RAM over the bus.
  • A single I/O controller may control multiple devices.
  • Most computers have several I/O controllers.
  • Actions are initiated by the CPU.

Differences in I/O Devices

  • Complexity of control
  • Unit of transfer
    • stream of bytes
    • large blocks
  • Data representation
    • Encoding schemes
  • Error conditions
    • Devices respond to errors differently

Differences in I/O Devices

  • Programmed I/O
    • Process is busy-waiting for the operation to complete
  • Interrupt-driven I/O
    • I/O command is issued
    • Processor continues executing instructions
    • I/O module sends an interrupt when done

Differences in I/O Devices

  • Data rate
    • May be differences of several orders of magnitude between the data transfer rates
    • High speed devices may run faster than the CPU or bus can process the input.

Docsity.com

Techniques for Performing I/O

  • Direct Memory Access (DMA)
    • DMA module controls exchange of data between main memory and the I/O device
    • Processor interrupted only after entire block has been transferred
    • DMA may be built into the device controller or may be a separate bus controller

Direct Memory Access

  • Takes control of the system from the CPU to transfer data to and from memory over the system bus
  • Cycle stealing is used to transfer data on the system bus
  • The instruction cycle is suspended so data can be transferred
  • The CPU may pause one bus cycle
    • No interrupt occurs
  • Impact diminished by CPU caching

Buffer Chaining

  • Handles multiple transfers without the processor
  • Device given linked list of buffers
  • Device hardware uses next buffer on list automatically

© D. Comer

Scatter Read and Gather Write

  • Special case of buffer chaining
  • Large data transfer formed from separate blocks
  • Example : to write a network packet, combine packet header from buffer 1 and packet data from buffer 2
  • Eliminates application program from copying data into single, large buffer © D. Comer

Operation Chaining

  • Further optimization for smart device
  • Processor gives series of commands to device, sometimes called a channel program
  • Device carries out successive commands automatically

© D. Comer

Docsity.com

RAID

  • Redundant Array of Independent Disks
  • A collection of disks are used as one large unit of mass storage.
  • Multiple disks operating simultaneously can increase the data transfer rate.
  • Extra data stored on the disks can recover the information should a disk fail.

RAID Types

  • RAID 0 - Striping
  • RAID 1 - Mirroring
  • RAID 2 - Hamming code error recovery
  • RAID 3 - Bit-interleaved parity
  • RAID 4 - Block-level parity
  • RAID 5 - block-level distributed parity
  • RAID 6 - Dual redundancy

RAID 0 (non-redundant)

•Improved transfer rate •Decreased reliability

RAID 1 (mirrored)

•Improved Reliability •Slightly slower writes. •Possibly faster reads

RAID 2 (redundancy through

Hamming code)

Docsity.com

RAID 3 (bit-interleaved parity) RAID 4 (block-level parity)

RAID 5 (distributed block parity)

•Striping improves read performance •Parity improves reliability

RAID 6 (dual redundancy)

•Like RAID 5 but with two parity blocks for each data block •Slow writes

Docsity.com