Lecture 25 I/O Systems - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Lecture 25 I/O Systems

Description:

... with the user. video display terminals. keyboard. mouse ... Processor is free to do other things. From Operating Systems. Internals and Design Principles. ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 19
Provided by: eam80
Category:
Tags: lecture | systems

less

Transcript and Presenter's Notes

Title: Lecture 25 I/O Systems


1
Lecture 25I/O Systems
2
Categories of I/O Devices
  • Human readable
  • used to communicate with the user
  • video display terminals
  • keyboard
  • mouse
  • Printer
  • From Operating Systems. Internals and Design
    Principles. W. Stallings. Prentice Hall

3
Categories of I/O Devices
  • Machine readable
  • used to communicate with electronic equipment
  • disk drives
  • tape drives
  • controllers
  • Actuators
  • From Operating Systems. Internals and Design
    Principles. W. Stallings. Prentice Hall

4
Categories of I/O Devices
  • Communication
  • used to communicate with remote devices
  • digital line drivers
  • Modems
  • From Operating Systems. Internals and Design
    Principles. W. Stallings. Prentice Hall

5
Differences in I/O Devices
  • Data Transfer Rate
  • Application
  • disk used to store files must have
    file-management software
  • disk used to store virtual memory pages needs
    special hardware to support it
  • terminal used by system administrator may have a
    higher priority
  • From Operating Systems. Internals and Design
    Principles. W. Stallings. Prentice Hall

6
Differences in I/O Devices
  • Complexity of control
  • Unit of transfer
  • data may be transferred as a stream of bytes for
    a terminal or in larger blocks for a disk
  • Data representation
  • encoding schemes
  • Error conditions
  • devices respond to errors differently


  • Operating Systems. Internals and
    Design Principles
  • .


    W. Stallings. Prentice Hall

7
Hardware
  • Device
  • Port
  • Bus
  • Controller
  • Computer System

8
Hardware
monitor
processor
cache
Graphics controller
Memory controller
memory
PCI bus
IDE disk controller
disk
disk
9
Techniques for Performing I/O
  • 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
  • From Operating Systems. Internals and Design
    Principles. W. Stallings. Prentice Hall

10
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
  • From Operating Systems. Internals and Design
    Principles. W. Stallings. Prentice Hall

11
Programmed I/O Polling
  • Controller
  • Indicates its state through the busy bit in the
    status register.
  • Sets the busy bit when it is busy working
  • Clears the busy bit when it is ready to accept
    the next command
  • Host
  • Signals its wishes via the command-ready bit in
    the command register
  • Sets the command ready bit when a command is
    available to execute

12
Programmed I/O Polling

0
?
1
1
0
INFO
13
Simple Interrupt Processing
From Operating Systems. Internals and Design
Principles. W. Stallings. Prentice Hall
14
Interrupt Handler
  • A program that determines nature of the interrupt
    and performs whatever actions are needed
  • Control is transferred to this program
  • Generally part of the operating system

From Operating Systems. Internals and Design
Principles. W. Stallings. Prentice Hall
15
Multiple InterruptsSequential Order
  • Disable interrupts so processor can complete task
  • Interrupts remain pending until the processor
    enables interrupts
  • After interrupt handler routine completes, the
    processor checks for additional interrupts

From Operating Systems. Internals and Design
Principles. W. Stallings. Prentice Hall
16
Multiple InterruptsPriorities
  • Higher priority interrupts cause lower-priority
    interrupts to wait
  • Causes a lower-priority interrupt handler to be
    interrupted
  • Example when input arrives from communication
    line, it needs to be absorbed quickly to make
    room for more input

From Operating Systems. Internals and Design
Principles. W. Stallings. Prentice Hall
17
Direct Memory Access (DMA)
  • I/O exchanges occur directly with memory
  • Processor grants I/O module authority to read
    from or write to memory
  • Relieves the processor from the task
  • Processor is free to do other things

From Operating Systems. Internals and Design
Principles. W. Stallings. Prentice Hall
18
Six step process to perform DMA transfer
From Operating System Concepts. Silberschatz
Galvin Addison Wsley
Write a Comment
User Comments (0)
About PowerShow.com