作者qazwsxee (小尧)
看板Grad-ProbAsk
标题Re: [理工] [OS]-page frame的问题
时间Thu Nov 26 03:42:12 2009
※ 引述《cansister (cansister)》之铭言:
: Assume that we have a computer with a 3-address instruction for adding the
: contents of two addressed memory locations and depositing the sum in a third
: addressed memory location. In assembly form,the instruction looks like this:
: ADD A,B,C
: If the instruction occupies three words and if all addresses are direct(i.e.
: the addresses are part of the instruction itself),what is the minimum number
: of page frames that this instruction requires to be guaranteed of proper
: execution.Explian your answer. (83 台技管技所)
: 答案是5个frames
: 有人可以帮我解答一下吗?
(不是很确定~我觉得好像少给了什麽东西~)
硬要凑的话~感觉这题Memory配置~一frame是4byte
Add 占 3word => => => => => 3frames
取第一个的data (随便假设是在 甲frame) => 1frame
取第二个的data 最糟糕的情况下~(假设是在 乙frame) => + 1frame
(因为取第二个资料可能不是在同一个frame里取得) -----------------
5frames
再来是存到Memory里~我觉得不用另外找别的frame~(丙frame)
(从甲或乙挑空位~存进去即可~
或是取代掉原本第一或第二个位置的值~) 所以这里可以省
minimum number of page frames => 5
这个感觉像是 Overlay(叠层技术)
将那些先前已使用的Memory区域~但"此时不使用"的区域拿来存入
又或是Virtual Memory (虚拟记忆体)的最小配置法~
尽可能使程式所需配置的frame数~达到仍可以正常执行到完的minimum值
--
学长学长!那边有飙车族 学长学长!那边刚好像有女生 学长学长!那边有人红灯右转
砍人 被压上车 ψQSWEET
鸽 ◥ 鸽 ◥ 鸽 ◥ 鸽 ◥ 鸽 ◥他妈的◤ 鸽
◤◎ ◎ 喔~~ ◤︶ ︶ ◤◎ ◎ 喔~~ ◤︶ ︶ ◤◎ ◎ 拦下来呀!⊙ ⊙◥
◥ ◤ ◥ █◤ ◥ ◤ ◥ 3◤╯ξ
◥ ◤没王法了◥皿 ◤
◥ ◥◥ (哈欠)◤ ◥◤ ◥ ◥◥ (烟~) ◤ ◥ ◤ ̄ ◥ ◥◥是不是?!(
◥ ◤ ◤)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.39.204.106
1F:推 cansister:page frame的size没给真的条件不够,谢谢你的解答 11/26 10:03