MOSS File System Simulator
Installation on Unix/Linux/Solaris/HP-UX Systems

Purpose

This document provides instructions for the installation of the MOSS File System 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 File System Simulator and documentation were written by Ray Ontko (rayo@ontko.com).

Requirements

The following software components are required to install and use the MOSS File System Simulator.

Installation

Installation of the software can be accomplished with these simple steps:
  1. Create a directory in which you wish to install the simulator (e.g., "moss/filesys").
    cd
    mkdir moss
    cd moss
    mkdir filesys
    cd filesys
    

  2. Download the compressed tar archive (filesys.tgz) into the directory.

  3. Expand the compressed tar archive.
    $ tar -xzf filesys.tgz
    
    or
    $ gunzip filesys.tgz
    $ tar xf filesys.tar
    

Files

The directory should now contain the following files:

Files Description
filesys.tgz Compressed tar archive which contains all the other files.
BitBlock.java
Block.java
DirectoryEntry.java
FileDescriptor.java
FileSystem.java
IndexNode.java
Kernel.java
ProcessContext.java
Stat.java
SuperBlock.java
cat.java
cp.java
dump.java
ls.java
mkdir.java
mkfs.java
tee.java
Java source files (*.java)
BitBlock.class
Block.class
DirectoryEntry.class
FileDescriptor.class
FileSystem.class
IndexNode.class
Kernel.class
ProcessContext.class
Stat.class
SuperBlock.class
cat.class
cp.class
dump.class
ls.class
mkdir.class
mkfs.class
tee.class
Compiled Java class files (*.class)
install_unix.html
install_windows.html
user_guide.html
Documentation
javadoc Directory containing documentation on java classes (generated by the javadoc utility).
copying.txt Gnu General Public License: Terms and Conditions for Copying, Distribution, and Modification

Compilation

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.

To determine which shell you're using:

$ echo $SHELL

If you're using sh, ksh, bash:

$ CLASSPATH=.
$ export CLASSPATH
$ javac *.java

If you're using csh, tcsh:

% set CLASSPATH=.
% javac *.java

Test

To test the program, enter the following sequence of commands.

$ java mkfs filesys.dat 256 16
$ java mkdir /root
$ java ls /
$ ls *.java | java tee /root/t.lis
$ java ls /root
$ java cat /root/t.lis

If things are working correctly, the program will produce output that looks something like this:

$ java mkfs filesys.dat 256 16
block_size: 256
blocks: 16
super_blocks: 1
free_list_blocks: 1
inode_blocks: 3
data_blocks: 11
block_total: 16

$ java mkdir /root

$ java ls /

/:
    0         48 .
    0         48 ..
    1         32 root
total files: 3

$ ls *.java | java tee /root/t.lis
BitBlock.java
Block.java
DirectoryEntry.java
FileDescriptor.java
FileSystem.java
IndexNode.java
Kernel.java
ProcessContext.java
Stat.java
SuperBlock.java
cat.java
cp.java
dump.java
ls.java
mkdir.java
mkfs.java
tee.java

$ java ls /root

/root:
    1         48 .
    0         48 ..
    2        219 t.lis
total files: 3

$ java cat /root/t.lis
BitBlock.java
Block.java
DirectoryEntry.java
FileDescriptor.java
FileSystem.java
IndexNode.java
Kernel.java
ProcessContext.java
Stat.java
SuperBlock.java
cat.java
cp.java
dump.java
ls.java
mkdir.java
mkfs.java
tee.java

The programs and their input and output files are described more fully in the MOSS File System 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 (rayo@ontko.com).

Last updated: September 29, 2001