PREVIOUS

Chapter 6. Performance in KeyKOS

Performance in KeyKOS is achieved by a combination of features.

These features are generally useful, and independent of the type of application. Examination in the context of a specific application category, high performance on-line transaction processing (OLTP), provides motivation for many of the KeyKOS features which support high performance:

High Performance On-line Transaction Processing

Two crucial capabilities of a high performance on-line transaction processing system, explored in some depth below, are:
Efficient Management of Disk I/Os
Conventional OLTP systems tend to have bottlenecks in performing disk I/O. Such systems provide consistency of data (agreement of the data with itself), and correctness (agreement of the data with the real world) by techniques which involve writing the data to disk before acknowledging transactions. In conventional OLTP systems, high transaction performance, with consistency and correctness, can only be achieved by providing many disk heads to accomplish the large number of necessary writes, and by managing them efficiently.

KeyKOS provides persistent virtual storage, which assures the consistency of all data periodically via efficient checkpoint, and which has the performance characteristics of virtual memory systems.

KeyKOS provides optional journaling, which assures correctness. It is possible in KeyKOS to make an objective cost/benefit trade-off of providing correctness, in addition to consistency, to retain those transactions which might otherwise be lost as a result of system outage. [An example: If one assumes that the potential data lost during a year has a value of $100, and represents no liability, then almost certainly one would not utilize journaling (whose total cost in implementation, maintenance, computer utilization, etc., would almost certainly exceed $100 in value). In other situations correctness will have a much higher value, and journaling should be employed.]

When the working set of an OLTP application fits in main memory (gigabyte main memories have been delivered commercially, and many working sets are smaller than a gigabyte), the effect of KeyKOS's persistent virtual memory and journaling is to significantly reduce the disk I/O requirements, as compared to conventional systems, and yield extremely high disk efficiency.

Short Instruction Paths
Conventional high performance OLTP systems achieve short instruction paths for transactions by several techniques. These techniques include executing in highly privileged modes to reduce the time involved in changing contexts (by eliminating context changes, while retaining the ability to perform privileged operations), for example, coding in assembly language (or restricted versions of conventional higher-level languages) to achieve efficient code, and avoiding layered software support architectures.

One result of this approach is, indeed, the short instruction paths needed for frequently executed transactions. Path lengths of 15,000 to 35,000 instructions per transaction are typical for high performance OLTP systems. [Consider a 10 MIPS (millions of instructions per second) computer. These path lengths would yield maximum transaction rates of 670 and 285 transactions per second (tps), respectively, based solely on CPU capacity.]

To achieve these impressively short instruction path lengths, conventional OLTP systems give up a great deal: security, partitioning (compartmentalization), optional use of hierarchical support architectures for infrequently executed transactions, programming in restricted-privilege compartments to promote reliability and reduce development costs.

KeyKOS cannot and does not change the basic instruction cycle of a computer, nor the efficiency of the code generated by language processors. If it is not possible to program a transaction in some higher level language so as to yield the short instruction paths required for frequent transactions, then assembly language code may be the only alternative. KeyKOS provides this option. KeyKOS gives the option of allowing direct reference and access to underlying mechanisms when required, but allows use of (less efficient, but more productive) hierarchical software architectures for infrequent transactions. KeyKOS is not a layered system, although it allows the construction of layered (hierarchical) support facilities.

KeyKOS provides contexts whose privilege can be restricted as required for the case at hand.

KeyKOS provides an efficient change of context, with no runtime check for access authority required (as conventional systems - based on access list technologies - invariably do if they attempt to provide security).

Thus, KeyKOS allows the coding of the short instruction paths required for frequently executed transactions, but simultaneously provides optional layered support for other transactions (or background batch processes accessing the same data), choice of coding language, choice of programming environment, and security.

Overview of KeyKOS Performance Features

The discussion above highlights many of the performance features of KeyKOS as they relate to OLTP systems. Similar discussions can be presented for other classes of applications.

Other features which support performance include the ability to share code among many instances of an object, more compact application code due to the centralization of checkpoint/restart facilities, etc. The following is a brief list (with some amplifying comments) of KeyKOS features which promote high performance: