Grad-ProbAsk 板


LINE

※ 引述《cansister (cansister)》之铭言: : ※ 引述《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 : 这样对吗?? 我不是很确定 我觉得他题目给的答案是错的(恐龙本也不一定就是对的) of the remaining, 10 percent (or 2 percent of the total) =>剩下的机率 的 再10% =>(20%) 就是 (2%) 这是其中一行题目~解答没有考虑到是2%造成page fault~机率就写错了~ 以下是我的见解: 考虑1个 需求分页 系统 (1) 使用paging disk =>发生page faults後 average (access and transfer time) = 20 milliseconds (2) an access time of 1 microsecond per memory access. => 1us (3) page table in main memory => 每次参考 需要 2次 (存取page table所在位址 + 存取实体位址) (4) 加入一个associative memory 使得 减少存取时间of one memory reference (5) if the page-table entry is in the associative memory. 就是使用所谓的 TLB associative memory access time 没写 通常是省略(因为极快~近似0) (20%机率的其中再90%可在此取得 = 18% of the total) | (存取Main memory上的 page table所在位 | 址 + 实体位址 =1us+1us )  (其余的20%机率中) | | | | |          |      |  | (其余的20%机率的再10%机率只能 (80% TLB hit) |      | | 去disk取 =2% of the total) | |      | | | ↓ ↓ ↓ ↓ ↓ : (0.8)*(1us) + (0.2) * [0us + (0.9)*(2us) + (0.1)*( 1us +20ms + 0us+ 2us )] ↑ |             |  | | | | ↓ | | | | | (TLB Miss成本) | | | | | | | | | |  | | | | |  (page Miss成本=1us)←—  | | | |      | | | (存取Main memory上实体位址=1us )              |   | |                 (page fault)←——————— ↓ | :[替换完之後 还要去] ——→(TLB 再次Miss)| [Main memory 存取 ] (因为刚放上去)|       | (所以TLB内没有)| ↓ ↓ (存取Main memory上的 page table所在位址 + 实体位址=1us+1us) = 0.8us + 0.36us + 0.02 * 20003us =401.22 us 欢迎讨论 -- 学长学长!那边有飙车族 学长学长!那边刚好像有女生 学长学长!那边有人红灯右转 砍人 被压上车 ψQSWEET 他妈的 ◎ ◎ 喔~~ ︶ ︶ ◎ ◎ 喔~~ ︶ ︶ ◎ ◎ 拦下来呀! ⊙◥ 3╯ξ 没王法了 (哈欠) (烟~) 是不是?!( ) --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.227.112.246 ※ 编辑: qazwsxee 来自: 61.227.112.246 (11/29 04:47) ※ 编辑: qazwsxee 来自: 61.227.112.246 (11/29 04:49)
1F:→ dolphin0111:最後那边应该不用算page miss吧! 12/21 18:57
2F:→ dolphin0111:好像又要 12/22 08:32
3F:→ dolphin0111:我觉得那个page miss我不太懂他的意思 12/22 08:44
4F:→ dolphin0111:感觉那个地方应该是指hit time 12/22 08:45
5F:→ dolphin0111:当搬到Cache之後再去access data 12/22 08:46
6F:推 comaniac:page Miss成本 和 存取...中略...所在位址 有什麽不同@@? 12/30 02:01
7F:→ comaniac:照理说发生page miss後不会先去存实体位置(因为miss) 12/30 02:02
8F:→ comaniac:而是去disk抓data(20ms),抓回来後才存取memory 12/30 02:02
9F:→ comaniac:所以这个动作不会做两次,有错请指教m(_ _)m 12/30 02:03
10F:推 yesa315:page miss要先查page table才能得知实体位置 12/30 10:14







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Gossiping站内搜寻

TOP