gpt4 book ai didi

terminology - 子系统到底是什么?

转载 作者:行者123 更新时间:2023-12-04 03:12:16 28 4
gpt4 key购买 nike

我正在读一本书,里面说有这些子系统:

win32,os/2,posix,etc..

但是我对这些符号没有任何感性认识,你能用简短的语言解释一下吗?

最佳答案

我觉得“子系统”的概念有些定义不明确,或者至少在不同的上下文中具有不同的含义。

根据 MSDN documentation :

Environment subsystems are Windows NT processes that emulate different operating system environments. The Windows NT executive provides generic services that all environment subsystems can call to perform basic operating system functions.

Windows 内部结构 book讨论以下两个子系统:

  • Windows 子系统 其中说 - “这个 [子系统] 的特殊之处在于没有它 Windows 就无法运行。(它拥有键盘、鼠标和显示器,并且需要存在即使在没有交互式用户登录的服务器系统上也是如此。事实上,其他两个(哪两个?)子系统配置为按需启动,而 Windows 子系统必须始终运行。”
  • 基于 Unix 的应用程序子系统,也称为 SUA[POSIX] 子系统

现在,可以将/SUBSYSTEM 选项发送到 its 中的 Microsoft VS C++ 链接器 documentation说,我引用

You can specify any of the following subsystems:

BOOT_APPLICATION An application that runs in the Windows boot environment. For more information about boot applications, see About the BCD WMI Provider.

CONSOLE A Windows character-mode application. The operating system provides a console for console applications.

Extensible Firmware Interface (EFI) Image The EFI subsystem options describe executable images that run in the Extensible Firmware Interface environment. This environment is typically provided with the hardware and executes before the operating system is loaded. The major differences between EFI image types are the memory location that the image is loaded into and the action that's taken when the call to the image returns. An EFI_APPLICATION image is unloaded when control returns. An EFI_BOOT_SERVICE_DRIVER or EFI_RUNTIME_DRIVER is unloaded only if control returns with an error code. An EFI_ROM image is executed from ROM. For more information, see the specifications on the Unified EFI Forum website.

NATIVE Code that runs without a subsystem environment—for example, kernel mode device drivers and native system processes. This option is usually reserved for Windows system features.

POSIX An app that runs in the POSIX subsystem in Windows.

WINDOWS An app that runs in the Windows graphical environment. This includes both desktop apps and Windows Store apps.

WINDOWSCE The WINDOWSCE subsystem indicates that the app is intended to run on a device that has a version of the Windows CE kernel. Versions of the kernel include PocketPC, Windows Mobile, Windows Phone 7, Windows CE V1.0-6.0R3, and Windows Embedded Compact 7.

就这样吧。最后,人们有时会谈论“Win32”子系统,我不知道我应该把它理解为链接器选项意义上的“windows”子系统还是“控制台”子系统。

回到 Windows Internals 一书,它进一步说“每个可执行镜像 (.exe) 都绑定(bind)到一个且只有一个子系统”,这将解释需要在链接时指定您的应用程序所针对的子系统。

关于terminology - 子系统到底是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5792498/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com