作者cansister (cansister)
看板Grad-ProbAsk
标题Re: [理工] [OS]-E.A.T
时间Sat Nov 28 14:58:02 2009
※ 引述《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