2013年11月29日 星期五

About 64bit application & OS & processor

最近在想kvm for ARMv8有什麼好處
想一想發現其實這就等同於ARMv8有什麼好處

我想最重要的一點就是64bit processor吧
由此又想到一堆關於32bit vs 64bit virtualization的問題
  • 64bit guest OS run on 32bit host OS?
  • 64bit guest OS run on 32bit processor?
  • Linux program run on Windows and vice versa?
看了這篇文章後我想答案是 http://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm
  • 只要是是64bit processor就可以run 64bit guest OS,但通常virtual machine設計會規定要有hardware virtualization support才可以,因為software virtualization會需要每個guest 64bit instruction都trap進32bit host來作simulation,相當慢!
  • Virtual machine無法,但simulator&emulator就可以,因為virtual machine是作OS virtualization,而64bit OS cannot run on 32bit processor,但simulator是作hardware virtualization,所以simulator可以在32bit processor上模擬一個64bit virtual processor,想當然就可以跑64bit guest OS
  • There are two main reasons that binarys from one OS can't be run on another OS. First is the fact that the binarys are in different formats. Linux uses ELF, and Windows uses PE. Now that compatibility can easlily be overcome, but the other problem is the OS library functions that all applications use must be ported over as well. Applications need to use OS system functions to do just about anything at all. This includes printing to the console, opening/closing files, creating windows, etc.


以下整理該文章我看到的一些重點
The main issue is that your computer works from the hardware such as the processor (or CPU, as it is called), through the operating system (OS), to the highest level which is your applications. So the computer hardware is designed first, the matching operating systems are developed, and finally the applications appear.


But a 64-bit application will only run on a 64-bit OS and a 64-bit OS will only run on a 64-bit processor.


An example of backward compatibility is Windows 64-bit. It has software called WOW64 that provides compatibility by emulating a 32-bit system.
One important point that is made in that article is that it is not possible to install a 32-bit device driver on a 64-bit operating system. Because device driver is at the same level with OS.

Following the general rule, we would expect that you cannot run 64-bit software on a 32-bit system. Except that there is one exception called virtualization.


Virtual Machine: OS virtualization.
Simulator & Emulator: Hardware virtualization.
So virtual machine in 32bit processor cannot run 64bit guest OS.
However, simulator in 32bit processor can simulate 64bit machine and run 64bit OS.


Reference : http://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm

Related Posts:

  • ARM Spec Study最近要開始讀ARMv8 spec,想說對作system來講,重點的東西要看那些 以下是自己歸納的: 1. States: instruction state, execution state, security state 2. Programming mode, register, datatype 3. Memory & protection 4. Interrrupt & exception vector table (A… Read More
  • 2013/10/4 練劍心得今日廖咏畋學長來教 教的東西以下分三項: 攻擊步身體運用、seme步與seme心、出端 1. 攻擊步身體運用 學長看到我們再練送足送足面的時候,說這個練習的要點是要身體輕鬆地向前送足 一開始做可以慢慢送足,要確保身體有確實推出去就是了 然後接攻擊步的時候運用向前的慣性來完成,一個重點就是身體要放輕鬆 關於身體整個壓進去,學長說推腰可能還是無法 像身體向前的姿勢時,推腰只會維持原來姿勢 但是推屁股跟大腿接的那塊地方就可以把身體挺直 所… Read More
  • ARM Exception Mechanism最近要開始讀ARMv8 spec 想了一下對於做System來說要要讀到哪些重點 歸納如以下 1. States: instruction state, execution state, security state 2. Programming mode, register, datatype 3. Memory & protection 4. Interrrupt & exception vector table (ARM d… Read More
  • 網路IP設定的一些事情一個IPv4的IP有32bit 其中此32bit要切成兩部份:網路位置, 主機位置 所以這時候就需要子網路遮罩來輔助知道哪些bit是指網路位置,哪些bit是指主機位置 以192.168.123.132/255.255.255.0 (或寫成192.168.123.132/24)當範例 11000000.10101000.01111011.10000100 -- IP 位址 (192.168.123.132)11111111.11111111.11… Read More
  • Cloud Service這學期系上開了很多雲端相關的課程 老實講我覺得有點誇張,就像是在追潮流那樣的猛開 很多課之間都有overlap 也不知道哪一門是最基礎的課,基礎的課應該要有通盤的全局觀來看cloud 有了全局觀後才知道要如何去挑選自己想要的課程 隱隱約約覺得是Cloud Service一個基礎,分成三種cloud service Software as a service - 提供cloud application       &… Read More

0 意見:

張貼留言