

\documentstyle[twocolumn]{article}

\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{-0.3in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.8in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.1in}

\begin{document}

\bf
\hfill Name:  $\underline{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }$
% \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\rm
\bigskip
                                      
{\bf Directions:} Work on this sheet (both sides, if needed) only;
{\bf do not turn in any supplementary sheets of paper}.  There is actually
plenty of room for your answers, as long as you organize yourself
BEFORE starting writing.  In order to get full credit,
\large\bf
WRITE LEGIBLY
\normalsize\rm
($\infty$ points off for illegible handwriting!), and
\large\bf
SHOW YOUR WORK.  The earlier problems, and the earlier parts within each 
problem, are intended to be easier---MAKE SURE YOU WORK ON THEM FIRST!  
\normalsize\rm

{\bf 1.}  Answer the following questions about Fig. 8.6, p.650:

\begin{itemize}

\item [(a)]  (10) In the Characteristics column, which two items represent
the two main components of disk-access latency (the ``garden-hose''
notion of latency discussed in class)?

\item [(b)]  (10) In the Characteristics column, which one item represents
the main component of disk-access bandwidth?

\item [(c)]  (10) Suppose we read a single 512-byte sector on the ST19171
in a track immediately adjacent to the track over which the read/write
head is currently positioned.  As measured from the time the request is
made to the time the last bit is sent, what is the worst-case time in
seconds for the request to be completed?  {\bf Leave your answer in
``arithmetic'' form, NOT as a single number.  In other words, if your
computation is 2 + 3 x 5, write down ``2 + 3 x 5'', NOT ``17.''}

\end{itemize}

{\bf 2.}  (10) Fill in the blanks:  For the faster I/O devices, we should
use \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ instead of polling, so as to
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ the number of bus transactions.

{\bf 3.}  (10) Fill in the blanks:  A process in which two parties
on a bus exchange signals, each acknowledging an action by the other,
is called \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_.

{\bf 4.}  (10) Fill in the blank:  On some buses, a device A could
send memory a read request but before memory responds, another device
B could send another read request.  This is called
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_.

{\bf 5.}  (10) Fig. 7.22, p.584 is actually presented only in simplified
form.  Besides the Valid bit and the Physical Page Number, there are two
other kinds of bits which definitely should be shown in each entry to
the page table.  What are they?

{\bf 6.}  (10) Fill in the blank:  Back on p.561, Fig. 7.13(c), a block of
four words would be obtained from a single access request.  The official
term for this in Chapter 8 is \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_.   

{\bf 7.}  (10) Look at Fig. 7.25, p.593, and consider what accesses to
main memory might arise from a single read request.  State the best- and
worst-case number of words of memory which would be read to satisfy this
request (including the requested read itself).

{\bf 8.}  (10) Consider a system with memory-mapped I/O, with a printer
whose Data and Status registers are at addresses 0x22 and 0x24,
respectively.  The Done bit is the most significant bit in the Status
register, equal 1 for done, 0 for not yet done.  Suppose in the printer
device driver we have declarations 

\begin{verbatim}
char *P;  int N;
\end{verbatim}

and we need to print N characters starting at the one pointed to by P.
Write C-language code to do the printing, using polling.



\end{document}



