Java version of the SOS (Simple Operating System) Simulator
Introduction
This page contains instructions on how to run the Java SOS Simulator.
To run the simulator click on Java SOS Simulator.
How to run the simulation
When the simulation starts you will see a single window
(or a new web page in your browser). You can select from several
choices before you run the simulation.
- Pick an application to run among the choices in the radio buttons
at the top of the window. You have the following choices:
- GUI Apps: this will start two of the GUI counter apps.
The default time slice is 5 seconds so you will see one count
for five seconds and then the other counts for 5 seconds, etc.
- MsgApp: this will start two processes that send create a
message queue and use it to send messages one to the other
The sender sends 10 messages and then exits. These processes
have no GUI but they do generate trace messages.
- Disk App: this starts a process that writes the disk and
then reads it back. It does this 10 times. It has no GUI but
it does generate trace messages.
- Pick which things you want traced during execution.
These trace messages show up in the list boxes you see
in the simulation window. You have the following choices:
- App: show application trace messages. You generally want this on.
Applications usually do not generate all that many trace messages.
- HW: show trace message relating to the hardware simulation.
You do not normally want to see these. There are a fair number of
HW trace messages.
- SIM: show trace messages relating to the software simulation.
You do not normally want to see these messages.
- Syscall: show the messages generated by the system call
interrupt handler in SOS.
- PM: show the trace messages generated by the process manager
component of SOS
- Disk: show trace messages generated by the disk subsystem of SOS.
- Start the simulation by clicking on the “Start SOS” button.
- During execution all trace messages will go to the list box
under the top row of buttons. You can pause and resume the simulation
with the “Pause SOS” and “Resume SOS” buttons.
- When you are finished click on the “Exit Simulator” button.
- The lower list box shows the trace messages divided up based
on the current process that was running when the trace message is created.
This is a separate list for each process in the system.
These list boxes are in an AWT “card deck” which means that you
can only see one of them at a time. There is a row of buttons
above the lower list box that controls which of the process list
boxes you see. The “Next Process” button goes through all the
processes and you can go directly to processes 1, 2, 3, or 4 with buttons.
The process 0 list is for trace messages generated when there
is no current process.
- These list boxes have scroll bars if necessary that allow you
to look through the messages.