什么是“运行时"? [英] What is "runtime"?

查看:39
本文介绍了什么是“运行时"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过诸如C 运行时"、Visual C++ 2008 运行时"、.NET 公共语言运行时"等.

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

  • 什么是运行时"?是吗?
  • 它是由什么制成的?
  • 它如何与我的代码交互?或者更准确地说,我的代码是如何受它控制的?

在 Linux 上编写汇编语言时,我可以使用 INT 指令进行系统调用.那么,运行时只是一堆将低级函数包装成更抽象和更高级的函数的预制函数吗?但这似乎更像是库的定义,而不是运行时的定义?

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?

最近,我在想运行时可能与所谓的虚拟机有一些共同点,比如 JVM.这是导致这种想法的引文:

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)

添加 2

专家 C 编程:深入的 C 秘密.第 6 章运行时数据结构是这个问题的有用参考.

ADD 2

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

以下是我在了解了一些处理器设计知识后的一些看法.整个计算机只是多个层次的抽象.它从基本晶体管一直到正在运行的程序.对于任何抽象的level N,它的runtime是紧接在它下面的抽象的level N-1.是上帝给了我们0级抽象.

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.

推荐答案

运行时描述了在您的程序运行时执行的软件/指令,尤其是那些您没有明确编写但正确执行代码所必需的.

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.

像 C 这样的低级语言的运行时非常小(如果有的话).更复杂的语言,如允许动态消息传递的 Objective-C,有更广泛的运行时间.

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.

这篇关于什么是“运行时"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆