Run-time system
Encyclopedia
A run-time system is a software component designed to support the execution of computer program
Computer program
A computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...

s written in some computer language. The run-time system contains implementations of basic low-level commands and may also implement higher-level commands and may support type checking, debugging
Debugging
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge...

, and even code generation and optimization.

Some services of the run-time system are accessible to the programmer through an application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

, but other services (such as task scheduling
Scheduling (computing)
In computer science, a scheduling is the method by which threads, processes or data flows are given access to system resources . This is usually done to load balance a system effectively or achieve a target quality of service...

 and resource management
Resource (computer science)
A resource, or system resource, is any physical or virtual component of limited availability within a computer system. Every device connected to a computer system is a resource. Every internal system component is a resource...

) may be inaccessible.

A run-time system relieves programmers from the burden of writing code for mundane tasks such as drawing text on the screen or making an Internet connection. It also provides an abstraction layer
Abstraction layer
An abstraction layer is a way of hiding the implementation details of a particular set of functionality...

 that hides the complexity or variations in the services offered by the operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

. In the limit, the run-time system may be a P-code machine
P-Code machine
In computer programming, a p-code machine, or portable code machine is a virtual machine designed to execute p-code...

 or virtual machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...

, that hides even the processor's instruction set
Instruction set
An instruction set, or instruction set architecture , is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O...

. This is the approach followed by many interpreted language
Interpreted language
Interpreted language is a programming language in which programs are 'indirectly' executed by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU...

s such as AWK, and some languages like Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 that are meant to be compiled into some machine-independent pseudocode (bytecode
Bytecode
Bytecode, also known as p-code , is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software interpreter as well as being suitable for further compilation into machine code...

). This arrangement greatly simplifies the task of language implementation and its adaptation to different machines, and allows sophisticated language features such as reflection. It also allows the same program to be executed on any machine without recompiling, a feature that has become very important since the diffusion of the World Wide Web
World Wide Web
The World Wide Web is a system of interlinked hypertext documents accessed via the Internet...

.

History

In vFortran, the run-time system consisted basically of the standard library subroutines, such as SQRT (square root
Square root
In mathematics, a square root of a number x is a number r such that r2 = x, or, in other words, a number r whose square is x...

) and the routines that implemented the FORMAT specs.

Notable early examples of run-time systems are the interpreters for BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....

 and Lisp. The latter included also a garbage collector
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

. Forth is an early example of a language that was designed to be compiled into pseudocode; its run-time system was a virtual machine that interpreted that pseudocode. Another popular, if theoretical, example is Donald Knuth
Donald Knuth
Donald Ervin Knuth is a computer scientist and Professor Emeritus at Stanford University.He is the author of the seminal multi-volume work The Art of Computer Programming. Knuth has been called the "father" of the analysis of algorithms...

's MIX
MIX
MIX is a hypothetical computer used in Donald Knuth's monograph, The Art of Computer Programming . MIX's model number is 1009, which was derived by combining the model numbers and names of several contemporaneous, commercial machines deemed significant by the author...

 computer.

In C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and later languages that supported dynamic memory allocation, the runtime also included a library that managed the program's memory pool.

In the object-oriented programming language
Object-oriented programming language
This is a list of object-oriented programming programming languages.-Languages with object-oriented features:*ABAP*Ada 95*AmigaE*BETA*Blue*Boo*C++*C#*COBOL*Cobra*ColdFusion*Common Lisp*COOL*CorbaScript*Clarion*CLU*Curl*D*Dylan*E*Eiffel...

s, the run-time system was often responsible also for dynamic type checking and resolving method references.

RSTS/E

An early example of run-time system is that included in the RSTS
RSTS/E
RSTS is a multi-user time-sharing operating system, developed by Digital Equipment Corporation , for the PDP-11 series of 16-bit minicomputers. The first version of RSTS was implemented in 1970 by DEC software engineers that developed the TSS-8 time-sharing operating system for the PDP-8...

 operating system. The "run-time system" (RTS) was the resident code (that is, code always in memory) which was mapped into the high end of the address space of a process, and could be called to provide services to a program, or used as the command line interpreter (CLI) user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

. The term in RSTS for a command line interpreter was keyboard monitor (KBM). This term should not be confused with the similar term keystroke logging
Keystroke logging
Keystroke logging is the action of tracking the keys struck on a keyboard, typically in a covert manner so that the person using the keyboard is unaware that their actions are being monitored...

.

RSTS did not itself define any standard filename extension
Filename extension
A filename extension is a suffix to the name of a computer file applied to indicate the encoding of its contents or usage....

 for an executable program file; instead, each installed RTS defined its own extension, and the appropriate RTS was loaded depending on the actual name of the program file. If the user issued a command to run a program without specifying the extension, then the system went through all installed RTSs, trying each corresponding extension in turn until it found the name of an existing program file.

The responsibility for loading and executing the program was left to the run-time system, so users could run interpreted
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 programs just as easily as those compiled into actual machine code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...

, if the interpreter was appropriately implemented as a run-time system. The standard BASIC-PLUS
BASIC-PLUS
BASIC-PLUS was an extended dialect of the BASIC programming language developed by Digital Equipment Corporation for use on its RSTS/E time-sharing operating system for the PDP-11 series of 16-bit minicomputers in the early 1970s through the 1980s....

 RTS provided a compiler, interpreter and KBM all packed into just 32KiB of code. And indeed many of the standard system utility programs (including privileged ones like LOGIN and LOGOUT) were written in BASIC-PLUS.

Other RTSs provided some emulation
Emulator
In computing, an emulator is hardware or software or both that duplicates the functions of a first computer system in a different second computer system, so that the behavior of the second system closely resembles the behavior of the first system...

 facilities, allowing simple programs written for the RT-11
RT-11
RT-11 was a small, single-user real-time operating system for the Digital Equipment Corporation PDP-11 family of 16-bit computers...

 and RSX-11
RSX-11
RSX-11 is a family of real-time operating systems mainly for PDP-11 computers created by Digital Equipment Corporation , common in the late 1970s and early 1980s. RSX-11D first appeared on the PDP-11/40 in 1972...

 operating systems to run under RSTS. An interesting note is that not all RTS's were designed as KBMs, however almost all KBMs were implemented as RTSes.

Under RSTS, the Text Editor and Corrector
Text Editor and Corrector
TECO is a text editor originally developed at the Massachusetts Institute of Technology in the 1960s, after which it was modified by 'just about everybody'...

 (TECO) was implemented as an RTS, though its KBM function was a stub
Method stub
A method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality. A stub may simulate the behavior of existing code or be a temporary substitute for yet-to-be-developed code...

 which loaded a program with a predefined name which had to be provided by the user. This allowed the user to implement their own KBM.

Even the Space Invaders
Space Invaders
is an arcade video game designed by Tomohiro Nishikado, and released in 1978. It was originally manufactured and sold by Taito in Japan, and was later licensed for production in the United States by the Midway division of Bally. Space Invaders is one of the earliest shooting games and the aim is to...

 video arcade game was eventually implemented as a multi-user RTS (driving VT52
VT52
The VT52 was a CRT-based computer terminal produced by Digital Equipment Corporation introduced in September, 1975 . It provided a screen of 24 rows and 80 columns of text and supported all 95 ASCII characters as well as 32 graphics characters. It supported asynchronous communication at baud rates...

 video terminals).

See also

  • Run time (program lifecycle phase)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK