Initial Spring 2016 commit.

This commit is contained in:
Geoffrey Challen
2015-12-23 00:50:04 +00:00
commit cafa9f5690
732 changed files with 92195 additions and 0 deletions

17
man/testbin/Makefile Normal file
View File

@@ -0,0 +1,17 @@
# Man pages for /testbin programs
TOP=../..
.include "$(TOP)/mk/os161.config.mk"
MANDIR=/man/testbin
MANFILES=\
add.html argtest.html badcall.html bigfile.html conman.html \
crash.html ctest.html dirseek.html dirtest.html f_test.html \
farm.html faulter.html filetest.html forkbomb.html forktest.html \
guzzle.html hash.html hog.html huge.html index.html kitchen.html \
malloctest.html matmult.html palin.html randcall.html rmdirtest.html \
rmtest.html sink.html sort.html sty.html tail.html tictac.html \
triplehuge.html triplemat.html triplesort.html userthreads.html
.include "$(TOP)/mk/os161.man.mk"

67
man/testbin/add.html Normal file
View File

@@ -0,0 +1,67 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>add</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>add</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
add - add two numbers
</p>
<h3>Synopsis</h3>
<p>
/testbin/add <em>n1</em> <em>n2</em>
</p>
<h3>Description</h3>
<p>
<tt>add</tt> prints the sum of the two numbers passed as arguments.
</p>
<h3>Requirements</h3>
<p>
<tt>add</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>add</tt> should work properly once the basic system calls are complete.
</p>
</body>
</html>

68
man/testbin/argtest.html Normal file
View File

@@ -0,0 +1,68 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>argtest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>argtest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
argtest - display arguments passed through execv
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/argtest <em>args</em></tt>
</p>
<h3>Description</h3>
<p>
<tt>argtest</tt> prints its arguments. This is likely to be helpful
for testing <tt>execv</tt> during the basic system calls assignment.
</p>
<h3>Requirements</h3>
<p>
<tt>argtest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
Argument passing should work once the basic system calls are complete.
</p>
</body>
</html>

101
man/testbin/badcall.html Normal file
View File

@@ -0,0 +1,101 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>badcall</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>badcall</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
badcall - make invalid system calls
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/badcall</tt> [<em>test...</em>]
</p>
<h3>Description</h3>
<p>
<tt>badcall</tt> contains a variety of tests for system call error
conditions and error handling. The tests are grouped by system call;
all available tests for a particular system call are run when that
system call is selected.
</p>
<p>
None of the tests should crash the system. If you kill processes when
system calls fail with EFAULT (a valid thing to do) <tt>badcall</tt>
itself may get killed. Otherwise, <tt>badcall</tt> should not get
killed either.
</p>
<p>
Tests may be selected on the command line; if so, all the tests
selected on the command line will be run in order. If nothing is
selected on the command line, a menu is printed and tests are prompted
for.
</p>
<p>
The tests for the individual syscalls are specified with the letters
`a' through `y'. A single-digit number may also be specified; this
tests all the system calls that are supposed to work once the
corresponding assignment is completed. `*' may be used to test
everything. Use `!' to quit.
</p>
<h3>Requirements</h3>
<p>
<tt>badcall</tt> can test every system call. It requires
<A HREF=../syscall/read.html>read</A> and
<A HREF=../syscall/write.html>write</A> itself to work properly, and
some of the tests may use syscalls other than the ones being tested.
</p>
<p>
At the completion of each assignment, the system should pass the tests
for the syscalls associated with that (and previous) assignments. At
no time should anything <tt>badcall</tt> does crash the system.
</p>
<p>
Ideally, your course staff will have updated the copy of
<tt>badcall</tt> you received with OS/161 to reflect the system calls
required in each of the assignments in your course. In practice, this
will probably not be the case. It is likely a better idea to test each
system call explicitly than rely on the per-assignment lists.
</p>
</body>
</html>

80
man/testbin/bigexec.html Normal file
View File

@@ -0,0 +1,80 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>bigexec</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>bigexec</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
bigexec - test exec with large argv blocks
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/bigexec</tt>
</p>
<h3>Description</h3>
<p>
<tt>bigexec</tt> tests a number of different possible ways to call
<A HREF=../syscall/execv.html>execv</A> with large or largish argv
blocks.
</p>
<p>
Note that <tt>bigexec</tt> works by execing itself with various
arguments.
To start the test, run it without arguments.
Passing it other arguments will likely confuse it.
</p>
<h3>Requirements</h3>
<p>
<tt>bigexec</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/execv.html>execv</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>bigexec</tt> should work once you have implemented the basic
system calls, including of course execv.
(But it depends on little other than execv, making it useful in the
early stages.)
</p>
</body>
</html>

79
man/testbin/bigfile.html Normal file
View File

@@ -0,0 +1,79 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>bigfile</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>bigfile</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
bigfile - create a large file in small chunks
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/bigfile</tt> <em>filename</em> <em>size</em><br>
<tt>/testbin/bigfile</tt> <em>filename</em>
<em>size</em><tt>/</tt><em>chunksize</em><br>
</p>
<h3>Description</h3>
<p>
<tt>bigfile</tt> creates a file of the specified size in chunks of the
specified chunk size.
The default chunk size is 10, which is excessively small.
The largest chunk size supported is 8192.
The file size is rounded up to an integral number of chunks.
Very small chunk sizes are not fully honored.
</p>
<h3>Requirements</h3>
<p>
<tt>bigfile</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>bigfile</tt> should run on emufs once the basic system calls are
complete, and should run on SFS once the file system assignment is
complete. Sufficiently small files should work on SFS even before
that point.
</p>
</body>
</html>

88
man/testbin/bigfork.html Normal file
View File

@@ -0,0 +1,88 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>bigfork</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>bigfork</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
bigfork - large forking test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/bigfork</tt>
</p>
<h3>Description</h3>
<p>
<tt>bigfork</tt> is a combination of
the <A HREF=forktest.html>forktest</A>
and <A HREF=parallelvm.html>parallelvm</A> tests.
It forks geometrically like forktest, but more times (it goes six
deep instead of four) and in between each it does some aimless matrix
operations similar to those in parallelvm.
It was written to try to come up with a test that generates lots of
processes (like parallelvm) but works better as a benchmark than
parallelvm does.
It is only modestly successful; multiple runs of bigfork still
typically give a moderately high variance; but as multiple runs of
parallelvm typically exhibit a huge variance it's a step forward.
</p>
<p>
It uses about 4M of memory, which is bigger than parallelvm but
comparable to some of the other VM stress tests.
When run in-core it also offers a limited ability to test the
multiprocessor scalability of your VM system.
</p>
<h3>Requirements</h3>
<p>
<tt>bigfork</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/fork.html>fork</A></li>
<li><A HREF=../syscall/waitpid.html>waitpid</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>bigfork</tt> should run correctly to completion once the VM
assignment is complete.
</p>
</body>
</html>

80
man/testbin/bigseek.html Normal file
View File

@@ -0,0 +1,80 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>bigseek</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>bigseek</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
bigseek - test 64-bit seek positions
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/bigseek</tt>
</p>
<h3>Description</h3>
<p>
<tt>bigseek</tt> tests manipulation of seek pointers past
2<sup>31</sup>.
It is somewhat limited in what it can do, because neither SFS nor
emufs supports files larger than 2<sup>32</sup> bytes; but it can
still seek around and check that the resulting seek position is
reported correctly.
</p>
<h3>Requirements</h3>
<p>
<tt>bigseek</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/lseek.html>lseek</A></li>
<li><A HREF=../syscall/write.html>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/close.html>remove</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>bigseek</tt> should work once you have implemented the basic
system calls.
Until you implement remove, it will not be able to delete its test
file; this is merely untidy, not a problem.
</p>
</body>
</html>

108
man/testbin/bloat.html Normal file
View File

@@ -0,0 +1,108 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>bloat</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>bloat</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
bloat - waste memory
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/bloat</tt>
[<tt>-a </tt><em>allocs</em>]
[<tt>-b </tt><em>bias</em>]
[<tt>-p </tt><em>touchpages</em>]
</p>
<h3>Description</h3>
<p>
<tt>bloat</tt> allocates all available memory one page at a time until
it runs out.
Unlike other tests that do this, it has been gimmicked up so that it
runs in a fairly reasonable amount of time even when swapping.
</p>
<p>
It runs in cycles; every cycle it allocates <em>allocs</em> pages, one
at a time, by calling <A HREF=../syscall/sbrk.html>sbrk</A> (not
<A HREF=../libc/malloc.html>malloc</A>), then touches <em>touchpages</em>
pages.
It chooses the pages it touches as follows:
</p>
<ul>
<li><p>
1 in 1000 pages are chosen uniformly from the entire allocated space.
</p></li>
<li><p>
The rest are taken from the middle 1% of the space; note that this
range shifts upwards as more pages are allocated.
</p></li>
<li><p>
It rolls <em>bias</em> dice to pick pages from the middle 1%.
The more dice, the tighter the distribution it picks and the
faster it runs.
</p></li>
</ul>
<p>
The default settings are 4 <em>allocs</em>, 8 <em>touchpages</em>
and a <em>bias</em> of 8.
This gives reasonable performance with reasonable amounts of memory on
the solution set.
There are enough things affecting the speed that you may want to
experiment with the settings when testing on your own VM system.
</p>
<h3>Requirements</h3>
<p>
<tt>bloat</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/sbrk.html>sbrk</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>bloat</tt> should work once you have implemented your VM system
and added the sbrk system call.
It may not run fast by default, but it should always be faster than
<A HREF=sbrktest.html>sbrktest</A> 10 or the notoriously glacial
<A HREF=malloctest.html>malloctest</A> 3.
</p>
</body>
</html>

68
man/testbin/conman.html Normal file
View File

@@ -0,0 +1,68 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>conman</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>conman</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
conman - echo typed characters
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/conman</tt>
</p>
<h3>Description</h3>
<p>
<tt>conman</tt> echos characters typed on standard input until `q' is pressed.
</p>
<h3>Requirements</h3>
<p>
<tt>conman</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>conman</tt> should work once the basic system call assignment is complete.
</p>
</body>
</html>

90
man/testbin/crash.html Normal file
View File

@@ -0,0 +1,90 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>crash</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>crash</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
crash - commit various exceptions
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/crash</tt> [<em>operation</em>]
</p>
<h3>Description</h3>
<p>
<tt>crash</tt> will perform any one of fourteen illegal processor
operations, any one of which should get it killed without causing the
whole system to crash.
</p>
<p>
The operations are coded <tt>a</tt> through <tt>n</tt> and may be
chosen on the command line. If no operation is chosen, a menu is
displayed and a choice solicited.
</p>
<h3>Restrictions</h3>
<p>
Test <tt>f</tt>, which writes into the process's own code segment,
will only cause a processor exception if you implement read-only code
segments. Since this is not required, it is not required that test
<tt>f</tt> pass.
</p>
<p>
However, using test <tt>f</tt> must not under any circumstances
corrupt the code in the copy of <tt>crash</tt> on disk!
</p>
<h3>Requirements</h3>
<p>
<tt>crash</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>crash</tt> should operate properly once the basic system call
assignment is complete.
</p>
</body>
</html>

80
man/testbin/ctest.html Normal file
View File

@@ -0,0 +1,80 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>ctest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>ctest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
ctest - cyclic stride-oriented VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/ctest</tt> [<em>stride</em>]
</p>
<h3>Description</h3>
<p>
<tt>ctest</tt> creates a 1-megabyte array of pointers and sets it up
as a circular linked list, then traverses the linked list. The linked
list is set up so each entry points to the one <em>stride</em> entries
away.
</p>
<p>
The <em>stride</em> argument should be odd, so all elements in the
list are accessed.
</p>
<p>
The default stride is 477.
</p>
<h3>Requirements</h3>
<p>
<tt>ctest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>ctest</tt> should function properly once the VM assignment is
complete.
</p>
</body>
</html>

90
man/testbin/dirconc.html Normal file
View File

@@ -0,0 +1,90 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>dirconc</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>dirconc</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
dirconc - concurrent file system test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/dirconc</tt> <em>path</em> [<em>randomseed</em>]
</p>
<h3>Description</h3>
<p>
<tt>dirconc</tt> does random directory operations from many processes
concurrently. This is a fairly difficult stress test as it exercises
cross-directory rename. Quite a number of real-world systems have
failed to handle it or larger/longer builds of it.
</p>
<p>
It does its work in a subdirectory of <em>path</em>, so you can run it
against whatever filesystem you prefer.
</p>
<p>
If your system survives a <tt>dirconc</tt> run, be sure to check the
integrity of the filesystem as well. It's not uncommon for
<tt>dirconc</tt> to provoke filesystem corruption.
</p>
<h3>Requirements</h3>
<p>
<tt>dirconc</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/getpid.html>getpid</A>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/mkdir.html>mkdir</A>
<li> <A HREF=../syscall/rmdir.html>rmdir</A>
<li> <A HREF=../syscall/chdir.html>chdir</A>
<li> <A HREF=../syscall/rename.html>rename</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>dirconc</tt> should work properly on SFS once the file system
assignment is complete. It won't do much of interest on emufs,
however.
</p>
</body>
</html>

79
man/testbin/dirseek.html Normal file
View File

@@ -0,0 +1,79 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>dirseek</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>dirseek</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
dirseek - seek on directories test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/dirseek</tt>
</p>
<h3>Description</h3>
<p>
<tt>dirseek</tt> creates a test directory, creates some files in it,
and lists the directory repeatedly, seeking in a variety of ways (some
legal, some not).
</p>
<h3>Requirements</h3>
<p>
<tt>dirseek</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/chdir.html>chdir</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/getdirentry.html>getdirentry</A>
<li> <A HREF=../syscall/lseek.html>lseek</A>
<li> <A HREF=../syscall/mkdir.html>mkdir</A>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/remove.html>remove</A>
<li> <A HREF=../syscall/rmdir.html>rmdir</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>dirseek</tt> should run (on SFS filesystems) when the file system
assignment is complete. It will not run on emufs, because emufs does
not support <tt>mkdir</tt> or <tt>rmdir</tt>.
</p>
</body>
</html>

71
man/testbin/dirtest.html Normal file
View File

@@ -0,0 +1,71 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>dirtest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>dirtest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
dirtest - simple subdirectories test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/dirtest</tt>
</p>
<h3>Description</h3>
<p>
<tt>dirtest</tt> creates and then removes a series of nested directories.
</p>
<h3>Requirements</h3>
<p>
<tt>dirtest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/mkdir.html>mkdir</A>
<li> <A HREF=../syscall/rmdir.html>rmdir</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>dirtest</tt> should run (on SFS filesystems) when the file system
assignment is complete. It will not run on emufs, because emufs does
not support <tt>rmdir</tt>.
</p>
</body>
</html>

92
man/testbin/f_test.html Normal file
View File

@@ -0,0 +1,92 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>f_test</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>f_test</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
f_test - basic concurrent filesystem test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/f_test</tt> [<tt>1</tt>|<tt>2</tt>|<tt>3</tt>]
</p>
<h3>Description</h3>
<p>
<tt>f_test</tt> consists of three tests, 1-3, that can be specified on
the command line. If nothing is specified, all three tests are run.
</p>
<p>
Test 1 writes a large file (a bit over 270k) and reads it back.
</p>
<p>
Test 2 creates and removes a directory tree, rather like
<A HREF=dirtest.html>dirtest</A>.
</p>
<p>
Test 3 spawns three subprocesses that simultaneously read and write
the same file.
</p>
<h3>Requirements</h3>
<p>
<tt>f_test</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/mkdir.html>mkdir</A>
<li> <A HREF=../syscall/rmdir.html>rmdir</A>
<li> <A HREF=../syscall/remove.html>remove</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>f_test</tt> should run correctly once the file system assignment
is complete.
</p>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>factorial</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>factorial</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
factorial - compute factorials using execv
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/factorial</tt> <em>N</em>
</p>
<h3>Description</h3>
<p>
<tt>factorial</tt> computes <em>N!</em>, for integer values
<em>N</em>.
It does the computation (in bignums) by recursively calling
<A HREF=../syscall/execv.html>execv</A> on itself and is thus useful
for stressing your exec implementation.
</p>
<p>
Note that <tt>factorial</tt> does not make exec calls with
<em>large</em> argv blocks; getting to numbers large enough that the
size is interesting requires prohibitively many iterations and is
exceedingly slow.
</p>
<h3>Requirements</h3>
<p>
<tt>factorial</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/execv.html>execv</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>factorial</tt> should work once you have implemented the basic
system calls, including of course execv.
(But it depends on little other than execv, making it useful in the
early stages.)
</p>
<h3>Restrictions</h3>
<p>
Be aware that until you do the VM assignment and replace dumbvm,
running a lot of execs will run the system out of memory very
rapidly.
</p>
</body>
</html>

90
man/testbin/farm.html Normal file
View File

@@ -0,0 +1,90 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>farm</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>farm</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
farm - run some hogs and cats
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/farm</tt>
</p>
<h3>Description</h3>
<p>
<tt>farm</tt> runs three copies of <A HREF=hog.html>hog</A> and one
copy of <A HREF=../bin/cat.html>/bin/cat</A>.
</p>
<p>
The <tt>cat</tt> process reads and prints the file <tt>catfile</tt>,
which you should create in advance.
</p>
<h3>Requirements</h3>
<p>
<tt>farm</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
The <tt>cat</tt> subprocess spawned by <tt>farm</tt> uses these
additional system calls:
<ul>
<li><A HREF=../syscall/open.html>open</A>
<li><A HREF=../syscall/read.html>read</A>
<li><A HREF=../syscall/close.html>close</A>
</ul>
</p>
<p>
<tt>farm</tt> is only likely to be useful for testing the scheduler.
</p>
<h3>Bugs</h3>
<p>
<tt>farm</tt> does not wait for its child processes to finish.
</p>
</body>
</html>

70
man/testbin/faulter.html Normal file
View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>faulter</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>faulter</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
faulter - commit address fault
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/faulter</tt>
</p>
<h3>Description</h3>
<p>
<tt>faulter</tt> accesses an invalid memory address, thus crashing. It
should be killed and not crash the entire system.
</p>
<h3>Requirements</h3>
<p>
<tt>faulter</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>faulter</tt> should work properly, that is, get killed with an
address fault, once the basic system calls assignment is complete. It
should continue to work once the VM system is done.
</p>
</body>
</html>

79
man/testbin/filetest.html Normal file
View File

@@ -0,0 +1,79 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>filetest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>filetest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
filetest - basic filesystem test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/filetest</tt> <em>filename</em>
</p>
<h3>Description</h3>
<p>
<tt>filetest</tt> tests the filesystem by opening, writing to, and
reading from a user-specified file.
</p>
<h3>Requirements</h3>
<p>
<tt>filetest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/remove.html>remove</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>filetest</tt> should run correctly on SFS filesystems with the
OS/161 system as shipped. It should continue to work once the file
system assignment is complete.
</p>
<p>
It will not work in full on emufs, because emufs does not support
<tt>remove()</tt>.
</p>
</body>
</html>

96
man/testbin/forkbomb.html Normal file
View File

@@ -0,0 +1,96 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>forkbomb</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>forkbomb</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
forkbomb - create hundreds of processes
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/forkbomb</tt>
</p>
<h3>Description</h3>
<p>
<tt>forkbomb</tt> does
<pre>
while (1) fork();
</pre>
doing a bit of additional checking similar to that done by
<A HREF=forktest.html>forktest</A>.
</p>
</p>
<strong>
DO NOT RUN THIS ON A REAL SYSTEM - IT WILL GRIND TO A HALT AND
PEOPLE WILL COME AFTER YOU WIELDING BASEBALL BATS AND/OR THE AD
BOARD<sup><font size=-1>*</font></sup>. WE WARNED YOU.
</strong>
</p>
<p>
<font size=-1><i><sup>*</sup> The Administrative Board of Harvard
College handles formal disciplinary action.</i></font>
</p>
<h3>Requirements</h3>
<p>
<tt>forkbomb</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/getpid.html>getpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
We don't expect your system to withstand this without grinding to
a halt, but once your basic system calls are complete it shouldn't
crash. Likewise for after your virtual memory system is complete.
</p>
<p>
Note that this may turn out to be hard to achieve in practice. Don't
spend much time fixing problems <tt>forkbomb</tt> triggers that won't
arise under more normal operation. (If in doubt, consult your course
staff.)
</p>
</body>
</html>

72
man/testbin/forktest.html Normal file
View File

@@ -0,0 +1,72 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>forktest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>forktest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
forktest - test fork system call
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/forktest</tt>
</p>
<h3>Description</h3>
<p>
<tt>forktest</tt> forks a few times and tries to make sure each fork
has its own data and stack.
</p>
<h3>Requirements</h3>
<p>
<tt>forktest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/getpid.html>getpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>forktest</tt> should run successfully once the basic system calls
are complete (if given enough memory) and should continue to run
successfully when the VM assignment is completed.
</p>
</body>
</html>

160
man/testbin/frack.html Normal file
View File

@@ -0,0 +1,160 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>frack</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>frack</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
frack - file system crack
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/frack</tt> <tt>list</tt><br>
<tt>/testbin/frack</tt> <tt>do</tt> <em>workload</em> [<em>arg</em>]<br>
<tt>/testbin/frack</tt> <tt>check</tt> <em>workload</em> [<em>arg</em>]<br>
</p>
<h3>Description</h3>
<p>
<tt>frack</tt> is a general-purpose file system checker.
It has a number of workloads built into it (currently 58, some of
which are families of related workloads), each of which can be run in
either <tt>do</tt> mode or <tt>check</tt> mode.
</p>
<p>
In <tt>do</tt> mode, <tt>frack</tt> executes the chosen workload
against the file system.
</p>
<p>
In <tt>check</tt> mode, <tt>frack</tt> executes the chosen workload
against an internal model of a file system, and builds a
representation of all the successive states the file system reaches.
Then it inspects the file system it is run on and matches its state
against this representation.
It finds the closest matching state, and then prints out the
discrepancies it finds between that state and what it sees.
</p>
<p>
Note that the <tt>check</tt> mode expects that the <tt>do</tt> mode
was run on an empty (newly formatted) file system volume.
Otherwise, any other stuff on the volume will appear as a discrepancy
and may cause the state matching algorithm to fail.
</p>
<p>
The intended use is for testing file system recovery: run a workload
in <tt>do</tt> mode, crash during the workload (e.g. using the
System/161 doom counter), run file system recovery, then run the same
workload in <tt>check</tt> mode.
Ideally, the <tt>check</tt> mode run will find the resulting on-disk
state after recovery to exactly match some valid state the workload
reached.
In practice, some forms of discrepancy are often considered
acceptable; your course staff should give you guidance on what you are
and are not required to handle.
</p>
<p>
Note that you probably want to get your recovery code to the point
where it reliably produces a valid, self-consistent volume that
<A HREF=../sbin/sfsck.html>sfsck</A> accepts before worrying about
whether the <tt>frack check</tt> phase passes.
</p>
<p>
<tt>frack</tt> can also be used for testing the general correctness of
a file system, such as by running the <tt>do</tt> mode of a workload
to completion and then immediately (or after shutting down cleanly and
rebooting) running in <tt>check</tt> mode.
</p>
<p>
Use <tt>frack list</tt> to see the available workloads.
Some workloads take arguments; <em>size</em> arguments should be one
of the keywords <tt>small</tt>, <tt>medium</tt>, or <tt>large</tt>,
reflecting the size of the test file(s).
<em>Seed</em> arguments are integer random seeds from 0 to
2<sup>31</sup>-1.
</p>
<p>
Some workloads contain an explicit <tt>sync</tt>; generally these are
meant to be crashed after, not before (or during) the sync call.
</p>
<h3>Requirements</h3>
<p>
<tt>frack</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/fstat>fstat</A></li>
<li><A HREF=../syscall/ftruncate>ftruncate</A></li>
<li><A HREF=../syscall/lseek.html>lseek</A></li>
<li><A HREF=../syscall/getdirentry>getdirentry</A></li>
<li><A HREF=../syscall/read>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/link>link</A></li>
<li><A HREF=../syscall/remove>remove</A></li>
<li><A HREF=../syscall/chdir>chdir</A></li>
<li><A HREF=../syscall/mkdir>mkdir</A></li>
<li><A HREF=../syscall/rmdir>rmdir</A></li>
<li><A HREF=../syscall/rename>rename</A></li>
<li><A HREF=../syscall/sync>sync</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
but note that it is intended to be able to exercise all the
file-system-related calls and its exact requirements are
workload-dependent.
</p>
<p>
<tt>frack</tt> is most useful for testing file system recovery, by
intentionally crashing during workload runs.
But it is also useful for checking general correctness of a file
system.
</p>
<h3>Bugs</h3>
<p>
Currently, none of the specific workloads are documented.
</p>
</body>
</html>

70
man/testbin/guzzle.html Normal file
View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>guzzle</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>guzzle</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
guzzle - waste cpu
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/guzzle</tt> [<em>character</em>]
</p>
<h3>Description</h3>
<p>
<tt>guzzle</tt> burns cpu and periodically prints a character. The
default character is a plus sign (+). It differs from
<A HREF=hog.html>hog</A> chiefly in the printing and in that it runs
longer.
</p>
<h3>Requirements</h3>
<p>
<tt>guzzle</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
It is only likely to be useful for testing the scheduler.
</p>
</body>
</html>

84
man/testbin/hash.html Normal file
View File

@@ -0,0 +1,84 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>hash</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>hash</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
hash - compute a simple hash function of a file
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/hash</tt> <em>file</em><br>
<tt>host-hash</tt> <em>file</em>
</p>
<h3>Description</h3>
<p>
<tt>hash</tt> takes a file and computes a hash value for it by adding
all the bytes in the file together modulo a prime.
</p>
<p>
<tt>hash</tt> is by default also compiled for the System/161 host OS
so you can cross-check the answers you get.
</p>
<h3>Requirements</h3>
<p>
<tt>hash</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
Once the basic system calls are complete, hash should work on any file
the system supports. However, it will probably of most use for testing
while working on the file system.
</p>
<h3>Bugs</h3>
<p>
<tt>hash</tt> uses a silly hash algorithm.
</p>
</body>
</html>

65
man/testbin/hog.html Normal file
View File

@@ -0,0 +1,65 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>hog</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>hog</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
hog - waste cpu
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/hog</tt>
</p>
<h3>Description</h3>
<p>
<tt>hog</tt> does nothing but burn cpu. It is not substantially different from
<A HREF=guzzle.html>guzzle</A>.
</p>
<h3>Requirements</h3>
<p>
<tt>hog</tt> uses only the <A HREF=../syscall/_exit.html>_exit</A>
system call.
</p>
<p>
It is only likely to be useful for testing the scheduler.
</p>
</body>
</html>

72
man/testbin/huge.html Normal file
View File

@@ -0,0 +1,72 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>huge</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>huge</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
huge - very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/huge</tt>
</p>
<h3>Description</h3>
<p>
<tt>huge</tt> creates an 8 megabyte data array and manipulates it. It
will hopefully help show up bugs in the VM system.
</p>
<p>
It does not in fact do anything useful even if it completes successfully.
</p>
<h3>Requirements</h3>
<p>
<tt>huge</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>huge</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

110
man/testbin/index.html Normal file
View File

@@ -0,0 +1,110 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>OS/161 Test binaries</title>
<link rel="stylesheet" type="text/css" media="all" href="../manindex.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>OS/161 Test binaries (/testbin)</h2>
<p align=center>
<A HREF=..>Top</A> |
<A HREF=../bin>Binaries</A> |
<A HREF=../sbin>Sysadmin binaries</A> |
<A HREF=../syscall>System calls</A> |
<A HREF=../libc>C standard library</A> |
<A HREF=../dev>Device drivers</A> |
<A HREF=../misc>Miscellaneous</A>
</p>
<br>
<ul>
<li> <A HREF=add.html>add</A> - add two numbers
<li> <A HREF=argtest.html>argtest</A> - display arguments passed through execv
<li> <A HREF=badcall.html>badcall</A> - make invalid system calls
<li> <A HREF=bigexec.html>bigexec</A> - test exec with large argv blocks
<li> <A HREF=bigfile.html>bigfile</A> - create a large file in small chunks
<li> <A HREF=bigfork.html>bigfork</A> - large forking test
<li> <A HREF=bigseek.html>bigseek</A> - test 64-bit seek positions
<li> <A HREF=bloat.html>bloat</A> - waste memory
<li> <A HREF=conman.html>conman</A> - echo typed characters
<li> <A HREF=crash.html>crash</A> - commit various exceptions
<li> <A HREF=ctest.html>ctest</A> - cyclic stride-oriented VM test
<li> <A HREF=dirconc.html>dirconc</A> - concurrent directory operations test
<li> <A HREF=dirseek.html>dirseek</A> - seek on directories test
<li> <A HREF=dirtest.html>dirtest</A> - simple subdirectories test
<li> <A HREF=f_test.html>f_test</A> - basic concurrent filesystem test
<li> <A HREF=factorial.html>factorial</A> - compute factorials using execv
<li> <A HREF=farm.html>farm</A> - run some hogs and cats
<li> <A HREF=faulter.html>faulter</A> - commit address fault
<li> <A HREF=filetest.html>filetest</A> - basic filesystem test
<li> <A HREF=forkbomb.html>forkbomb</A> - create hundreds of processes
<li> <A HREF=forktest.html>forktest</A> - test fork system call
<li> <A HREF=frack.html>frack</A> - file system crack
<li> <A HREF=guzzle.html>guzzle</A> - waste cpu
<li> <A HREF=hash.html>hash</A> - compute a simple hash function of a file
<li> <A HREF=hog.html>hog</A> - waste cpu
<li> <A HREF=huge.html>huge</A> - very large VM test
<li> <A HREF=kitchen.html>kitchen</A> - run some sinks
<li> <A HREF=malloctest.html>malloctest</A> - some simple tests for
userlevel malloc
<li> <A HREF=matmult.html>matmult</A> - baseline VM stress test
<li> <A HREF=multiexec.html>multiexec</A> - run many exec calls at once
<li> <A HREF=palin.html>palin</A> - simple VM test
<li> <A HREF=parallelvm.html>parallelvm</A> - concurrent VM test
<li> <A HREF=poisondisk.html>poisondisk</A> - write known "poison"
values to a disk image
<li> <A HREF=psort.html>psort</A> - concurrent file system test
<li> <A HREF=quinthuge.html>quinthuge</A> - very very large VM test
<li> <A HREF=quintmat.html>quintmat</A> - very large VM test
<li> <A HREF=quintsort.html>quintsort</A> - very large VM test
<li> <A HREF=randcall.html>randcall</A> - make randomized system calls
<li> <A HREF=redirect.html>redirect</A> - test I/O redirection
<li> <A HREF=rmdirtest.html>rmdirtest</A> - test removing in-use directories
<li> <A HREF=rmtest.html>rmtest</A> - test removing open files
<li> <A HREF=sbrktest.html>sbrktest</A> - program for testing sbrk
<li> <A HREF=schedpong.html>schedpong</A> - scheduler pong
<li> <A HREF=sink.html>sink</A> - accept and throw away console input
<li> <A HREF=sort.html>sort</A> - large quicksort-based VM test
<li> <A HREF=sparsefile.html>sparsefile</A> - generate a sparse file
<li> <A HREF=sty.html>sty</A> - run some hogs
<li> <A HREF=tail.html>tail</A> - print part of a file
<li> <A HREF=tictac.html>tictac</A> - tic-tac-toe game
<li> <A HREF=triplehuge.html>triplehuge</A> - very very large VM test
<li> <A HREF=triplemat.html>triplemat</A> - very large VM test
<li> <A HREF=triplesort.html>triplesort</A> - very large VM test
<li> <A HREF=usemtest.html>usemtest</A> - test for user-level (semfs) semaphores
<li> <A HREF=userthreads.html>userthreads</A> - simple user-level threads test
<li> <A HREF=zero.html>zero</A> - test if VM system zeros memory
</ul>
</body>
</html>

80
man/testbin/kitchen.html Normal file
View File

@@ -0,0 +1,80 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>kitchen</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>kitchen</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
kitchen - run some sinks
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/kitchen</tt>
</p>
<h3>Description</h3>
<p>
Runs four copies of <A HREF=sink.html>sink</A>. It may be useful for
testing concurrent access to the console device. It may also be useful
for testing job control, if you choose to pursue job control.
</p>
<h3>Requirements</h3>
<p>
<tt>kitchen</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
Additionally, the subprocesses it spawns use the
<A HREF=../syscall/read.html>read</A> system call.
</p>
<p>
<tt>kitchen</tt> should function correctly once the basic system calls are
complete.
</p>
<h3>Bugs</h3>
<p>
<tt>kitchen</tt> does not wait for its child processes to exit.
</p>
</body>
</html>

116
man/testbin/malloctest.html Normal file
View File

@@ -0,0 +1,116 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>malloctest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>malloctest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
malloctest - some simple tests for userlevel malloc
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/malloctest</tt> [<em>test</em>...]
</p>
<h3>Description</h3>
<p>
<tt>malloctest</tt> contains 7 tests, 1-7. These may be run
interactively or from the command line.
</p>
<p>
Test 1 checks if all the bytes we ask for actually get allocated.
</p>
<p>
Test 2 checks if <tt>malloc</tt> gracefully handles failing requests.
This test assumes that <tt>malloc</tt> will eventually fail if one
keeps allocating enough memory, instead of promising memory it can't
deliver and then (perhaps) killing processes when it runs out. More
detail regarding this condition can be found in comments in the source
code.
</p>
<p>
Test 3 also checks if <tt>malloc</tt> gracefully handles failing
requests, and thus has the same restrictions as test 2.
</p>
<p>
Test 4 attempts to check if <tt>malloc</tt> coalesces the free list
properly. This test is only meant for first-fit, next-fit, or
best-fit allocators; anything else will most likely confuse it.
Running test 4 after other tests may confuse it as well.
</p>
<p>
Tests 5-7 are a randomized stress test. Test 5 uses pseudorandom seed
0. Test 6 seeds the random generator from the
<A HREF=../dev/random.html>random:</A> device. Test 7 prompts you for a
specific seed.
</p>
<h3>Requirements</h3>
<p>
<tt>malloctest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
Your system should pass all the <tt>malloctest</tt> tests, subject to
the conditions described above, once you have implemented
<A HREF=../syscalls/sbrk.html>sbrk</A>.
</p>
<h3>Bugs</h3>
<p>
Because OS/161 ships with a userlevel <tt>malloc</tt> implementation
now, rather than making you write one, this test is not very useful.
</p>
<p>
Because the userlevel <tt>malloc</tt> OS/161 ships with is quite dumb,
test 3 can be amazingly slow.
</p>
</body>
</html>

76
man/testbin/matmult.html Normal file
View File

@@ -0,0 +1,76 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>matmult</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>matmult</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
matmult - baseline VM stress test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/matmult</tt>
</p>
<h3>Description</h3>
<p>
<tt>matmult</tt> multiplies two large matrices together and checks the
result. Hopefully this will help detect bugs in the VM system.
</p>
<p>
The version for OS/161 has been gimmicked to be less efficient
space-wise than normal matrix multiplication. This allows it to both
take up an interesting amount of memory and run in a non-boring amount
of time.
</p>
<h3>Requirements</h3>
<p>
<tt>matmult</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>matmult</tt> should run correctly once the VM system assignment is
complete.
</p>
</body>
</html>

116
man/testbin/multiexec.html Normal file
View File

@@ -0,0 +1,116 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>multiexec</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>multiexec</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
multiexec - run many exec calls at once
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/multiexec</tt> [-j <em>nprocs</em>]
[<em>prog</em> [<em>arg</em> ...]]
</p>
<h3>Description</h3>
<p>
<tt>multiexec</tt> forks several subprocesses and then uses user-level
semaphores to cause them to all enter
<A HREF=../syscalls/execv>execv</A> at as close as possible to the
same time.
This is useful for seeing what happens if having too many argv buffers
in use at once causes the kernel to run into problems, or to test the
efficacy of measures to mitigate those problems.
</p>
<p>
The default number of subprocesses is 12.
The default program each subprocess runs is <A HREF=../bin/pwd.html>pwd</A>.
Other larger programs can be run by giving the program name and
arguments on <tt>multiexec</tt>'s command line.
</p>
<h3>Requirements</h3>
<p>
<tt>multiexec</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/getpid.html>getpid</A></li>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/read.html>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/remove.html>remove</A></li>
<li><A HREF=../syscall/fork.html>fork</A></li>
<li><A HREF=../syscall/execv.html>execv</A></li>
<li><A HREF=../syscall/waitpid.html>waitpid</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>multiexec</tt> should work once you have implemented the basic
system calls.
Exactly what the requirements are for handling large multiexec
invocations is up to your course staff, although probably at a minimum
your kernel shouldn't crash.
</p>
<p>
Until you implement remove, which is typically not part of the basic
system calls assignment, <tt>multiexec</tt> will not be able to clean
up after itself.
This is untidy but not a problem.
</p>
<h3>Bugs</h3>
<p>
<tt>multiexec</tt> has a compiled-in limit of 64 words in the argv
array to be passed to its subprocesses.
Also, there should be an easy way to pass a very large argv.
In the meantime, perhaps try having <tt>multiexec</tt> run
<A HREF=bigexec.html>bigexec</A>.
</p>
<h3>Restrictions</h3>
<p>
Be aware that until you do the VM assignment and replace dumbvm,
running a lot of execs will run the system out of memory very
rapidly.
</p>
</body>
</html>

76
man/testbin/palin.html Normal file
View File

@@ -0,0 +1,76 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>palin</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>palin</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
palin - simple VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/palin</tt>
</p>
<h3>Description</h3>
<p>
<tt>palin</tt> checks a long string contained within itself for being
palindromic. The check should pass.
</p>
<p>
The string is not actually all that long and this test does not stress
the VM in any real sense of the word. However, it might be a useful
test early on in the debugging phase.
</p>
<h3>Requirements</h3>
<p>
<tt>palin</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>palin</tt> should run correctly once the basic system calls are
complete, and should continue to run correctly once the VM system
assignment is complete.
</p>
</body>
</html>

115
man/testbin/parallelvm.html Normal file
View File

@@ -0,0 +1,115 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013, 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>parallelvm</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>parallelvm</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
parallelvm - concurrent VM system test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/parallelvm</tt> [<tt>-w</tt>]
</p>
<h3>Description</h3>
<p>
<tt>parallelvm</tt> runs a fairly large number (24) of fairly small
processes in parallel to stress your VM system. The processes perform
aimless matrix operations.
</p>
<p>
Before attempting <tt>parallevm</tt> make sure the <tt>zero</tt> test
passes; <tt>parallelvm</tt> will fail with wrong answers if its BSS
doesn't start out zeroed. Also, it may be helpful to get it running
successfully purely in RAM before cutting back the memory size so it
swaps.
</p>
<p>
If your VM system's fork is particularly slow, you will probably find
that the early processes exit before the later ones finish forking.
This reduces the total memory load and can easily cause
<tt>parallelvm</tt> to run completely in RAM without needing to swap;
this in turn makes it a much less effective stress test.
</p>
<p>
For this reason, the <tt>-w</tt> option can be used to make all the
subprocesses sync up before starting to compute.
They use user-level semaphores for coordination.
</p>
<p>
If benchmarking, always use <tt>-w</tt>.
</p>
<h3>Requirements</h3>
<p>
<tt>parallelvm</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/getpid.html>getpid</A>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/fork.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
Adding the <tt>-w</tt> option also uses:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/write.html>read</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/remove.html>remove</A>
</ul>
</p>
<p>
<tt>parallelvm</tt> should run properly once your VM system is complete.
</p>
<p>
Until the remove system call has been implemented, which is
typically not part of the basic system calls assignment,
<tt>parallelvm -w</tt> will be unable to clean up its semaphores.
This is merely untidy and not a real problem.
</p>
</body>
</html>

View File

@@ -0,0 +1,98 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>poisondisk</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>poisondisk</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
poisondisk - write known "poison" values to a disk image
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/poisondisk</tt> <em>disk-device</em><br>
<tt>hostbin/host-poisondisk</tt> <em>disk-image</em>
</p>
<h3>Description</h3>
<p>
<tt>poisondisk</tt> writes known poison values to a disk image.
This allows (mostly) reliable detection of reads from uninitialized
disk blocks: they produce the poison value.
(Otherwise, uninitialized disk blocks tend to be zeroed; this is much
harder to detect and much harder to distinguish from an intentional
condition.)
</p>
<p>
<tt>poisondisk</tt> will overwrite any data already on the disk, so
run it prior to running <A HREF=../sbin/mksfs.html>mksfs</A> when
creating a new volume.
</p>
<p>
A host version of poisondisk is build (like with the SFS tools) so it
can be run outside OS/161.
This version understands System/161 disk image headers and will only
overwrite System/161 disk images.
</p>
<p>
The poison value is 0xa9.
</p>
<h3>Requirements</h3>
<p>
<tt>poisondisk</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/fstat.html>fstat</A></li>
<li><A HREF=../syscall/lseek.html>lseek</A></li>
<li><A HREF=../syscall/read.html>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>poisondisk</tt> will work once you have implemented the system
calls it uses (including fstat, which is typically not part of the
basic system calls assignment), but is only really useful for working
on the file system.
</p>
</body>
</html>

127
man/testbin/psort.html Normal file
View File

@@ -0,0 +1,127 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013, 2014
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>psort</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>psort</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
psort - concurrent file system test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/psort</tt> [<tt>-p</tt> <em>numprocs</em>]
[<tt>-k</tt> <em>numkeys</em>] [<tt>-r</tt> | <tt>-s</tt> <em>randomseed</em>]
</p>
<h3>Description</h3>
<p>
<tt>psort</tt> does an on-disk parallelizing sort of a large number of
randomly generated integers.
It is loosely based on some real parallel sort benchmarks.
</p>
<p>
Be aware of its size vs. the size of your buffer cache, and adjust its
size as needed. Running it so it fits entirely in cache and running it
so it overflows the cache are both valid stress tests, but have quite
different characteristics.
</p>
<h3>Options</h3>
<ul>
<li> <tt>-k</tt> Set the number of integers. Default is 131072.
<li> <tt>-p</tt> Set the number of processes. Default is 4.
<li> <tt>-r</tt> Get a random seed from the <tt>random:</tt> device.
<li> <tt>-s</tt> <em>randomseed</em> Choose an explicit random seed.
</ul>
<p>
The memory footprint depends on the number of processes and the
per-process work buffer size (which can be changed at compile time);
the file system footprint depends on the number of integers.
Specifically, the memory footprint is the number of processes (default
4) times the buffer size (default 384K), and the file size is the
number of integers (default 131,072) multiplied by the size of an
integer (here 4) multiplied by the maximum number of copies of the
data that appear at once, which is 3, so 1.5 MB.
</p>
<p>
Note that the parent psort process does not serve as one of the worker
processes; it also has a work buffer, but doesn't use it.
Also note that it forks several (six) sets of subprocesses in the
course of execution.
A virtual memory system that doesn't support the zerofilled page
optimization will both use 1/n more memory for the extra work buffer
and also incur a fairly large cost copying it in every fork.
Also, because of the large number of forks the amount of RAM required
to run psort using dumbvm is likely prohibitive.
</p>
<h3>Requirements</h3>
<p>
<tt>psort</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/dup2.html>dup2</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/lseek.html>lseek</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/stat.html>stat</A> or
<A HREF=../syscall/fstat.html>fstat</A> (optional)
<li> <A HREF=../syscall/remove.html>remove</A>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
It also execs <A HREF=../bin/cat.html>cat</A>.
</p>
<p>
<tt>psort</tt> should be able to run properly on SFS filesystems once
the basic system calls are implemented. However, you may need to
adjust its workload size depending on the level of large-file support
you have in SFS.
</p>
<p>
<tt>psort</tt> will mostly run on emufs, but there isn't really much
point in that.
</p>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>quinthuge</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>quinthuge</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
quinthuge - very very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/quinthuge</tt>
</p>
<h3>Description</h3>
<p>
<tt>quinthuge</tt> runs five copies of <A HREF=huge.html>huge</A> at once.
</p>
<h3>Requirements</h3>
<p>
<tt>quinthuge</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>quinthuge</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

71
man/testbin/quintmat.html Normal file
View File

@@ -0,0 +1,71 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>quintmat</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>quintmat</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
quintmat - very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/quintmat</tt>
</p>
<h3>Description</h3>
<p>
<tt>quintmat</tt> runs five copies of
<A HREF=matmult.html>matmult</A> at once.
</p>
<h3>Requirements</h3>
<p>
<tt>quintmat</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>quintmat</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>quintsort</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>quintsort</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
quintsort - very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/quintsort</tt>
</p>
<h3>Description</h3>
<p>
<tt>quintsort</tt> runs five copies of <A HREF=sort.html>sort</A> at once.
</p>
<h3>Requirements</h3>
<p>
<tt>quintsort</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>quintsort</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

102
man/testbin/randcall.html Normal file
View File

@@ -0,0 +1,102 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>randcall</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>randcall</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
randcall - make randomized system calls
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/randcall</tt> [<tt>-f</tt>] [<tt>-c</tt> <em>count</em>]
[<tt>-r</tt> <em>seed</em>] <em>callset</em>
</p>
<h3>Description</h3>
<p>
<tt>randcall</tt> makes randomized system calls, that is, system calls with
completely random arguments. The <em>callset</em> determines which
list of system calls it uses; it is either "all", which does
everything, or a number that identifies one of the assignments, in
which case it exercises all the system calls that are supposed to be
working when that assignment is complete. (If the lists compiled into
randcall are wrong, contact your course staff.)
</p>
<p>
Ordinarily, in case some of these calls cause process termination,
randcall forks before making each call. This can be slow, so the -f
option can be used to suppress this behavior.
</p>
<p>
The <tt>-c</tt> <em>count</em> option tells randcall to make
<em>count</em> iterations through the list of calls it's using. (It
always goes through the list sequentially.) The default count is 100.
</p>
<p>
The <tt>-r</tt> <em>seed</em> option allows one to set the
pseudorandom seed used by <tt>randcall</tt> to generate the call
arguments. The default seed is 0.
</p>
<p>
<tt>randcall</tt> prints what it's doing, so if it blows up you should
be able to see what happened.
</p>
<p>
The system calls that do not take arguments are not on any of the call
lists. Neither is <A HREF=../syscall/reboot.html>reboot</A>, to prevent
accidental system shutdown.
</p>
<h3>Requirements</h3>
<p>
<tt>randcall</tt> should never under any circumstances crash the
kernel, no matter what call list is in use.
</p>
<h3>Bugs</h3>
<p>
There should be an option to seed the random generator from
<A HREF=../dev/random.html>random:</A>.
</p>
</body>
</html>

95
man/testbin/redirect.html Normal file
View File

@@ -0,0 +1,95 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>redirect</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>redirect</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
redirect - test I/O redirection
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/redirect</tt>
</p>
<h3>Description</h3>
<p>
<tt>redirect</tt> does a simple test of I/O redirection like a Unix
shell might do.
It first creates an input test file, then invokes
<A HREF=../bin/cat.html>cat</A> to copy it, with standard input and
standard output suitably redirected.
Then it checks that the copy happened correctly, and removes the test
files.
</p>
<p>
The specifications of Unix system calls are such that this program
should take no extra work to support once basic tests show that the
pieces are working.
</p>
<h3>Requirements</h3>
<p>
<tt>redirect</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/dup2.html>dup2</A></li>
<li><A HREF=../syscall/read.html>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/remove.html>remove</A></li>
<li><A HREF=../syscall/fork.html>fork</A></li>
<li><A HREF=../syscall/execv.html>execv</A></li>
<li><A HREF=../syscall/waitpid.html>waitpid</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>redirect</tt> should work once you have implemented the basic
system calls, including fork, exec, and wait.
</p>
<p>
Note that until you implement remove (which is typically not part of
the basic system calls assignment), and in any case on emufs, the test
files will not get removed.
This is not important, just untidy.
</p>
</body>
</html>

View File

@@ -0,0 +1,85 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>rmdirtest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>rmdirtest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
rmdirtest - test removing in-use directories
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/rmdirtest</tt>
</p>
<h3>Description</h3>
<p>
<tt>rmdirtest</tt> creates a test directory, goes into it, removes it,
and attempts to do various operations on it. It tries to check that
the right things happen, although some cases are beyond its ability to
test directly (such as whether storage is leaked).
</p>
<p>
Note that while it is not legal to remove the <tt>.</tt>
<em>entry</em> in a directory, it is perfectly legal to remove a
directory by name that happens to be some process's (or your own)
current working directory.
</p>
<h3>Requirements</h3>
<p>
rmdirtest uses the following system calls:
<ul>
<li> <A HREF=../syscall/chdir.html>chdir</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/__getcwd.html>__getcwd</A>
<li> <A HREF=../syscall/getdirentry.html>getdirentry</A>
<li> <A HREF=../syscall/mkdir.html>mkdir</A>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/rmdir.html>rmdir</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>rmdirtest</tt> should run correctly once the file system
assignment is complete.
</p>
</body>
</html>

93
man/testbin/rmtest.html Normal file
View File

@@ -0,0 +1,93 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>rmtest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>rmtest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
rmtest - test removing open files
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/rmtest</tt>
</p>
<h3>Description</h3>
<p>
<tt>rmtest</tt> deletes a file while it's open and then attempts to do
further I/O to it, and tries to check that the right things happen.
</p>
<h3>Requirements</h3>
<p>
<tt>rmtest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/lseek.html>lseek</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>rmtest</tt> also spawns a copy of
<A HREF=../bin/rm.html>/bin/rm</A>, which uses these system calls:
<ul>
<li> <A HREF=../syscall/remove.html>remove</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>rmtest</tt> should run correctly once the file system assignment
is complete.
</p>
<h3>Bugs</h3>
<p>
There's no particular reason it should use <tt>/bin/rm</tt> instead of
calling <A HREF=../syscall/remove.html>remove</A> itself. But I guess
it makes life more exciting.
</p>
</body>
</html>

134
man/testbin/sbrktest.html Normal file
View File

@@ -0,0 +1,134 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>sbrktest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>sbrktest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
sbrktest - program for testing <A HREF=../syscall/sbrk.html>sbrk</A>
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/sbrktest</tt> [<em>test-number ...</em>]
</p>
<h3>Description</h3>
<p>
<tt>sbrktest</tt> contains a number of tests for memory allocation,
using the <A HREF=../syscall/sbrk.html>sbrk</A> low-level interface
directly instead of via <A HREF=../libc/malloc.htmlm>malloc</A>.
It is similar to <A HREF=malloctest.html>malloctest</A> in general
layout and approach, but concentrates on kernel-level memory
allocation rather than the behavior of C malloc.
</p>
<p>
There are 21 tests:
<table>
<tr><td width=5% valign=top>1</td><td>Allocate one page.</td></tr>
<tr><td valign=top>2</td><td>Allocate and free one page.</td></tr>
<tr><td valign=top>3</td><td>Allocate and free several pages.</td></tr>
<tr><td valign=top>4</td><td>Allocate several pages and free them one
at a time.</td></tr>
<tr><td valign=top>5</td><td>Check the heap end.
This test crashes intentionally.</td></tr>
<tr><td valign=top>6</td><td>Allocate and check the heap end.
This test crashes intentionally.</td></tr>
<tr><td valign=top>7</td><td>Allocate and free and check the heap end.
This test crashes intentionally.</td></tr>
<tr><td valign=top>8</td><td>Allocate several, free some, then check
the heap end.
This test crashes intentionally.</td></tr>
<tr><td valign=top>9</td><td>Allocate all memory in a big chunk.</td></tr>
<tr><td valign=top>10</td><td>Allocate all memory one page at a time.</td></tr>
<tr><td valign=top>11</td><td>Allocate a lot and intentionally leak
it.</td></tr>
<tr><td valign=top>12</td><td>Fork and then allocate.</td></tr>
<tr><td valign=top>13</td><td>Allocate and then fork.</td></tr>
<tr><td valign=top>14</td><td>Allocate and then fork and free.</td></tr>
<tr><td valign=top>15</td><td>Allocate, fork, allocate more, and
free.</td></tr>
<tr><td valign=top>16</td><td>Small stress test.</td></tr>
<tr><td valign=top>17</td><td>Randomized small stress test.</td></tr>
<tr><td valign=top>18</td><td>Small stress test with specific seed.</td></tr>
<tr><td valign=top>19</td><td>Large stress test.</td></tr>
<tr><td valign=top>20</td><td>Randomized large stress test.</td></tr>
<tr><td valign=top>21</td><td>Large stress test with specific seed.</td></tr>
</table>
</p>
<p>
One or more tests may be run specifically by giving the numbers on the
command line; otherwise, <tt>sbrktest</tt> prints the list and prompts
for a test number to run.
</p>
<p>
Note that the tests that crash intentionally should crash the
<tt>sbrktest</tt> program with an illegal memory access
(<tt>SIGSEGV</tt>) -- they should not crash your kernel.
</p>
<p>
The tests that attempt to allocate all available memory may be slow,
depending on the per-process limits you place on memory allocation (if
any) relative to the amount of available physical RAM.
</p>
<h3>Requirements</h3>
<p>
<tt>sbrktest</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/sbrk.html>sbrk</A></li>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/read.html>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/fork.html>fork</A></li>
<li><A HREF=../syscall/waitpid.html>waitpid</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>sbrktest</tt> should work properly once you have implemented the
sbrk system call and a virtual memory system that supports dynamic
memory allocation.
It will not work with dumbvm.
</p>
</body>
</html>

149
man/testbin/schedpong.html Normal file
View File

@@ -0,0 +1,149 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>schedpong</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>schedpong</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
schedpong - scheduler pong
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/schedpong</tt> [<em>options...</em>]
</p>
<h3>Description</h3>
<p>
<tt>schedpong</tt> forks a number of processes that do different kinds
of work.
This can be used to evaluate the behavior of your scheduler under
different conditions.
</p>
<p>
There are three kinds of jobs in schedpong:
<ul>
<li>Thinkers</li>
<li>Grinders</li>
<li>Pong groups</li>
</ul>
</p>
<p>
A thinker job is one CPU-bound process: it loops computing and doesn't
sleep for I/O or use much memory.
</p>
<p>
A grinder job is one memory-bound process: it loops accessing lots of
memory, similar to the various VM stress tests.
</p>
<p>
A pong group job is a family of I/O-bound processes.
An arbitrary number of processes play scheduler pong using the user
semaphores (semfs), each process signalling the next.
</p>
<p>
By choosing different numbers of thinkers, pong groups, and grinders,
and adjusting the pong group size, one can evaluate how well a
scheduler does under different conditions.
In general schedulers should be favoring the pong groups in order to
minimize the response latency of the semaphore ponging, but without
starving the thinkers.
Adding grinders to the mix lets your deal with what happens when you
also have swapping going on, which is a complicated situation not
handled well by textbook algorithms.
</p>
<p>
Note that you need to have a real VM system (not dumbvm) to use
grinders.
With dumbvm you may also need to configure a fair amount of memory to
get all the intended processes to fork successfully.
</p>
<p>
Options:
<dl>
<dt>-t N</dt><dd>Configure N thinkers. (default 2)</dd>
<dt>-g N</dt><dd>Configure N grinders. (default 0)</dd>
<dt>-p N</dt><dd>Configure N pong groups. (default 1)</dd>
<dt>-s N</dt><dd>Set the pong group size to N. (default 6)</dd>
</dl>
</p>
<h3>Requirements</h3>
<p>
<tt>schedpong</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/__time.html>__time</A></li>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/read.html>read</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/lseek.html>lseek</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/fork.html>fork</A></li>
<li><A HREF=../syscall/waitpid.html>waitpid</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
<li><A HREF=../syscall/remove.html>remove</A></li>
<li><A HREF=../syscall/sbrk.html>sbrk</A></li>
</ul>
Only the grinder jobs use sbrk, and remove is only used for cleaning
up.
</p>
<p>
However, note that schedpong relies heavily on the user semaphores;
if they do not work (owing e.g. to bugs in open/read/write) schedpong
will not work either.
Make sure <A HREF=usemtest.html>usemtest</A> runs (at least up to the
"shoot" test, even if that part doesn't) before spending time on
schedpong.
</p>
<p>
<tt>schedpong</tt> without grinders should work once you have
implemented the basic system calls and they work reliably
(particularly fork).
<tt>schedpong</tt> with grinders should work once you have implemented
the sbrk system call and a virtual memory system that supports dynamic
memory allocation.
</p>
</body>
</html>

71
man/testbin/sink.html Normal file
View File

@@ -0,0 +1,71 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>sink</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>sink</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
sink - accept and throw away console input
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/sink</tt>
</p>
<h3>Description</h3>
<p>
<tt>sink</tt> reads characters from standard input and throws them
away. It is perhaps of some use for testing standard input or console
devices.
</p>
<h3>Requirements</h3>
<p>
<tt>sink</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>sink</tt> should function properly once the basic system calls are
complete.
</p>
</body>
</html>

70
man/testbin/sort.html Normal file
View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>sort</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>sort</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
sort - large quicksort-based VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/sort</tt>
</p>
<h3>Description</h3>
<p>
<tt>sort</tt> creates an array of 147456 random integers and then
sorts it using quicksort. This will hopefully help show up bugs in the
VM system.
</p>
<h3>Requirements</h3>
<p>
<tt>sort</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>sort</tt> should run correctly to completion once the VM
assignment is complete.
</p>
</body>
</html>

View File

@@ -0,0 +1,77 @@
<!--
Copyright (c) 2015
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>sparsefile</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>sparsefile</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
sparsefile - generate a sparse file
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/sparsefile</tt> <em>filename</em> <em>size</em>
</p>
<h3>Description</h3>
<p>
<tt>sparsefile</tt> generates a sparse file (a file where most of the
file is unallocated space) of the requested <em>size</em> by writing
one byte to the end of it.
The resulting file should use one block for data, and depending on the
size (and the file system implementation) some small number of blocks
for metadata.
</p>
<h3>Requirements</h3>
<p>
<tt>sparsefile</tt> uses the following system calls:
<ul>
<li><A HREF=../syscall/open.html>open</A></li>
<li><A HREF=../syscall/lseek.html>lseek</A></li>
<li><A HREF=../syscall/write.html>write</A></li>
<li><A HREF=../syscall/close.html>close</A></li>
<li><A HREF=../syscall/_exit.html>_exit</A></li>
</ul>
</p>
<p>
<tt>sparsefile</tt> will work once you have implemented the basic
system calls, but will be most useful when working on the file
system.
</p>
</body>
</html>

74
man/testbin/sty.html Normal file
View File

@@ -0,0 +1,74 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>sty</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>sty</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
sty - run some hogs
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/sty</tt>
</p>
<h3>Description</h3>
<p>
<tt>sty</tt> runs six copies of <A HREF=hog.html>hog</A>.
</p>
<h3>Requirements</h3>
<p>
<tt>sty</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>sty</tt> is only likely to be useful for testing the scheduler... if then.
</p>
<h3>Bugs</h3>
<p>
<tt>sty</tt> does not wait for its child processes to finish.
</p>
</body>
</html>

79
man/testbin/tail.html Normal file
View File

@@ -0,0 +1,79 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>tail</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>tail</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
tail - print part of a file
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/tail</tt> <em>file</em> <em>location</em>
</p>
<h3>Description</h3>
<p>
<tt>tail</tt> prints the contents of a file starting at offset
<em>location</em> within it, skipping the beginning.
</p>
<p>
It is somewhat similar in concept to the Unix tail command, but is not
compatible, which is why it lives in testbin.
</p>
<h3>Requirements</h3>
<p>
<tt>tail</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/lseek.html>lseek</A>
<li> <A HREF=../syscall/close.html>close</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>tail</tt> should work once the basic system calls are complete,
but will probably be most useful as a debugging tool while working on
the file system.
</p>
</body>
</html>

69
man/testbin/tictac.html Normal file
View File

@@ -0,0 +1,69 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>tictac</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>tictac</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
tictac - tic-tac-toe game
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/tictac</tt>
</p>
<h3>Description</h3>
<p>
<tt>tictac</tt> implements a simple version of tic-tac-toe.
</p>
<h3>Requirements</h3>
<p>
<tt>tictac</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>tictac</tt> should function correctly once the basic system calls
are complete.
</p>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>triplehuge</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>triplehuge</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
triplehuge - very very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/triplehuge</tt>
</p>
<h3>Description</h3>
<p>
<tt>triplehuge</tt> runs three copies of <A HREF=huge.html>huge</A> at once.
</p>
<h3>Requirements</h3>
<p>
<tt>triplehuge</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>triplehuge</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>triplemat</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>triplemat</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
triplemat - very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/triplemat</tt>
</p>
<h3>Description</h3>
<p>
<tt>triplemat</tt> runs three copies of
<A HREF=matmult.html>matmult</A> at once.
</p>
<h3>Requirements</h3>
<p>
<tt>triplemat</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>triplemat</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>triplesort</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>triplesort</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
triplesort - very large VM test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/triplesort</tt>
</p>
<h3>Description</h3>
<p>
<tt>triplesort</tt> runs three copies of <A HREF=sort.html>sort</A> at once.
</p>
<h3>Requirements</h3>
<p>
<tt>triplesort</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/execv.html>execv</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>triplesort</tt> should run properly once the VM assignment is complete.
</p>
</body>
</html>

87
man/testbin/usemtest.html Normal file
View File

@@ -0,0 +1,87 @@
<!--
Copyright (c) 2014
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>usemtest</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>usemtest</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
usemtest - test semfs (<tt>sem:</tt>) semaphores
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/usemtest</tt>
</p>
<h3>Description</h3>
<p>
<tt>usemtest</tt> forks some subprocesses and uses the semfs
semaphores to do coordinated printing. It is somewhat similar to the
<tt>sy1</tt> in-kernel test for the in-kernel semaphores.
</p>
<p>
The first parts of the test open each semaphore separately in each
process, so locking issues in the filetable and open-file code should
not keep it from running.
The last part opens the semaphores once and inherits the file
descriptors through fork; it is likely to hang (including sometimes in
fork) if the filetable and open-file locking is not just so.
</p>
<h3>Requirements</h3>
<p>
<tt>usemtest</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/fork.html>fork</A>
<li> <A HREF=../syscall/open.html>open</A>
<li> <A HREF=../syscall/read.html>read</A>
<li> <A HREF=../syscall/read.html>remove</A>
<li> <A HREF=../syscall/waitpid.html>waitpid</A>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>usemtest</tt> should run successfully once the basic system calls
are complete.
Until you implement the <tt>remove()</tt> system call the semaphores
from the test will be left lying around afterwards, but this should
not keep it from running.
</p>
</body>
</html>

View File

@@ -0,0 +1,75 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>userthreads</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>userthreads</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
userthreads - simple user-level threads test
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/userthreads</tt>
</p>
<h3>Description</h3>
<p>
<tt>userthreads</tt> does simple console I/O from two threads in the same
process.
</p>
<h3>Requirements</h3>
<p>
<tt>userthreads</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
It also assumes the existence of a function <tt>threadfork()</tt>,
which takes the address of a function to start a new thread at, and
makes certain other assumptions about thread semantics. See the source
file.
</p>
<p>
If implementing user-level threads, part of your responsibility is to
update the userthreads test to work with the threads package you
write.
</p>
</body>
</html>

78
man/testbin/zero.html Normal file
View File

@@ -0,0 +1,78 @@
<!--
Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2013
The President and Fellows of Harvard College.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<html>
<head>
<title>zero</title>
<link rel="stylesheet" type="text/css" media="all" href="../man.css">
</head>
<body bgcolor=#ffffff>
<h2 align=center>zero</h2>
<h4 align=center>OS/161 Reference Manual</h4>
<h3>Name</h3>
<p>
zero - test if VM system zeros memory
</p>
<h3>Synopsis</h3>
<p>
<tt>/testbin/zero</tt>
</p>
<h3>Description</h3>
<p>
<tt>zero</tt> checks if your VM system zeros memory like it's supposed
to. It checks both the BSS segment ("uninitialized data"), which is
supposed to be zeroed at program load time, and if you have
implemented <tt>sbrk</tt>, it also checks that newly allocated pages
acquired with <tt>sbrk</tt> are zeroed.
</p>
<p>
Failure to zero pages can cause other tests to blow up in complicated
ways that are often much harder to diagnose.
</p>
<h3>Requirements</h3>
<p>
<tt>zero</tt> uses the following system calls:
<ul>
<li> <A HREF=../syscall/write.html>write</A>
<li> <A HREF=../syscall/sbrk.html>sbrk</A> (optionally)
<li> <A HREF=../syscall/_exit.html>_exit</A>
</ul>
</p>
<p>
<tt>zero</tt> should run properly once the basic system calls are
implemented.
</p>
</body>
</html>