推 cansister:page frame的size沒給真的條件不夠,謝謝你的解答 11/26 10:03
※ 引述《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