For faster navigation, this Iframe is preloading the Wikiwand page for 加载器.

加载器

此条目没有列出任何参考或来源。 (2011年12月23日)维基百科所有的内容都应该可供查证。请协助补充可靠来源改善这篇条目。无法查证的内容可能会因为异议提出而被移除。

加载器(英语:Loader),又译为加载器、加载程序,是操作系统的一部分,负责程序的加载。它是程序执行中不可或缺的一个步骤,加载器会将程序置放在存储器中,让它开始执行。加载程序的步骤包括,读取可执行文件,将可执行文件的内容写入存储器中,之后开展其他所需的准备工作,准备让可执行文件运行。当加载完成之后,操作系统会将控制权交给加载的代码,让它开始运作。

在电脑系统中,加载器是操作系统中负责加载程序和的部分,是程序启动过程中必要的一步。加载器将程序放入内存当中并准备好执行。加载一个程序,要将包含程序指令序列的可执行文件拷贝或者映射到内存中,并执行一些其他的运行前准备工作。当加载完成时,操作系统就将控制权移交给加载好的程序以开始运行。

所有支持程序加载的操作系统都有加载器,除了一些只支持固定程序集的专用电脑系统。嵌入式系统一般不设有加载器,程序代码直接从ROM上获取(或以其它相似的方式)。为加载操作系统本身,在启动的过程中会使用一个专门的引导程序(Boot Loader)。在许多操作系统中,加载器永久驻留在内存中,尽管一些支持虚拟内存的操作系统可能会允许它放置于支持分页的内存区域。

在支持虚拟存储系统的操作系统中,加载器可能不会直接将可执行文件的内容拷贝到内存中,而是简单地向虚拟存储器声明一个从可执行文件内容到一块分配的用以容纳运行时程序的内存区域的映射(见内存映射文件),使虚拟存储器知晓那些包含这些内存区域的页需要在被运行的程序访问时进行填充。这可能意味着程序的部分代码在被使用到之前并不会被拷贝进内存中,而永远不使用的代码可能永远也不会被加载到内存中。

相关条目

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
加载器
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?