[英]Does Windows XP have an equivalent to VAX/VMS Installed Shared Images?
Back in the good old/bad old days when I developed on VAX/VMS it had a feature called 'Installed Shared Images' whereby if one expected one's executable program would be run by many users concurrently one could invoke the INSTALL utility thus: 在我使用VAX / VMS进行开发的过去的好时光中,它具有一项称为“安装的共享映像”的功能,通过该功能,如果预期一个人的可执行程序可以同时被许多用户运行,则可以调用INSTALL实用程序,因此:
$ INSTALL $安装
INSTALL> ADD ONES_PROGRAM.EXE/SHARE 安装>添加ONES_PROGRAM.EXE /共享
INSTALL> EXIT 安装>退出
The /SHARE flag had the effect of separating out the code from the data so that concurrent users of ONES_PROGRAM.EXE would all share the code (on a read-only basis of course) but each would have their own copy of the data (on a read-write basis). / SHARE标志的作用是从数据中分离出代码,以便ONES_PROGRAM.EXE的并发用户都将共享该代码(当然以只读方式),但是每个用户都将拥有自己的数据副本(在读写)。 This technique/feature saved Mbytes of memory (which was necessary in those days) as only ONE copy of the program's code ever needed to be resident in VAX memory irrespective of the number of concurrent users. 这项技术/功能节省了Mbytes的内存(这在当时是必需的),因为与VAX内存无关,程序代码的一个副本永远都不需要驻留在VAX内存中,而与并发用户数无关。
Does Windows XP have something similar? Windows XP是否具有类似的功能? I can't figure out if the Control Panel's 'Add Programs/Features' is the equivalent (I think it is, but I'm not sure) 我不知道控制面板的“添加程序/功能”是否等效(我认为是,但不确定)
Many thanks for any info 非常感谢您提供任何信息
Richard 理查德
ps INSTALL would also share Libraries as well as Programs in case you were curious 如果您感到好奇,ps INSTALL还将共享库和程序
The Windows virtual memory manager will do this automatically for you. Windows虚拟内存管理器将自动为您执行此操作。 So long as the module can be loaded at the same address in each process, the physical memory for the code will be shared between each process that loads that module. 只要模块可以在每个进程中加载到相同的地址,代码的物理内存将在加载该模块的每个进程之间共享。 That is true for all modules, libraries as well as executables. 所有模块,库和可执行文件都是如此。
This is achieved by the linker marking code segments as being shareable. 这是通过链接器将代码段标记为可共享的来实现的。 So, linkers mark code segments as being shareable, and data segments otherwise. 因此,链接器将代码段标记为可共享,否则将数据段标记为可共享。
The bottom line is that you do not have to do anything explicit to make this happen. 最重要的是,您不必做任何明确的事情就可以做到这一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.