CPS 214 Programming Project 1 - Fall 1997

Due: Wednesday, Sept. 24 (midnight)

25 points

Using Getting Started with the x-kernel as a guide, configure an instance of the x-kernel that includes TCP, UDP, IP, ICMP, ARP, VNET, ETH and SIMETH. Run the resulting kernel on a pair of Solaris/Sparc workstations. Measure the latency and throughput of UDP and TCP on this platform.

To measure round-trip latency, use UDP and TCP to send and receive messages of size 1-byte, 100-bytes, 200-bytes, 300-bytes, ..., and 1000-bytes.

To measure throughput, use UDP and TCP to send messages of size 1KByte, 2KBytes, 4KBytes, 8KBytes, 16KBytes, and 32KBytes in one direction, with a 1-byte acknowledgment message sent in the reverse direction. As a second measure of TCP throughput (this does not apply to UDP), measure the time it takes to send 1MByte of data from one machine to another, varying the number of messages and size of each message; e.g., 512 x 2KByte messages, 1024 x 1KByte messages, 2048 x 512-byte messages, and so on.

Turn in a brief (one-page) description of your experiments and summary of the results, along with three graphs: one for UDP/TCP latency, one for UDP/TCP throughput using the first throughput test, and one for TCP throughput using the second throughput test. Also, using the submit_cps214 program and the assignment name p1, submit the test program(s) and configuration files that you used.

Hints

The source code for the x-kernel is located in /usr/project/courses/cps214/xkernel. That means you can skip step 1 in the Ten Step Process of Getting Started with the x-kernel, starting at step 2.2. You should create your instance of the x-kernel in your own home directory. Note that you will need to substitute /usr/project/cps214/xkernel in the appropriate places where references to /usr/xkernel are assumed.

Configure the asp protocol (described in chapter 2 of the text) and test it using asptest. Use a debugger to trace through the execution to get a sense for how things execute.

The following question will be on the next written homework assignment. You probably want to understand to study the x-kernel in enough detail to answer the question before actually attempting to do the assignment itself.

Configure and run the ``asp'' protocol described in Chapter 2 of Peterson and Davies. Use ``asptest'' to test it. If you want to modify asptest.c, copy it into your ``solaris'' directory (i.e., where you are building the x-kernel), and edit the Makefile so that it uses your private copy of asptest.c rather than the one in the x-kernel library. The x-kernel library files can be found in /usr/project/courses/cps214/xkernel, with asptest.c located in subdirectory protocols/test under it.

  1. When running protocols within the x-kernel, execution begins at the label ``main'', which is supplied by the x-kernel. How then do the application routines (e.g., the asp test routines) get invoked at run time? Hint: Use gdb (or some other debugger) to single-step through the execution. Place a breakpoint at asp_init, and then follow the execution.
  2. The routine runTest sends the initial message of a test run, but does not send the messages after the first one. Which routine sends the remaining client messages of the test? Why was that routine chosen rather than runTest?

Emacs Users

The directory /usr/project/courses/cps214/xkernel/TAGS contains an emacs TAGS file for the x-kernel sources. If your not familiar with tags, spend the time to learn about them (feel free to post questions to the newsgroup). They greatly simplify the process of studying code.