CPS 196
Systems and Networks
home calendar topics labs resources

The Unix Programming Environment

Here are the major Unix topics you should understand:

Exercises

These may be useful in helping you to become familiar with Unix, and for understanding what we might be asking you to do in a real OS class.

lmbench

[lmbench] lmbench: Portable Tools for Performance Analysis. By Larry McVoy and Carl Staelin. In the USENIX Technical Conference, 1996.

The lmbench distribution, built for our linux systems, can be found in the course directory /usr/project/courses/spring06/cps196 on CS department systems (e.g., login.cs.duke.edu). There are some other simple Unix programs in toys and ctoys that may be interesting or useful. lmbench is also available at /usr/research/playground/cps196/lmbench, accessible from all departmental and research machines.

Read the following sections of [lmbench] to understand some basic issues of benchmarking methodology: introduction, sizing the benchmarks, and timing issues. Read section 5 well enough to understand the bandwidth measures and why they are important. Read 6.3-6.9: syscall overhead, signal handling overhead, process creation overhead, context switching, IPC latency, file system latency, and disk latency.

Run the lmbench latency numbers on your Xen virtual machines. Consider the following questions:

Why aren't operating systems getting faster as fast as hardware?

Running lmbench

You can find the lmbench distribution compiled and ready to go at /usr/research/playground/cps196/lmbench/lmbench. Copy this directory over to your own playground space, or anywhere else you prefer that is accessible from your virtual machine. Read the "README" file to find out how to run the benchmarks.