作者assassin88 (2010)
看板Grad-ProbAsk
标题[理工] [计组]-几个疑问
时间Mon Jan 18 08:35:08 2010
一、如果题目给 cache line size is XX bytes,是代表一个 block size 大小,还是
一整列的 cache 大小?
二、sra $s0, $t0, 4, if $t0 = 0x87654321
^^^
请问式 shift right 然後全部补1吗?
另外,有一题是这样的:
1. sll $t2, $t0, 4 // $t0 = 0x11111111
andi $t2, $t2, -1
2. srl $t2, $t0, 3 // $t0 = 0x11111111
andi $t2, $t2, 0xFFFF
做出来好奇怪,可否讲述一下做法。
三、A page fault occurs when the page table entry cannot be found in the
translation lookaside buffer.
答案是给 T,但我觉得是 F。请问该怎麽解释,这应该只是 TLB miss 不是吗?
应该是再看 page 是否有再 memory 内,才是 page fault 吧?
感谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.57.78.219
1F:→ magic704226:sra:shift right arithmetic,右移补sign bit,这里是1 01/18 10:04
2F:→ magic704226:srl,sll 为shift right(left) logical,移完补0 01/18 10:04
3F:→ assassin88:是没错,我式卡再 andi $t2, $t2, -1 这个 01/18 10:16
4F:→ assassin88:假设是第一题好了→00010001000100010001000100010000 01/18 10:17
5F:→ assassin88:andi $t2,$t2,-1 该怎放?补到32bit还是放右半部就好? 01/18 10:18