作者sa074463 (壘包)
看板Grad-ProbAsk
標題[理工] [OS]-demanded paging
時間Wed Mar 3 01:22:20 2010
恐龍習題上面有一題:
Consider a demand-paging system with a paging disk that has an average
access and transfer time of 20milliseconds. Addresses are translated
through a page table in main memory, with an access time of 1microsecond
per memory access. Thus, eachmemory reference through the page
table takes two accesses. To improve this time, we have added an
associative memory that reduces access time to one memory reference, if the
page-table entry is in the associative memory.
Assume that 80 percent of the accesses are in the associative memory
and that, of the remaining, 10 percent (or 2 percent of the total) cause
page faults.What is the effective memory access time?
他的習題解答是給這樣:
effective access time = (0.8)*(1 us) + (0.1)*(2 us) + (0.1)*(5002 us)
= 501.2 us
= 0.5 ms
為什麼是這樣算阿??
(0.1)*(2 us) + (0.1)*(5002 us)是什麼意思呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.62.202.51
→ EntHeEnd:解錯了吧 google找的到正常一點的答案 03/03 01:38
→ EntHeEnd:1us + 0.2us + 0.02*20000ms 03/03 01:39
推 lightergogo:我是算0.8*1us + 0.2*0.9*2us + 0.2*0.1*(20ms+2us) 03/03 02:16