When a user requests a URL like
what does the browser do to retrieve the file via HTTP?
The browser opens a TCP connection to port 80 on
the server ozark.hendrix.edu, sending it a message like
GET /filename.txt HTTP/1.1
a blank line terminates its request
It then awaits a response from the server, which will include
a header describing the requested file, followed by a blank
line, followed by the file contents.
What does SPDY change from HTTP that leads to better
It combines three changes over HTTP.
Requests and response headers are sent using text
compression, so that fewer bits are sent each way.
Multiple requests can be sent simultaneously over the
same TCP connection for the server to process. The server can
multitask in retrieving information for these requests: As it
finds data for a request, it can send fragments of its
response labeled with what request it is responding
The browser can suggest to the server which requests are
most important to handle first.
Give one reason why the SPDY protocol tends to perform
substantially better than HTTP in situations where a fair number
of packets (say 2%) are dropped?
A typical Web page requires about 80 different resources,
which with HTTP would typically be done with 80 different TCP
connections. Whenever a packet is lost during any of these TCP
connections' open-connection phase, TCP will wait several
seconds before timing out and attempting again. By contrast, SPDY uses
just one TCP connection, so losing a packet during the open-connection phase
is much less likely.
Because SPDY's single TCP connection is long-lived,
it will have time to adapt to the proper window size.
Consequently, when a packet is lost, it will typically be
identified through fast retransmit. By contrast, a lost packet
with a short-lived HTTP request is likely to happen when the
window size is still quite small, and the lost packet is more
likely to lead to resetting the window size to 1 and
undergoing slow start again.
Suppose each track on a one-platter, two-head disk has 100 sectors,
numbered from 0. Which takes longer: The time to read sector 1 and
then sector 199, or the time to read 199 and then 201? Why?
It is faster to move from 1 to 199: These are on the same cylinder
(the same track, except on opposite sides of the platter),
so the only time delay is the time for the platter to rotate
nearly one full rotation. By contrast, in moving from 199 to
201, the disk must first move the head one track over and then
wait for the platter to rotate back around.
Suppose the disk previously served a request at track 50 before
going to track 52 to serve another request. It has six
outstanding requests that have arrived in this order:
47, 1, 58, 82, 35, 100
What order will these be served with each of the following
47, 1, 58, 82, 35, 100
47, 58, 35, 1, 82, 100
58, 82, 100, 47, 35, 1
Suppose we have a disk of 10 sectors, numbered 2 through 9,
with the following three files occupying sectors as listed.
8, 4, 9
6, 3, 7
What would the FAT contents be (using 0 to indicate end of
file, 1 to indicate unused)?
Suppose we had an i-node based filesystem using 512-byte
sectors, where each i-node
contains the identifiers of 11 sectors followed by
the identifier of a single-indirect sector
followed by the identifier of a double-indirect sector.
Each sector identifier fits into four bytes.
What is the maximum number of bytes a file may contain?
Each indirect sector contains 512/4 = 128 sector identifiers.
So the i-node may contain 11 sector identifiers,
the single-indirect sector 128 identifiers,
and the double-indirect sector 128² = 218 = 256K
identifiers, for a total of
11 + 128 + 262,144 = 262,283 sectors.
Each sector has 512 bytes, for a total of
262,283 × 512 = 134,288,896 bytes.
[No, you wouldn't be expected to figure this out without a