Lab #2: Networking
Lab description
Lab #1: Fun with Unix
This lab has several parts:
- Get set up.
Log into a Xen node and create your Linux virtual machine.
Check out your repository for the Linux source code (about 200MB).
Build a vanilla kernel and reboot your virtual machine on it.
See the instructions.
- Do some benchmarking. Run through the lmbench
benchmarks as discussed on the Unix page.
You could also work through the MIT exercises on that page if you wish to
become more familiar with Unix, but we will not check up on that.
- Trivial shell. Implement a trivial shell as described
on the lab #1 page.
- Linux system call. Implement a Linux system call
as described on the lab #1 page, and modify
your shell to use it. Boot
your modified kernel on your virtual machine and debug it.
Life in the CS Department
For these labs, you will need to inhabit the CS department Unix
environment. You should have received a CS account by now if
you did not already have one. You should look at the
CS Lab page to
understand the rules and procedures for this account.
(The CS Lab page is internal access only.)
You will also have an "untrusted
account" with a separate password. Here "untrusted" means the
account is for machines that are untrusted, not that you are untrusted: see
the the outdated
ISSG site. In fact, we are
giving you a great deal of power, and it is important that use it
with care.
At minimum, you will need to be able to do the following:
- Log in. You can only log in to your machines from other
departmental machines, e.g., login.cs.duke.edu.
- Edit text files, including C source. We recommend using
vi or emacs. However, you can also move files
from other sites easily using secure ftp or subversion.
- I am a big subversion fan, so we are setting you up with
subversion. The subversion repositories are hosted on
the NICL site.
If you use Windows, you will find that Tortoise SVN is an
excellent subversion client for Windows, easy to install and
use. Also, emacs works wonderfully on Windows, courtesy of
Geoff Voelker, who should be knighted for performing this
public service. Use google to find what I am talking about.
Subversion will allow you to edit code anywhere you want,
and then move it between the various machines you use.
Original overview of labs
The labs will consist of some moderate Linux programming in C, some Java
programming with threads and networking, and (we think) some C++ tinkering
with the Click router framework. This is an optimistic summary of
what we might hope to achieve:
- Building and booting Linux on a Xen
virtual machine; benchmarking Linux/Xen using lmbench and Unix shell
commands.
- Library-level memory (heap) manager in C or C++.
- Implementation of a pair of
system calls for rudimentary process coordination in Linux.
- Install tomcat on Linux and write a simple servlet;
implement a Java-based "channel server" for producer/consumer data
streaming and forwarding.
- Implement
bounded buffer and synchronized directory extensions to Java channel
server.
- SSL extension to channel server.
- Experiment with Click modular router (C++).