Input-output and Communication - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

Input-output and Communication

Description:

Each device is assigned an interrupt number (for errors, ... DMA causes havoc with caches. Can invalidate cache lines that are involved. Can update the cache ... – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 56
Provided by: Lee144
Category:

less

Transcript and Presenter's Notes

Title: Input-output and Communication


1
Input-output and Communication
Lecture 23
  • Prof. Sin-Min Lee
  • Department of Computer Science

2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
Two mechanisms to support communication between
OS and hardware Interrupts and
exceptions Device Interrupt hardware -gt
OS Device Registers OS -gt hardware Each device
is assigned an interrupt number (for errors,
completed tasks) sets a bit in controller,
causes CPU to stop
19
Interrupt
20
(No Transcript)
21
The memory address in the above table (column 3)
is the location of the handler routine that will
be executed as a result of the interrupt. Location
of table hardwired in machine, initialized by OS
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
(No Transcript)
32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
(No Transcript)
42
(No Transcript)
43
(No Transcript)
44
  • Direct-memory access
  • Often used for block access devices that move
    large chunks of data, e.g., disk, graphics device
  • I/O Device has smarts built into its controller. 
    The DMA hardware allows device to directly read
    and write memory without processor intervention.
  • The processor sets up the DMA device controller
  • What operation to perform
  • What locations on the I/O device to access (in
    the case of a disk access, the track and cylinder
    of data block)
  • What locations in memory to access
  • When done, the DMA device will interrupt the
    processor
  • A status register indicates the status of the
    request once completed or terminated

45
  • DMA causes havoc with caches
  • Can invalidate cache lines that are involved
  • Can update the cache
  • Possibly flush cache whenever DMA occurs
  • DMA and virtual memory
  • DMA device could use Physical address of where in
    memory to place/read data, but the transfer must
    then be broken into frame sized chunks.
  • DMA device could use Virtual address of where in
    memory to place/read data, but then it requires
    the physical mappings of each page to send.
  •  

46
(No Transcript)
47
(No Transcript)
48
(No Transcript)
49
(No Transcript)
50
I/O Interfaces - Example of I/O Interface
  • Control register
  • Receives control information from CPU
  • A bit in this register determine the operating
    mode of the device
  • Status register
  • Contains bit to indicate status condition and
    record any error during transfer
  • Interface registers
  • Communicate with CPU via bidirectional bus

51
I/O Interfaces - Example of I/O Interface
  • Data bus select the interface units through chip
    select input (CS) and two register select (RS0)
    and (RS1)
  • CPU and I/O devices are likely to have different
    clock rate that are not synchronized
  • A control signal is needed to
  • Indicate time the data is being transmitted
  • Indicate the window of time when the address is
    valid

52
I/O Interfaces - Example of I/O Interface
  • Two methods to perform this timing between CPU
    and devices
  • Strobing
  • Handshaking

53
(No Transcript)
54
I/O Interfaces - Strobing
55
I/O Interfaces - Handshaking
Write a Comment
User Comments (0)
About PowerShow.com