Homework 9

22C:116, Fall 1995

Due Friday Oct. 27, 1995, in class

Douglas W. Jones
  1. Background: Figure 10.6 on page 407 in Tannenbaum's Modern Operating Systems describes a very simple file server. This server has the annoying characteristic that users wishing to communicate with it must formulate their programs in terms of message passing primitives.

    Part A: Write a set of client stubs that can be used to isolate the user of this server from the details of network communication. You may have to make some assumptions about details not given in the figure or the accompanying material. These stubs should be named do_create, do_read, do_write and do_delete. (if a pattern in your stub design emerges, feel free to omit unnecessary repetition).

    Part B: To what extent does your code depend on the nature of the communications primitives provided. Is it sensitive to the difference between blocking and nonblocking primitives? Is it sensitive to the difference between buffered and nonbuffered primitives? For each, give a brief explanation of why or why not!

  2. Background: The World Wide Web HTTP protocol is a session based client-server protocol. Thus, when a client wants to retreive a file from a server, the client first opens a private session with the server (using the Telnet protocol), and then uses this session to transmit the name of the desired file to the server using that session. The server replies by transmitting the file back to the client over the same session, and then closes the session.

    Part A: How can an application open a private session with a server? Check the Unix man pages for the system service socket and the pages referenced there in order to get an idea of what is involved in this, and then write a short answer!

    Part B: Describe a top-level design for a web server suitable for use on a large system where multiple clients make concurrent demands for different files, and where the underlying disk subsystem can overlap seeks on one disk drive with I/O transfers to another.

    Part C: Discuss alternatives to the HTTP protocol, with an emphasis on protocols that are supported by the UNIX network interface that you believe could offer a performance improvement. Explain why you believe these would help!