Skip to main content
Contents
Dark Mode Prev Up Next Profile
\(\newcommand{\N}{\mathbb N} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 5.1 IO Devices
Start by reading the
I/O devices chapter, section 36.1. Key takeaway: There are multiple levels of "busses", with difference performance characteristics. Memory/Graphics/General IO.
Read sections 36.2 and 36.3 which describe the so-called
canonical device .
Practice 5.1.1 .
Practice 5.1.2 .
How do we use the registers of the canonical device?
Status
Read it to find out what state the device is in.
Command
Write to it to tell the device to do something.
Data
Read/write information from/to the device.
Practice 5.1.3 .
What are the downsides of the
programmed I/O protocol discussed in this section?
Read section 36.4 about using interrupts to avoid the CPU-waiting overhead.
Practice 5.1.4 .
Whatβs the best approach to use (polling vs interrupts) for a given device speed?
Fast device that will finish very quickly.
Polling
Slow device that will probably take a while.
Interrupts
Unknown or variable speed.
Hybrid (Poll for a while then interrupt)
Read section 36.5 about efficient data movement using
Direct-Memory-Access (DMA).
Practice 5.1.5 .
What does DMA allow us to do?
We can copy the needed data to/from the device while our CPU is doing something else.
We can carry out multiple reads/writes on a device at the same time.
We can copy the data to the device quicker.
Read section 36.6 about methods of interacting with a device. In particular understand the
memory-mapped IO approach.
Read section 36.7 about
device drivers .
Skim the remaining sections.
You have attempted
of
activities on this page.