This document provides instructions for the installation of the MOSS Memory Management Simulator on Unix operating systems. This procedure should be the same or similar on Unix, Linux, Solaris, HP-UX and other Unix-compatible systems. The MOSS software is designed for use with Andrew S. Tanenbaum, Modern Operating Systems, 2nd Edition (Prentice Hall, 2001). The Memory Management Simulator was written by Alex Reeder (email@example.com). This installation guide was written by Ray Ontko (firstname.lastname@example.org).
This installation guide only provides information about installing the software and testing the configuration for Unix-like operating systems. To install on Windows operating systems, please read the Installation Guide for Win95/98/Me/NT/2000 Systems. For more detailed information about the simulator, please read the User Guide.
Before installation, you should verify:
If you're using a standard command-line java compiler, the following instructions will help determine if your environment is configured correctly.
You should see a message like this with possibly a different version number.$ java -version
If you get a message like:java version "1.1.8"
Then java may not be installed on your system, or may not be configured for your use.java: Command not found.
If you think that Java may already be installed on your system but may not be in your "path", you can find it by
On my system, for example, the following is returned.$ find /usr -name java -print
On my system, I also searched for "javac" and found that it exists in /usr/bin/java. I'll use this jdk for my installation./usr/lib/netscape/477/communicator/java /usr/lib/netscape/477/netscape/java /usr/lib/jdk1.1/bin/java /usr/lib/jdk1.1/bin/ia32/green_threads/java /usr/share/java /usr/bin/java /usr/src/kernel-source-2.2.17/include/config/binfmt/java
If Java isn't available on your system, you should check with your instructor or system administrator. If you administer your own system, then you should be able to find a copy of Java for your operating system.
If you find that java is installed but not configured for your use, then perhaps you need to add it to your path. Consult your instructor or system administrator if you need help adding this to your path.
If you're using a standard java command-line compiler, you should see a message similar to this.$ javac
If you get a message like:use: javac [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowrite][-deprecation][-d dir][-J
then the java compiler may not be installed on your system, or may not be configured for your use. Consult your instructor or system administrator.javac: Command not found.
You should see a list of directories separated by colons (":") or possibly just a blank line. If you don't see the directory "." (a single period, which stands for the current directory), then you should add it to the claspath.$ echo $CLASSPATH
Determine which shell you're using:
$ echo $SHELL
If you're using sh, ksh, or bash:
$ CLASSPATH=.:$CLASSPATH $ export CLASSPATH
If you're using csh, or tcsh:
% set CLASSPATH=.:$CLASSPATH
If you have a working java runtime environment, a working java compiler, and the current directory is in your path, then you're ready to proceed with the installation.
$ cd $ mkdir moss $ cd moss $ mkdir memory $ cd memory
or$ tar -xzf memory.tgz
$ gunzip memory.tgz $ tar xf memory.tar
The directory should now contain the following files:
|memory.tgz||Compressed tar archive which contains all the other files.|
|Java source files (*.java)|
|Compiled Java class files (*.class)|
|commands||Sample input command file|
|memory.conf||Sample configuration file|
|Documentation and associated images|
|copying.txt||Gnu General Public License: Terms and Conditions for Copying, Distribution, and Modification|
The distribution includes compiled class files as well as the source java files. You should not need to recompile unless you decide to change the code. If you wish to compile the code, the following commands should work if you're using a Java compiler that accepts the normal "javac" command line.
The -nowarn flag supresses warning messges, of which there may be several. For backward compatability we use only those features of Java which have been present from the beginning, some of which are deprecated and are usually reported by the compiler with warning messages.$ javac -nowarn *.java
To test the program, enter the following command line.
$ java MemoryManagement commands memory.conf
The program will display a window allowing you to run the simulator. When the window presents itself, click on the Run button. You should see the program "execute" 7 memory operations, about one per second. When the simulation completes, click the Exit button.
The memory operation commands are read from a file called "commands", and the initial configuration and various options are specified in the file "memory.conf". The program also produces a log file called "tracefile" in the working directory.
The "commands" file looks something like this:
// Enter READ/WRITE commands into this file // READ <OPTIONAL number type: bin/hex/oct> <virtual memory address or random> // WRITE <OPTIONAL number type: bin/hex/oct> <virtual memory address or random> READ bin 100 READ 19 WRITE hex CC32 READ bin 10000000000000000 READ bin 10000000000000000 WRITE bin 11000000000000001 WRITE random
If things are working correctly, the "tracefile" should look something like this:
READ 4 ... okay READ 13 ... okay WRITE 3acc32 ... okay READ 10000000 ... okay READ 10000000 ... okay WRITE c0001000 ... page fault WRITE 1ff82cdc ... okay
The program and its input and output files are described more fully in the MOSS Memory Management Simulator User Guide.
© Copyright 2001, Prentice-Hall, Inc. This program is free software; it is distributed under the terms of the Gnu General Public License. See copying.txt, included with this distribution.
Please send suggestions, corrections, and comments to Ray Ontko (email@example.com).
Last updated: July 28, 2001