430: Operating Systems Assignments
We use Java to program all assignments except Program 1. Program 1 consists
of two sub problems, one practicing Linux system calls
in C or C++ and the other using Java. Programs 2 through to 3 implement in Java
an operating system simulator, called ThreadOS
step by step through assignments.
The operating system I recommend for all assignments is Linux (UW1-320).
This is because Program 1 uses Linux system calls; the ThreadOS
simulator is stored in the css430 account at UW1-320; and the grader will grade
your assignments using a UW1-320 machine.
There are more reasons why this course recommends Unix-based operating
systems: (1) many companies and institutions use Unix machines as their
servers, while their client machines are Windows, (2) most
computation-intensive and concurrent applications are based on Unix, (3) many
OS design techniques and concepts came from Unix, (4) the Linux Kernel code is
free to obtain and is commented in many reference books, and (5) it is easy to
coordinate and submit a batch of jobs through shell scripting. While you are
repeatedly using Unix for your assignment work, you
will gradually get familiar with Unix commands.
Here is a procedure to log on one of the UW1-320 Linux machines and upload
- To use a console of any UW1-320 machine, enter UW1-320
Linux Laboratory with your student ID card and log into any machine with
your UW Net ID and the corresponding password.
- To remotely log into a UW1-320 machine, use ssh and establish a
connection to uw1-320-lab.uwb.edu.
You will automatically got one of the lab machines and see your home
- To transfer files to the UW-320 file server
- From an off-campus
Linux machine: use the sftp command and
establish a connection to uw1-320-lab.uwb.edu.
- From a Windows machine:
downloadable at: http://www.chiark.greenend.org.uk/~sgtatham/putty/
- From a Mac: use Fugu 1.2, downloadable at http://rsug.itd.umich.edu/software/fugu/
The Source for Java
This site includes:
Tutorial: helps you run Java programs at Windows, Unix,
and Mac, introduces the Java language, and lists essential Java classes.
SE Version 7, API documentation: lists all necessary Java API classes.
You will frequently visit this page to review what classes are ready to
use for your assignment programs.
- Java SE 7 :
allows you to download the Java SE version 7 platform
- Compile-time errors: The javac compiler
points out where your source program has syntax errors. Carefully look at
its error messages. You will find out code line numbers that have syntax
errors. Open your source code, go to those lines, and fix your bugs.
- Run-time errors: The java virtual machine points out where your
compiled program has run-time errors. Carefully look at its error
messages. You will find out your source code's line numbers that have
run-time errors. Open your source code, go to those lines, and fix your
- Debugging tools: The following three may be helpful to develop your
Java program. However, please note that they may not be always useful when
you develop multi-threaded programs. (Most assignments are multi-threaded
(available at UW1-320)
- Eclipse (available at UW1-320)
- Program 1 exercises basic linux system-call programming and also implements a
simple shell on our operating system simulator, ThreadOS.
- Program 2 implements a
multilevel-queue-based scheduler in Java. ThreadOS.
- Program 3 realizes inter-threads
synchronization in ThreadOS in order to
arbitrate disk read/write requests from multiple threads.
- Project constructs a Unix file system on top of ThreadOS.
- Hardcopy must include your report, program listing, and
execution output. Your report must include specifications, explanations,
and/or illustrations of algorithm and data structures you used, and
summarize your consideration of test results, (i.e., do the results make
sense?). Note that you do not have to repeat writing all the assignment
specification. Use a typewriter font (e.g. courier new) for your source
code and execution output.
- Softcopy must be a tar archived file that includes only
your java source code. Your code should compile and run properly using javac under linux since
the grader tests them only using linux javac. Follow the softcopy submission procedure shown
- To log in the uw1-320-lab
-l your_linux_account uw1-320-lab.uwb.edu
- To compile your Java
javac your_program1.java your_program2.java ...
- To run your Java
run our ThreadOS simulator with your assignment,
a successful compilation, you will get an your_program1.clas, your_program2.java ...
- To archive your source
programs in a file named "program1.tar":
tar -cvf - your_program1.java your_program2.java > program1.tar
* * * * * *
(A space must be inserted at each of these * marks.)
did I color code the above command? How do you parse the above command?
if you do not understand what the above command says, MAKE VERY SURE you have
backup copies of your program, chances are you will overwrite your program whencreating the tar. Remember to download/un-tar your
submission to make sure everything is correct. If your submission is corrupted
or in-complete, you will receive a zero for the assignment. I repeat, if we
cannot untar your submission, or if you submitted a
zipped archive, you will receive a zero for the
assignment. Is this clear?
- To submit your archived
file "program1.tar" including your homework assignment 1, visit
our Catalyst submission website. Don't email your softcopy to me. You may
repeat submitting a newer copy as many times as you wish. we will only look at your latest submission.
- Assignments are due at the beginning of lecture
for both your hardcopy and softcopy on the specified date. No late
programs will be accepted unless you provide me with a proof showing that
you have been under an emergency circumstance. No matter the
circumstances, it is always best to turn in something.
of your report including explanations, illustrations, discussions, and output
of your program (Syntax errors, run-time errors, and/or incorrect answers
will result in a significant number of points being deduced from your grade).
Also reassure that you have used the algorithm as specified in each
of your program (modularization, coding style, and an appropriate amount of
sincerely appreciate that Dr. Marvin Solomon gave me a permission to use a part
of his operating systems class assignments. His original work can be located at