Runtime system

This environment may address a number of issues including the management of application memory, how the program accesses variables, mechanisms for passing parameters between procedures, interfacing with the operating system (OS), among others.

The compiler makes assumptions depending on the specific runtime system to generate correct code.

This definition includes putting parameters onto the stack before function calls, parallel execution of related behaviors, and disk I/O.

[3] In addition to execution model behavior, a runtime system may also perform support services such as type checking, debugging, or code generation and optimization.

The runtime environment includes not only accessible state values, but also active entities with which the program can interact during execution.

Likewise, hardware devices such as disks or DVD drives are active entities that a program can interact with via a runtime system.

In other words, from boot until power-down, the entire OS is dedicated to only the application(s) running within that runtime environment.

As an extreme example, the physical CPU itself can be viewed as an implementation of the runtime system of a specific assembly language.

Some compiled or interpreted languages provide an interface that allows application code to interact directly with the runtime system.

Normally, core aspects of a language's behavior such as task scheduling and resource management are not accessible in this fashion.

Higher-level behaviors implemented by a runtime system may include tasks such as drawing text on the screen or making an Internet connection.

It also allows the same program to be executed on any machine without an explicit recompiling step, a feature that has become very important since the proliferation of the World Wide Web.

In the object-oriented programming languages, the runtime system was often also responsible for dynamic type checking and resolving method references.