Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "runtime"?

Tags:

terminology

I have heard about things like "C Runtime", "Visual C++ 2008 Runtime", ".NET Common Language Runtime", etc.

  • What is "runtime" exactly?
  • What is it made of?
  • How does it interact with my code? Or maybe more precisely, how is my code controlled by it?

When coding assembly language on Linux, I could use the INT instruction to make the system call. So, is the runtime nothing but a bunch of pre-fabricated functions that wrap the low level function into more abstract and high level functions? But doesn't this seem more like the definition for the library, not for the runtime?

Are "runtime" and "runtime library" two different things?

ADD 1

These days, I am thinking maybe Runtime has something in common with the so called Virtual Machine, such as JVM. Here's the quotation that leads to such thought:

This compilation process is sufficiently complex to be broken into several layers of abstraction, and these usually involve three translators: a compiler, a virtual machine implementation, and an assembler. --- The Elements of Computing Systems (Introduction, The Road Down To Hardware Land)

ADD 2

The book Expert C Programming: Deep C Secrets. Chapter 6 Runtime Data Structures is an useful reference to this question.

ADD 3 - 7:31 AM 2/28/2021

Here's some of my perspective after getting some knowledge about processor design. The whole computer thing is just multiple levels of abstraction. It goes from elementary transistors all the way up to the running program. For any level N of abstraction, its runtime is the immediate level N-1 of abstraction that goes below it. And it is God that give us the level 0 of abstraction.

like image 786
smwikipedia Avatar asked Oct 10 '10 13:10

smwikipedia


People also ask

What do you mean by runtime?

Run time is a phase of a computer program in which the program is run or executed on a computer system. Run time is part of the program life cycle, and it describes the time between when the program begins running within the memory until it is terminated or closed by the user or the operating system.

What is a runtime application?

In basic terms, the application runtime environment is a configuration of hardware and software necessary for that application code to execute -- any operation or behavior that is not directly attributable to the work of the application.

What are runtime services?

A runtime system refers to the collection of software and hardware resources that enable a software program to be executed on a computer system. The runtime system is a composite mechanism designed to provide program execution services, regardless of the programming language being used.


2 Answers

Runtime describes software/instructions that are executed while your program is running, especially those instructions that you did not write explicitly, but are necessary for the proper execution of your code.

Low-level languages like C have very small (if any) runtime. More complex languages like Objective-C, which allows for dynamic message passing, have a much more extensive runtime.

You are correct that runtime code is library code, but library code is a more general term, describing the code produced by any library. Runtime code is specifically the code required to implement the features of the language itself.

like image 186
e.James Avatar answered Oct 01 '22 20:10

e.James


Runtime is a general term that refers to any library, framework, or platform that your code runs on.

The C and C++ runtimes are collections of functions.

The .NET runtime contains an intermediate language interpreter, a garbage collector, and more.

like image 38
SLaks Avatar answered Oct 01 '22 22:10

SLaks