R. Clayton (rclayton@monmouth.edu)
Tue, 3 Oct 2000 19:57:53 -0400 (EDT)
The pa1-nosleep.dsk batch disk is available in /export/opt/cs-438-505/devices.
For those of you that are having some trouble, you might want to consider doing
the following:
1 Write a simple operating system that handles empty.dsk, the batch disk
containing no programs. This will help you get a feeling for interrupt
handlers and doing disk io.
2 Extend your simple operating system so that it reads programs in from
pa1-nosleep.dsk, but doesn't execute them. Your operating system will read
in a program and then immediately replace it with the next program in the
batch disk, stopping when all programs have been read. This will give you
more experience with disk io and for providing communication between
interrupt handlers.
3 Extend your operating system again to execute each program after its been
read from the batch disk. Your operating system will be sequential at this
point: read from disk, execute until done, read from disk, execute until
done, and so on. This is what the example below does. It is important that
your operating system be able to do at least this much.
4 If you're feeling frisky, you can further modify your operating system to
overlap disk io and program execution to shorten the total execution time.
However, by the time you reach this step the other batch disk will be
available, and you'll probably be better off spending your time making sure
your operating system can handle that too.
The following is an example execution from my implementation of the operating
system (called pa1os):
cl pa1os -d /export/opt/cs-438-505/devices/pa1-nosleep.dsk
The batch disk contains 4 programs.
Program 1 has been loaded (4 blocks); execution begins at 50 ticks.
Program 1 has finished executing at 162 ticks.
Program 2 has been loaded (3 blocks); execution begins at 192 ticks.
Program 2 has finished executing at 262 ticks.
Program 3 has been loaded (2 blocks); execution begins at 282 ticks.
Program 3 has finished executing at 340 ticks.
Program 4 has been loaded (1 blocks); execution begins at 350 ticks.
Program 4 has finished executing at 352 ticks.
The system is halted.
Total execution time: 352 ticks.
cl
For the heck of it, here's how pa1os handles the empty batch disk:
cl pa1os -d /export/opt/cs-438-505/devices/empty.dsk
The batch disk contains 0 programs.
The system is halted.
Total execution time: 10 ticks.
cl
This archive was generated by hypermail 2.0b3 on Mon Dec 18 2000 - 13:30:05 EST