
.sh 1 "Benchmark programs and environment"
.lp
It has often been said that there are "lies, damned lies and
benchmarks." With this in mind, the following results are intended to
guide further KSOS-32 Kernel development, not as an absolute measure
of KSOS-32 performance.

.sh 2 "The Programs"
.lp
In order to measure the relative performance of KSOS-32 on the VAX
hardware, the following programs were written:
.sp
.ip *
prime - calculate prime numbers (CPU-bound);
.ip *
openit - file create/close;
.ip *
rw - write to a file and then read it;
.ip *
copy - copy a file;
.ip *
forkit - create several subprocesses.
.lp
These programs were run under KSOS-32 and 4.2 BSD UNIX.  The results
are summarized in Table 1.
.(z
.in +10
.hl

	       KSOS	    4.2 BSD	RATIO
	       ----	    -------	-----
prime		178		178	 1:1
openit		352		  8	44:1
rw		 54		  3	18:1
copy		 57		  3	19:1
forkit		832		 10	83:1
.sp 2
.(c
Table 1. Performance Results
.)c
.hl
.in -10
.)z
.lp
All of the measurements are considered to be accurate to the nearest
second, as this is the resolution of the common system clock under
BSD UNIX. (The
.b gettimeofday
system call is not portable to System V, where further performance
comparisons will be performed later. The KSOS clock presented timings
to the nearest 0.10 second, which were rounded.)  The clock resolution
is much smaller than the performance ratios being measured and is not
considered to be an issue at this time.
.lp
The source code of the benchmark programs is included in the Appendix.

.sh 2 "The Environment"
.lp
All of the benchmark programs were run on the same DEC VAX-11/780
system. The system is configured with 6 Mbytes of main memory and two
MASSBUS RM05 removable disk drives. One of the drives always has the
UNIX system disk and the other always has the KSOS system disk. The
KSOS system pack was contructed from a PDP-11 KSOS pack by using
several specially-written conversion programs. The UNIX file system was
approximately 87% full and the file system on the KSOS pack was about
70% full.
.lp
The benchmarks were written in Modula-2 because there is no KSOS
Security Kernel system call interface for any other language at this
time. The Modula-2 compiler builds object files that are compatible
with 4.2 BSD UNIX and KSOS-32 (which uses the same object module
format). However, because System V UNIX can not run these object
programs, the benchmarks have not yet been run on System V UNIX.
