WWDC 2005 相關討論請至此留言!

任何關於 Mac 主機與周邊硬體的討論區

版主: Alex Tsaiross_ttbryanchangdigdog

內容
發表人
頭像
ulysses
討論區管理員
文章: 2475
註冊時間: 05/18/2001 1:01 am
來自: Forgotten Realm
聯繫:

#61 文章 ulysses »

yuzu 寫:因為種種考量,蘋果或許會將mac os x鎖死,繼續只能在自己家的硬體上使用,不會讓任何隨便一台wintel pc來跑mac os x。(當然到底事實會如何也不曉得)
那麼,(1)intel mac硬體能灌微軟系統嗎?(2)到底使用intel晶片的mac,在軟體部份還會再區分mac版跟pc版嗎?還是就都跨平台了呢?
究竟cpu更換的影響是什麼?不知道有沒有電腦程式達人,能為一般mac使用者來解惑?
真傷腦筋...

舉個容易懂的例子,Windows & Linux。RedHat 也是安裝在一般 Wintel PC 上,但是 Windows 還是不能安裝 RedHat RPM,Linux 也不能執行 .exe 檔。

簡單講一下一台能稱的上是一台『電腦』的東西的基本架構好了。

CPU 本身什麼事情都不能做,CPU 只能做運算、邏輯判斷、存取記憶體、I/O 等工作。要用到 DRAM?需要一個 DRAM Controller 來負責 Data path 的切換、Addressing & Banking 切換、DRAM 電容 Refresh 等工作。要用到 IDE?需要一個 IDE Controller 來作裝置識別、啟動、尋找、讀取等工作。這些所有周邊裝置的串連全都是要靠 Firmware,也就是 Basic Input Output System。CPU、控制晶片與 Firmware 三者共同組成電腦的基底層架構。Firmware 決定了 CPU 的各種 I/O 動作與軟、硬體中斷處理。程式的組語控制 CPU,CPU 使用 Firmware 的服務常式連接控制晶片,控制晶片再將資料傳輸給其他周邊裝置。如果基底層架構不同,同樣的一段組語連外部時鐘都讀不到。

上面一層就是作業系統的核心 Kernel。Kernel 主要負責三大工作,分別是『Process』、『Memory』與『Device』。Process 提供應用程式之間的多工或多緒切換,Memory 提供記憶體的存取、配置與釋放,Device 則提供周邊裝置的存取。Kernel 層聯結了更上一層的系統與底層的硬體裝置,對上層提供各種服務界面,對下則需要和底層硬體裝置直接交流。作為這些硬體裝置控制的程式就稱為『Module』。不同的主機板、不同的元件,就需要搭配不同的 Module。

Kernel 之上是作業系統的服務層 Service。包括了 GUI、資料封裝與解構、高階(Buffered)資料存取、外接裝置的驅動程式等。提供各種 API 服務讓應用程式呼叫。

Service 之上則是軟體元件層 Framework。例如 JVM、Cocoa,或是 Win32 的 MFC、OWL、.NET。提供各種資料與控制元件。

Framework 之上的,才是應用程式 Application。

你現在看到的絕大多數、有 GUI 畫面的應用程式,都屬於 Application 範疇。他們不必在意 CPU 與 Firmware 是啥、只要 Framework 提供的服務界面一樣,就能夠毫無問題的執行。注意這個句子:『提供的服務界面一樣』。你問的相容性問題的關鍵就在這裡,這兩個不同平台提供的服務界面並不相同。

假設不管這些程式語言(OBJ-C v.s. C++,或是 Java v.s. MS-J)的問題,也不管程式碼 ELF 檔格式的問題,單從程式碼本身的組語來看,假設一段程式碼要從鍵盤讀一個字,Darwin 編出來的程式碼可能是【跳到服務常式 $00003A89 執行】,那是 Darwin 的鍵盤讀取服務常式的位置(舉例,隨便掰的)。但是在 Win32 平台上,$00003A89 可能不是用來讀取鍵盤的服務常式,而是控制硬碟磁頭位置重置的服務常式。所以這個程式當然不能用。

那麼 Windows 能不能灌到 Intel Based Mac 上?不曉得。今天 Apple 並沒有宣佈 Intel Based Mac 的架構是否與一般 Wintel 機器相同,也未詳述在其上執行 Win32 程式的方式到底是用 CPU 本身的 Virtual 架構,還是 VMware 模擬器。Pentinum 4 這個 CPU 本身就是一個 CISC 指令的 Wrapper 加上 Pipeline 切分到二十幾層的簡單指令核心,能夠玩的花樣太多了。

所以說,換了 CPU,Windows 的程式和 Mac 的程式還是一樣不通。更換 CPU 的真正影響會是什麼?

1. Apple 必須重新撰寫 Kernel 到 Service 層的所有程式。這點似乎已經做到了。
2. 給 PPC 用的程式必須從原始碼重新編譯,否則只能像 68K 程式一樣在模擬器中執行。
ash nazg durbatuluk, ash nazg gimbatul,
ash nazg thrakatuluk agh burzum-ishi krimpatul.
頭像
比卡超
留言破百
文章: 102
註冊時間: 04/29/2001 1:01 am
來自: 香港

#62 文章 比卡超 »

I just want to know how CISC instruction set in Intel can emulate RISC instruction set in PPC effectively.

Rosetta is really a mystery to me...
sony
留言破百
文章: 147
註冊時間: 05/24/2001 1:01 am
來自: Taipei, Taiwan

#63 文章 sony »

the real unknown 寫:Forth? 那個 Forth 害死的人可能比 Darth Vader 還多。
:badgrin:

每一台Mac (PPC) 裡面都有裝Forth !!!
你躲不掉了..... :badgrin:
頭像
ulysses
討論區管理員
文章: 2475
註冊時間: 05/18/2001 1:01 am
來自: Forgotten Realm
聯繫:

#64 文章 ulysses »

比卡超 寫:I just want to know how CISC instruction set in Intel can emulate RISC instruction set in PPC effectively.

Rosetta is really a mystery to me...
P4 is not a CISC.
P4 is a RISC-based chip with CISC code set interpreter that emulate a P3.
ash nazg durbatuluk, ash nazg gimbatul,
ash nazg thrakatuluk agh burzum-ishi krimpatul.
mikethebear
基本會員
文章: 30
註冊時間: 02/26/2005 11:02 pm

#65 文章 mikethebear »

[以我自己為例,我是今天打算買pb了
但是看到要改成intel的cpu,而且還是半年以後的2006
這段尷尬的時間或許是要軟體商開始位mac intel做準備吧
但是卻讓現在有購買意願的顧客非常的疑惑

若現在買powerpc的產品,半年左右就開始換intel了
而且JOBS自己也承認了POWERPC和INTEL的差距
等於是說現在買mac是買到一個相對較遜色且半年就掛的產品

intel的機子出來相信大家還是需要經過試驗的,沒有人喜歡當白老鼠。

這段其間叫顧客要怎樣?都別動嗎??

Apple Care也沒什麼用處囉??
頭像
bryanchang
討論區管理員
文章: 7057
註冊時間: 04/19/2001 1:01 am
來自: The '60s
聯繫:

#66 文章 bryanchang »

比卡超 寫:I just want to know how CISC instruction set in Intel can emulate RISC instruction set in PPC effectively.

Rosetta is really a mystery to me...
The keyword here is "effectively": Apps running on Rosetta is NOT nearly as fast as native apps.
圖檔
頭像
紅標男孩
基本會員
文章: 60
註冊時間: 11/27/2002 1:01 am
來自: 台北
聯繫:

#67 文章 紅標男孩 »

太好了,謝謝ulysses詳盡並且有耐性的解說!
對我這種雖然也是用了mac幾年,並且也買過幾台的使用者來說,
雖然很熟悉mac os作業系統上,
種種軟體的使用以及mac os基本的概念,
但對電腦機器或程式內部那麼技術性或運算的問題,
還真是一知半解,
因此看到今天網路上,這麼多人冒出許多說法(或惶恐或擔心)
也覺得很困惑,想要知道到底Apple今天這個舉動牽扯的互動是什麼?
讀過ulysses的解說,已經明白了。
頭像
Alex Tsai
討論區管理員
文章: 8515
註冊時間: 04/26/2001 1:01 am
來自: Taipei, Taiwan
聯繫:

#68 文章 Alex Tsai »

個人覺得市場上還有許多許多的 PowerPC Mac,所以軟體商一時間也得兩種版本都兼顧,就好像當年從 68K 系列轉到 PowerPC 的那個時間一樣。所以個人認為現在買了 PowerPC Mac ,不會說過了兩年就面臨無軟體可用的尷尬。

當然,如果過了兩年,發現並沒有啥的「白老鼠死在灘頭上」的問題,而且 Intel Mac 表現也很棒,軟體效能也真提高了,屆時轉進,也還不遲。況且舊機器永遠都賣得掉,只是價格的問題。

但唯一 100% 肯定的,是萬萬不能讓這兩年的時光虛度,所以如果目前真有購買 Mac 新機的需求,那就先買先用便是。
【老地方神聖狂吃團之素吃客】【老地方神聖狂喝團之素喝客】
諸法皆空,自由自在。緣起緣滅,來去自如。
mikethebear
基本會員
文章: 30
註冊時間: 02/26/2005 11:02 pm

#69 文章 mikethebear »

謝謝蔡大師的建議,小弟已豁然開朗了~謝謝謝謝~~~ :D
頭像
比卡超
留言破百
文章: 102
註冊時間: 04/29/2001 1:01 am
來自: 香港

#70 文章 比卡超 »

ulysses 寫: P4 is not a CISC.
P4 is a RISC-based chip with CISC code set interpreter that emulate a P3.
...
x86 ISA is CISC based. No matter how P4 interpret it internally. Eventhough those nano code in P4 is RISC or somewhat, CISC has a nature of complicate even in simple job. An complicate code to emulate RISC PPC instruction effectively is definely not feasible.

Rosetta is a mystery to me.....
bryanchang 寫:
The keyword here is "effectively": Apps running on Rosetta is NOT nearly as fast as native apps.
I just want to know how "effectively" is. On a 3.6GHz P4, can it comes to similar performance as 1.5Ghz G4?
頭像
Badger
留言破百
文章: 159
註冊時間: 05/27/2004 8:15 pm
來自: 飛鴻踏雪泥…
聯繫:

#71 文章 Badger »

yuzu 寫:因為種種考量,蘋果或許會將mac os x鎖死,繼續只能在自己家的硬體上使用,不會讓任何隨便一台wintel pc來跑mac os x。(當然到底事實會如何也不曉得)
……
……
那麼,(1)intel mac硬體能灌微軟系統嗎?……
關於這些問題,這裡有相關的資訊,摘錄如下:

After Jobs' presentation, Apple Senior Vice President Phil Schiller addressed the issue of running Windows on Macs, saying there are no plans to sell or support Windows on an Intel-based Mac. "That doesn't preclude someone from running it on a Mac. They probably will," he said. "We won't do anything to preclude that."

However, Schiller said the company does not plan to let people run Mac OS X on other computer makers' hardware. "We will not allow running Mac OS X on anything other than an Apple Mac," he said.


換言之,

1.Intel mac硬體應該可以灌微軟視窗系統,Apple不會將Intel mac硬體鎖死,只不過Apple也不會自己來支援或銷售這樣的組合。

2.Apple目前計畫將mac os x鎖死,繼續只能在自己家的硬體上使用,不會讓任何隨便一台wintel pc來跑mac os x。
追求卓越 樂在其中
Mac Cool...8-)
頭像
bryanchang
討論區管理員
文章: 7057
註冊時間: 04/19/2001 1:01 am
來自: The '60s
聯繫:

#72 文章 bryanchang »

比卡超 寫:I just want to know how "effectively" is. On a 3.6GHz P4, can it comes to similar performance as 1.5Ghz G4?
That's easy,look at this article:

http://www.mrbarrett.com/archives/2005/ ... n_int.html

According to his test, xbench score is about 63.23 (emulator) to 305.46 (PPC native)
圖檔
頭像
Alex Tsai
討論區管理員
文章: 8515
註冊時間: 04/26/2001 1:01 am
來自: Taipei, Taiwan
聯繫:

#73 文章 Alex Tsai »

mikethebear 寫:謝謝蔡大師的建議,小弟已豁然開朗了~謝謝謝謝~~~ :D
在下非大師,只是單純的個人想法。

老實說:個人正準備買進 iMac G5 20" 一台!攜手共進吧! :badgrin:
【老地方神聖狂吃團之素吃客】【老地方神聖狂喝團之素喝客】
諸法皆空,自由自在。緣起緣滅,來去自如。
頭像
比卡超
留言破百
文章: 102
註冊時間: 04/29/2001 1:01 am
來自: 香港

#74 文章 比卡超 »

bryanchang 寫: According to his test, xbench score is about 63.23 (emulator) to 305.46 (PPC native)
哈哈........ :? :?

還是將來的Intel-Mac還只是賣USD999.......
sony
留言破百
文章: 147
註冊時間: 05/24/2001 1:01 am
來自: Taipei, Taiwan

#75 文章 sony »

小弟目前對於Intel-based Mac解讀,是把它當成一台跑Open Firmware的Intel-based PC.

所以,好像要看MS Windows那邊與一般的Intel-based PC是否有支援Open Firmware了.就可以說明所謂"鎖死"MacOS X之類的說法

雖然是Intel-based PC,小弟覺得,如果支援Open Firmware會比目前的一般Intel-based PC優秀的多.

這種說法是否可以讓Mac死忠派覺得好過一些?
icefox
基本會員
文章: 43
註冊時間: 05/11/2005 9:19 am

#76 文章 icefox »

sony 寫:小弟目前對於Intel-based Mac解讀,是把它當成一台跑Open Firmware的Intel-based PC.

所以,好像要看MS Windows那邊與一般的Intel-based PC是否有支援Open Firmware了.就可以說明所謂"鎖死"MacOS X之類的說法

雖然是Intel-based PC,小弟覺得,如果支援Open Firmware會比目前的一般Intel-based PC優秀的多.

這種說法是否可以讓Mac死忠派覺得好過一些?
呵呵,Open Firmware 開完機之後就休息了,把控制權完全交給 OS X...
so... 看不出優秀在哪裡... 而且 Apple 說了,在 x86 上不玩 OF
頭像
droger
留言破百
文章: 119
註冊時間: 02/14/2003 10:42 am

#77 文章 droger »

所以不知道開機聲會不會變成噹噹噹噹
頭像
ulysses
討論區管理員
文章: 2475
註冊時間: 05/18/2001 1:01 am
來自: Forgotten Realm
聯繫:

#78 文章 ulysses »

比卡超 寫:x86 ISA is CISC based. No matter how P4 interpret it internally. Eventhough those nano code in P4 is RISC or somewhat, CISC has a nature of complicate even in simple job. An complicate code to emulate RISC PPC instruction effectively is definely not feasible.
Rosetta is a mystery to me.....
Maybe Mac OS X "Mintelac" is compiled as P4 native instruction set ?
Maybe Apple is not planning to use Pentium 4 but Itanium instead ?

I don't expect there would be performance gap between the PPC-Mac and Intel-Mac, but I do expect the size and price could be dropped comparing to the monster PM G5.
sony 寫:小弟目前對於Intel-based Mac解讀,是把它當成一台跑Open Firmware的Intel-based PC.
雖然是Intel-based PC,小弟覺得,如果支援Open Firmware會比目前的一般Intel-based PC優秀的多.
Wintel 現在的問題都是在 Windows 本身,而不是硬體架構。
AWARD BIOS 也沒啥不好,只是比較醜一點就是。
ash nazg durbatuluk, ash nazg gimbatul,
ash nazg thrakatuluk agh burzum-ishi krimpatul.
頭像
janusng
嗜冰客
文章: 1048
註冊時間: 04/30/2001 1:01 am
來自: Metropolis Asylum
聯繫:

#79 文章 janusng »

ulysses 寫:
比卡超 寫:I just want to know how CISC instruction set in Intel can emulate RISC instruction set in PPC effectively.

Rosetta is really a mystery to me...
P4 is not a CISC.
P4 is a RISC-based chip with CISC code set interpreter that emulate a P3.
敢問 ulysses 大人,P4 可以行那一個 RISC 指令集呢?

ISA 就是 complier 同 programmer 可以使用的介面,你可以寫 uop 給 P4 運行嗎?可以 access 第九個 register 嗎?

CISC 就是 CISC,CPU 內部如何運作,也不會令 CISC 變 RISC 的。
正如有個翻譯機,也不代表你會說法文。 ;)

P.S.
其實是有辦法用第九個 register 的,用 EM64T ISA 就是了!但你明白我說什麼了! :badgrin:
圖檔
It is not god who created man. It is man who created God.

Light travels faster than sound. This is why some people appear bright until you hear them speak.
頭像
進藤光
冰果室元老
文章: 3205
註冊時間: 03/16/2005 5:18 pm
來自: insoler.com
聯繫:

#80 文章 進藤光 »

我印象中 P4 底層還是跑 x86,不是 PPC 或是其他指令集。
只是 Intel 把 x86 核心精簡起來,再用一部【微處理器】去處理複雜的 x86 指令集。

所以 RISC 或 CISC 通通是 x86,如果我沒記錯的話...
回覆文章