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

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 1631 | 回復(fù): 1
打印 上一主題 下一主題

Linux二進(jìn)制兼容模式是否影響程序執(zhí)行效率? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2005-06-06 10:24 |只看該作者 |倒序?yàn)g覽
摘自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模擬器”? 只是為了更容易地賣(mài)出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之類(lèi)的模擬器應(yīng)該不一樣。它僅是在freebsd的ABI基礎(chǔ)上增加了linux的ABI,這樣看來(lái)Linux二進(jìn)制兼容模式與native模式程序運(yùn)行的機(jī)制相同,不該有執(zhí)行效率的問(wèn)題,至少不該有很大影響,是不是       

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2005-06-06 10:54 |只看該作者

Linux二進(jìn)制兼容模式是否影響程序執(zhí)行效率?

個(gè)人認(rèn)為不影響效率?梢哉J(rèn)為FreeBSD kernel支持兩種ABI,它們是對(duì)等的,最終都是產(chǎn)生native process.
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專(zhuān)區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP