亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: Linux二進(jìn)制兼容模式是否影響程序執(zhí)行效率? [打印本頁(yè)]

作者: whoto    時(shí)間: 2005-06-06 10:24
標(biāo)題: Linux二進(jìn)制兼容模式是否影響程序執(zhí)行效率?
摘自http://www.freebsd.org.cn/snap/d ... uxemu-advanced.html
  1. ......
  2.     在FreeBSD內(nèi)核中有一個(gè)Linux內(nèi)核;由內(nèi)核提供的能夠提供所有服務(wù)的各種潛在功能在FreeBSD系統(tǒng)調(diào)用表記錄和Linux系統(tǒng)調(diào)用表記錄之間是一樣的:文件系統(tǒng)操作,虛擬內(nèi)存操作,信號(hào)發(fā)送,System V IPC,...等等。唯一的不同是FreeBSD會(huì)得到FreeBSD的膠合功能, 而Linux程序會(huì)得到Linux的膠合功能 (大部分老的操作系統(tǒng)只有它們自己的膠合函數(shù), 函數(shù)地址在靜態(tài)全局變量sysent[]結(jié)構(gòu)數(shù)據(jù)里面, 而不是動(dòng)態(tài)的初始化到進(jìn)程的proc結(jié)構(gòu))。

  3. 哪一個(gè)是FreeBSD自己的ABI呢?這無(wú)關(guān)緊要;旧希 唯一的不同是FreeBSD的膠合功能是被靜態(tài)連接到內(nèi)核,而Linux的膠合功能可能是被靜態(tài)連接到內(nèi)核,也可能它們通過(guò)一個(gè)內(nèi)核模塊來(lái)訪問(wèn)。

  4. 有一個(gè)真正的模擬器嗎?沒(méi)有,它只不過(guò)是一個(gè)ABI執(zhí)行機(jī)制,不是一個(gè)模擬器。

  5. 為什么有時(shí)它被叫做“Linux模擬器”? 只是為了更容易地賣出FreeBSD罷了!實(shí)際上,歷史上從來(lái)沒(méi)有描述這樣一種執(zhí)行機(jī)制的名字,F(xiàn)reeBSD并不是真正地運(yùn)行Linux程序,如果您不編譯進(jìn)代碼,或加載一個(gè)模塊。就需要有一個(gè)名字來(lái)描述這樣一種加載功能--因此就想出了“Linux模擬器”這樣一個(gè)名字。
復(fù)制代碼


摘自http://www.freebsd.org/doc/en_US ... uxemu-advanced.html
  1. ... ffect, there is a Linux kernel in the FreeBSD kernel; the various underlying functions that implement all of the services provided by the kernel are identical to both the FreeBSD system call table entries, and the Linux system call table entries: file system operations, virtual memory operations, signal delivery, System V IPC, etc... The only difference is that FreeBSD binaries get the FreeBSD glue functions, and Linux binaries get the Linux glue functions (most older OS's only had their own glue functions: addresses of functions in a static global sysent[] structure array, instead of addresses of functions dereferenced off a dynamically initialized pointer in the proc structure of the process making the call).

  2. Which one is the native FreeBSD ABI? It does not matter. Basically the only difference is that (currently; this could easily be changed in a future release, and probably will be after this) the FreeBSD glue functions are statically linked into the kernel, and the Linux glue functions can be statically linked, or they can be accessed via a kernel module.

  3. Yeah, but is this really emulation? No. It is an ABI implementation, not an emulation. There is no emulator (or simulator, to cut off the next question) involved.

  4. So why is it sometimes called “Linux emulation”? To make it hard to sell FreeBSD! Really, it is because the historical implementation was done at a time when there was really no word other than that to describe what was going on; saying that FreeBSD ran Linux binaries was not true, if you did not compile the code in or load a module, and there needed to be a word to describe what was being loaded--hence “the Linux emulator”.

復(fù)制代碼


freebsd沒(méi)有采用模擬的方式對(duì)linux程序支持,這一點(diǎn)與vmware、wine之類的模擬器應(yīng)該不一樣。它僅是在freebsd的ABI基礎(chǔ)上增加了linux的ABI,這樣看來(lái)Linux二進(jìn)制兼容模式與native模式程序運(yùn)行的機(jī)制相同,不該有執(zhí)行效率的問(wèn)題,至少不該有很大影響,是不是       
作者: tsuowl    時(shí)間: 2005-06-06 10:54
標(biāo)題: Linux二進(jìn)制兼容模式是否影響程序執(zhí)行效率?
個(gè)人認(rèn)為不影響效率?梢哉J(rèn)為FreeBSD kernel支持兩種ABI,它們是對(duì)等的,最終都是產(chǎn)生native process.




歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2