作者christianSK (AG)
看板Grad-ProbAsk
標題Re: [理工] [計組]-中山96-資工所
時間Mon Sep 27 12:07:47 2010
這題我覺得是題目不好懂
※ 引述《starbury8 (馬不理不思議)》之銘言:
: (96中山資工)
: You Could speed up a Jaca program on a new computer
: by adding hardware support for garbage collection.
: Garbage collection currently comprises 20% of the cycles of the program.
: You have two possible chances to the machine.
: The first one would be to automatically handle garbage collection in hardware.
: This causes an increase in cycle time by a factor of 1.2.
: The second would beto provide for new hardware instructions
: to be added to the ISA that could be used during garbage collection.
: This would havle the number of instruction nedded for garbage collection
: but increase the cycle time by 1.1.
: Which of these two options, if either, should you choose? Why?
第一種方法
系統會自動處理 Garbage collection 但是clock cycle time 變成1.2倍
所以整體而言會變成 0.8*1.2 = 0.96 倍 (相較於原先執行時間)
第二種方法
增加了新的硬體 使得 Garbage collection 需處理的指令只有原先的一半
而clock cycle time 變成1.1倍
所以整體而言會變成 ( 0.8 + 0.2/2 ) * 1.1 = 0.99 (相較於原先執行時間)
so, 第一種方法是比較好的 因為執行時間比較短!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.32.68
推 starbury8:謝謝!! 我這本他寫(1-0.2/2)*1.1=0.99 所以看不懂 09/27 22:53
→ christianSK:我們是同一本阿XD" 我覺得題目不好懂 09/27 22:54