Carnegie Mellon
SCS logo
Computer Science Department
home
syllabus
staff
schedule
lecture
projects
homeworks
 
 

15-410 Project 4 System Monitor Utility


Here is what we would like to see in terms of a system-monitoring utility similar to the Unix top command.

Overview

If you haven't ever had the occasion to do so, please take a moment to run the top command on a friendly local Unix-derived system. You'll see an area at the top of the screen which displays interesting measurements of various system resources, and an area occupying the remainder of the display which displaying system-resource usage for one process per line. Most versions of top display the process list sorted by recent processor usage (though the top which ships with MacOS 10.2 defaults to sorting processes in some unspecified other way, apparently just to be special).

We would like you to design and implement a utility with a "look and feel" similar to that of top. In particular, you should implement the following features.

Features

  1. Key summary information about the system such as uptime, process counts, and memory usage.

  2. Some indication of how busy the CPU is. You may report Unix-style load average numbers if you wish, but you may also report something simpler.

  3. Optionally, information about interesting events the system has observed in the recent past. top can probably provide you with some inspiration here.

  4. Per-task or per-thread information (your choice), including:
    • Task/thread ID
    • Thread count (if applicable)
    • Memory usage (there are multiple options here)
    • Some indication of total CPU usage
    • Some indication of recent CPU usage
    • Command name

Design Considerations

  • Your version of top should be called lid (which you may choose to mentally expand as "lively information display" or some other way).

  • You may choose to update the display every few seconds, in which case you may choose to run indefinitely, or you may choose to paint the screen once and prompt the user to press the Return key to view the next screen paint--in which case you may provide the user with the option of quitting.

  • You will probably need to define one or more new system calls (see SYSCALL_RESERVED_START in 410user/lib/inc/syscall_int.h). But take a moment to do a little design--just how many system calls should you define?

  • You may find yourself wishing to have one include file present in two different directories. If you do feel that way, we apologize for the inconvenience and authorize you to turn in the same file twice (there is probably another solution which will work as well).

  • Of course, we do not expect your monitoring program to run on any kernel but your own.


[Last modified Monday April 24, 2006]