6.033 - Computer System Engineering | Recitation 7 - Thursday, February 24, 2004 |
Read Flash: An Efficient and portable Web server (PostScript, PDF), by Pai, Druschel, and Zwaenepoel (reading #7). This paper was published at the USENIX conference, and like most papers published in that venue, describes the implementation of a system in great detail. As you read the paper, try not to get bogged down in the myriad details presented by the authors, such as which version of FreeBSD the test machines were running and how much memory was installed. Instead, focus on the stated problem: creating a high-performance and portable web server. The paper compares four different server architectures: MP, MT, SPED, and AMPED. These architectures differ mainly in how they achieve concurrency; that is, how they are able to process a new request without waiting for previous requests to complete. Make sure you understand the paper's idea of concurrency; it's different from, for example, computational concurrency in a machine with multiple processors. For each architecture, try to figure out:
Since you probably don't have the experience that the authors expect from their readers, here are a few things to keep in mind:
select
system call to wait until data is available on any
socket. If a system uses blocking operations, how can it achieve
concurrency?
rfork
, and Linux uses clone
.
Note that both were borrowed from the experimental OS
Plan 9.
select
syscall to allow asynchronous disk I/O.
How would this "fixed" select
simplify the design of
Flash? If you want to learn more about select or sockets programming in general,
try this
guide to sockets programming (select and non-blocking I/O
are covered in section 4).