|
|
Soft-InstructionsConcurrent system performance, size, and programming tractability is of significant importance in embedded systems. The soft-instruction software architecture can be superior on all 3 counts to both conventional multithreading architectures and to recent synchronous/reactive research approaches. Concurrent system software consists of such economically important components as OS kernels; file, database, and network systems; device drivers; and I/O, transaction processing, and multimedia servers. Such components are reactive because they continually react to external events such as service requests. Software architectures are currently of significant interest to the software engineering community. Software architectures provide conceptual integrity to complex systems; they define `a shared repertoire of methods, techniques, patterns and idioms for structuring complex software systems'. The central feature of the soft-instruction software architecture is a customizable run-time containing a work-loop combining the functions of a machine instruction interpreter with the fundamental functions of an OS kernel. This provides the programmer with 2 levels of atomic instructions; one the actual low-level hardware instruction set; and the other the soft-instruction set specific to the high-level programming problem. The high-level soft-instructions can be interleaved to any required degree, thus supporting concurrent programming without the need for copying the entire register set upon context switch. The entire program is implemented completely in soft-instructions, i.e., if one thinks of an `original' conventional program, this entire program can be considered partitioned completely into critical sections that correspond to soft-instructions. Corresponding to each concurrent service request is a high-level instruction stream context; an arbitrary number of such contexts can concurrently be traversing the single table of `assembled' soft-instructions. A soft-instruction system implementor has considerable latitude in designing control flow and concurrency soft-instructions custom to his system problem. Soft-instruction implementations are stylized routines which, similar to hardware instructions, have a bounded execution time. Similar to hardware I/O instructions, I/O in a soft-instruction system must be asynchronous, i.e., a soft-instruction cannot initiate actions of arbitrary length. The soft-instruction programmer thus programs at 2 levels, a programming-in-the-large high-level in which a program is written in a custom instruction set, and a programming-in-the-small low-level in which individual soft-instructions are implemented (often in a conventional language, such as C). Programming-in-the-large can be supported by tools ranging from simple macro assemblers to complex optimizing compilers. Significant advantages of this approach are:
The techniques comprising the soft-instruction software architecture have been used in the past, most notably for real-time avionics software (for instance, the systems controlling the Apollo tracking ships/radars and the 1970's Safeguard missile defense system). Past use suffered from ad-hoc connotations and has been confounded with low-level assembler programming issues, such as variables within a single scope existing on 2 stacks. High level language programming support for this architecture has been limited. Most real-time/concurrent programming research has been directed at replacing such techniques, rather than bring them into the modern software engineering world. Although the use of many of the features of the soft-instruction architecture are supported by results of current synchronous/reactive and light-weight threading research, these current alternative approaches have typically adopted what is the equivalent of a dataflow rather than imperative Von Neumann programming approach. In large systems, such guarded command style programming has proven to be of significant psychological complexity. To add the soft-instruction architecture to the repertoire of the modern software engineer requires a clear explanation of the distinctive features required of any member of the architecture, a high-level programming model that is `obviously' easy, and a careful formal study of the performance, size, and maintenance characteristics of the architecture. Results of the formal study must be sufficient to provide `back-of-the-envelope' engineering decision support. Soft-instruction systems are particularly suited to modern embedded applications, since they can run stand-alone with minimal operating system overhead, yet they can scale to support large server applications supporting hundreds of concurrent requests. |