MOSS Scheduling Simulator
Installation on Windows 95/98/Me/NT/2000 Systems

Purpose

This document provides instructions for the installation of the MOSS Scheduling Simulator on Microsoft Windows operating systems. This procedure should be the same or similar on Windows 95, 98, Me, NT, and 2000 systems. The MOSS software is designed for use with Andrew S. Tanenbaum, Modern Operating Systems, 2nd Edition (Prentice Hall, 2001). The Scheduling Simulator was written by Alex Reeder (alexr@e-sa.org). This installation guide was written by Ray Ontko (rayo@ontko.com).

This installation guide only provides information about installing the software and testing the configuration for Windows operating systems. To install on Unix-like operating systems, please read the Installation Guide for Unix/Linux/Solaris/HP-UX Systems. For more detailed information about the simulator, please read the User Guide.

Requirements

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

Pre-Installation

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.

  1. Verify that you have java installed and configured in your environment.
    C:\WINDOWS> java -version
    
    You should see a message like this with possibly a different version number.
    java version "1.1.8"
    
    If you get a message like:
    Bad command or file name
    
    Then java may not be installed on your system, or may not be configured for your use.

    If you think that Java may already be installed on your system but may not be in your "path", you can find it by choosing Start -> Find -> Files or Folders and enter "java.exe" in the "Named:" field and click the Find Now button. If found, make note of the directory folder in which it resides (e.g., "C:\jdk1.1.8\bin").

    While you're at it, also seach for javac.exe to see if the Java compiler is installed and whether it's in the same directory as the java.exe file.

    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.

  2. Verify that the java compiler is installed and configured in your environment.
    C:\WINDOWS> javac
    
    If you're using a standard java command-line compiler, you should see a message similar to this.
    use: javac [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowrite][-deprecation][-d dir][-J] file.java...
    
    If you get a message like:
    Bad command or file name
    
    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.

  3. Verify that that the current directory is in your classpath.
    C:\WINDOWS> echo "%CLASSPATH%"
    
    You should see a list of directories separated by semi-colons (";") or possibly just "". If you don't see the directory "." (a single period, which stands for the current directory), then you should add it to the classpath.
    C:\WINDOWS> 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.

Installation

Installation of the software can be accomplished with these simple steps:
  1. Create a directory folder in which you wish to install the simulator (e.g., "C:\moss\sched"). You can do this using the Windows explorer, or from the MS-DOS prompt. To create the directory from the MS-DOS prompt:
    C:\WINDOWS> cd \ 
    C:\> mkdir moss
    C:\> cd moss
    C:\moss> mkdir sched
    C:\moss> cd sched
    C:\moss\sched>
    

  2. Download the self-extracting ZIP archive (sched.exe) into the directory folder. The latest release for this file can always be found at http://www.ontko.com/moss/sched/sched.exe.

  3. Double-click on the file you downloaded (sched.exe), or invoke it using Start -> Run..., or invoke it from an MS-DOS command prompt:
    C:\moss\sched> sched.exe
    

Files

The directory should now contain the following files:

Files Description
sched.exe Self-extracting ZIP archive which contains all the other files.
Common.java
Process.java
Results.java
Scheduling.java
SchedulingAlgorithm.java
sProcess.java
Java source files (*.java)
Common.class
Process.class
Results.class
Scheduling.class
SchedulingAlgorithm.class
sProcess.class
Compiled Java class files (*.class)
scheduling.conf Sample configuration file
install_unix.html
install_windows.html
user_guide.html
Documentation
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.

C:\moss\sched> javac -nowarn *.java
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.

Test

To test the program, enter the following commands.

C:\moss\sched> java Scheduling scheduling.conf

The program will simply run the simulation based on the information provided in scheduling.conf and write its output to the Summary-Results and Summary-Processes files. You should see the following output.

Working...
Completed.

The simulation configuration information is read from a file called "scheduling.conf". The "scheduling.conf" file looks something like this:

// # of Process	
numprocess 3

// mean deivation
meandev 1100

// standard deviation
standdev 510

// process    # I/O blocking
process 100
process 500
process 30

// duration of the simulation in milliseconds
runtime 5000

If things are working correctly, the "Summary-Results" file should look something like this:

Scheduling Type: Batch (Nonpreemptive)
Scheduling Name: First-Come First-Served
Simulation Run Time: 2750
Mean: 1100
Standard Deviation: 510
Process #	CPU Time	IO Blocking	CPU Completed	CPU Blocked
0		1372 (ms)	100 (ms)	1372 (ms)	13 times
1		689 (ms)	500 (ms)	689 (ms)	1 times
2		689 (ms)	30 (ms)		689 (ms)	22 times

and the "Summary-Processes" file should look something like this:
Process: 0 registered... (1372 100 0 0)
Process: 0 I/O blocked... (1372 100 100 100)
Process: 1 registered... (689 500 0 0)
Process: 1 I/O blocked... (689 500 500 500)
Process: 0 registered... (1372 100 100 100)
Process: 0 I/O blocked... (1372 100 200 200)
Process: 1 registered... (689 500 500 500)
Process: 1 completed... (689 500 689 689)
Process: 0 registered... (1372 100 200 200)
Process: 0 I/O blocked... (1372 100 300 300)
Process: 2 registered... (689 30 0 0)
Process: 2 I/O blocked... (689 30 30 30)
Process: 0 registered... (1372 100 300 300)
Process: 0 I/O blocked... (1372 100 400 400)
Process: 2 registered... (689 30 30 30)
Process: 2 I/O blocked... (689 30 60 60)
Process: 0 registered... (1372 100 400 400)
Process: 0 I/O blocked... (1372 100 500 500)
Process: 2 registered... (689 30 60 60)
Process: 2 I/O blocked... (689 30 90 90)
Process: 0 registered... (1372 100 500 500)
Process: 0 I/O blocked... (1372 100 600 600)
Process: 2 registered... (689 30 90 90)
Process: 2 I/O blocked... (689 30 120 120)
Process: 0 registered... (1372 100 600 600)
Process: 0 I/O blocked... (1372 100 700 700)
Process: 2 registered... (689 30 120 120)
Process: 2 I/O blocked... (689 30 150 150)
Process: 0 registered... (1372 100 700 700)
Process: 0 I/O blocked... (1372 100 800 800)
Process: 2 registered... (689 30 150 150)
Process: 2 I/O blocked... (689 30 180 180)
Process: 0 registered... (1372 100 800 800)
Process: 0 I/O blocked... (1372 100 900 900)
Process: 2 registered... (689 30 180 180)
Process: 2 I/O blocked... (689 30 210 210)
Process: 0 registered... (1372 100 900 900)
Process: 0 I/O blocked... (1372 100 1000 1000)
Process: 2 registered... (689 30 210 210)
Process: 2 I/O blocked... (689 30 240 240)
Process: 0 registered... (1372 100 1000 1000)
Process: 0 I/O blocked... (1372 100 1100 1100)
Process: 2 registered... (689 30 240 240)
Process: 2 I/O blocked... (689 30 270 270)
Process: 0 registered... (1372 100 1100 1100)
Process: 0 I/O blocked... (1372 100 1200 1200)
Process: 2 registered... (689 30 270 270)
Process: 2 I/O blocked... (689 30 300 300)
Process: 0 registered... (1372 100 1200 1200)
Process: 0 I/O blocked... (1372 100 1300 1300)
Process: 2 registered... (689 30 300 300)
Process: 2 I/O blocked... (689 30 330 330)
Process: 0 registered... (1372 100 1300 1300)
Process: 0 completed... (1372 100 1372 1372)
Process: 2 registered... (689 30 330 330)
Process: 2 I/O blocked... (689 30 360 360)
Process: 2 registered... (689 30 360 360)
Process: 2 I/O blocked... (689 30 390 390)
Process: 2 registered... (689 30 390 390)
Process: 2 I/O blocked... (689 30 420 420)
Process: 2 registered... (689 30 420 420)
Process: 2 I/O blocked... (689 30 450 450)
Process: 2 registered... (689 30 450 450)
Process: 2 I/O blocked... (689 30 480 480)
Process: 2 registered... (689 30 480 480)
Process: 2 I/O blocked... (689 30 510 510)
Process: 2 registered... (689 30 510 510)
Process: 2 I/O blocked... (689 30 540 540)
Process: 2 registered... (689 30 540 540)
Process: 2 I/O blocked... (689 30 570 570)
Process: 2 registered... (689 30 570 570)
Process: 2 I/O blocked... (689 30 600 600)
Process: 2 registered... (689 30 600 600)
Process: 2 I/O blocked... (689 30 630 630)
Process: 2 registered... (689 30 630 630)
Process: 2 I/O blocked... (689 30 660 660)
Process: 2 registered... (689 30 660 660)
Process: 2 completed... (689 30 689 689)

The program and its input and output files are described more fully in the MOSS Scheduling 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: July 7, 2001