※ 引述《yesa315 (XD)》之銘言:
: Consider a demand-paging system with a paging disk that has an average
: access and transfer time of 20 milliseconds.Addresses are translated
: through a page table in main memory, with an access time of 1 microsecond
: per memory access. Thus, each memory 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?
: 恐龍本習題 跟95政大的考題類似 但給的答案
: EAT = (0.8) × (1 us) + (0.1) × (2 us) + (0.1) × (5002 us)
: = 501.2 us
: = 0.5 ms
: 其中 5002us 滿怪的 我算的是 應該2*20 ms + 2*1 us =40002us
: 有高手可以解釋整個架構嗎?
: 謝謝!
EAT = (0.8)*(1us) + (0.2)*(1us + (1-0.1)*(1us) + (0.1)*(20ms))
= 0.8us + 0.2us + 0.18us + 400us
= 401.18us
= 0.4ms
想法:
EAT = (TLB hit)+(TLB miss)
= (1次 memory access) + (1次memory access + 資料存在時1次 + 資料不存在時)
讀取page table資料 memory access page fault
這樣對嗎?? 我不是很確定
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.125.50.152