运行时主机到底是什么?
Runtime Host 的确切定义是什么?
公共语言运行时旨在支持各种不同类型的应用程序,从 Web 服务器应用程序到具有传统丰富 Windows 用户界面的应用程序。每种类型的应用程序都需要一个运行时主机来启动它。运行时主机将运行时加载到进程中,在进程内创建应用程序域,并将用户代码加载到应用程序域中。
那么它是一个将运行时加载到另一个进程中的进程吗?
如何在任务管理器中查看它?
What is the exactly definition of Runtime Host?
The common language runtime has been designed to support a variety of different types of applications, from Web server applications to applications with a traditional rich Windows user interface. Each type of application requires a runtime host to start it. The runtime host loads the runtime into a process, creates the application domains within the process, and loads user code into the application domains.
So is it a process which loads the runtime into another process?
How do I check it in Task Manager?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,它是一个将运行时 DLL(例如 mscoree.dll 等)加载到其进程空间中的进程。
所以只有1个进程空间。
所指的运行时实际上是.Net 运行时或 CLR。从简化的传统操作系统的角度来看,CLR 实际上只是一组 DLL。因此,您需要一个操作系统进程来加载并执行该 DLL 的入口点。这个托管可执行文件是您的运行时主机。实际上,.Net 运行时主机为 CLR 做了很多事情(请参阅托管概述 )
您提到了 MSDN,所以我猜您已经查看了 运行时主机就在那里。您可以看到他们给出的示例都是托管 CLR(DLL)的可执行文件。
希望有帮助。
No, it's a process that loads the runtime DLLs ( e.g. mscoree.dll, etc ) into its process space.
So there is only 1 process space.
The runtime that is referred to is really the .Net runtime or CLR. And from a simplified traditional OS point of view, the CLR is really just a set of DLLs. So, you need a OS process to load and execute the entry point of that DLL. This hosting executable is your runtime host. In reality the .Net runtime host does a lot of things for the CLR ( See Hosting Overview )
You mentioned MSDN, so I guess you've looked at Runtime Hosts on there. You can see the examples they give are all executables that host the CLR ( DLLs ).
Hope that helps.
本文可能会有所帮助:实现自定义运行时主机。它讨论了主机的各个方面以及您何时/为何想要实现自己的主机。
直接摘自文章:
.NET Framework 附带的主机示例包括:
与 ASP.NET 负责
启动CLR并初始化
路由 Web 请求所需的管道
到 ASP.NET 进程。
带有一个挂钩的 MIME 过滤器
Internet Explorer 5.01 或更高版本
执行托管代码控制
从 HTML 页面引用。
可执行文件是从启动的
shell,一小块不受管理的
调用转换的代码
控制权交给 CLR。
其他主机可能包括:
Microsoft SQL Server 将允许
要写入的存储过程
支持 .NET 的语言
框架并执行
CLR。
电子邮件/日历/联系程序
允许用户编写脚本
定制电子邮件的处理
消息、约会等。
很容易想象这些脚本
运行在 CLR 上。保安
CLR提供的系统是
在这种情况下尤其重要
因为扩散
通过电子邮件系统传播的病毒。
This article might help: Implementing a custom runtime host. It discusses the various aspects of the host and when/why you might want to implement your own.
Lifted directly from the article:
examples of hosts that ship with the .NET Framework include:
with ASP.NET is responsible for
starting the CLR and initializing the
plumbing needed to route Web requests
to the ASP.NET processes.
with a MIME filter that hooks into
Internet Explorer 5.01 or later to
execute managed code controls that
are referenced from HTML pages.
executable is launched from the
shell, a small piece of unmanaged
code gets invoked that transitions
control to the CLR.
Other hosts could include:
Microsoft SQL Server will allow
stored procedures to be written in
languages that support the .NET
Framework and are executed with the
CLR.
e-mail/calendar/contact programs
allow users to write scripts to
customize the processing of e-mail
messages, appointments, and so on.
It's easy to imagine these scripts
running on the CLR. The security
system provided by the CLR is
especially important in this scenario
because of the proliferation of
viruses spread by e-mail systems.