📄 第四节.htm
字号:
<td width="13%" height="16"></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
6</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[6]</font></td>
<td width="13%" height="16"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="13%" height="16"></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
</table>
</center>
</div>
<p><font color="#000000" size="4"> b.组相联映象法</font>
</p>
<p><font color="#000000" size="4">
cache四块分为二组,每组二块.</font>
</p>
<p><font color="#000000" size="4">
每一块到cache的相对组数是: 0 MOD 2 =0 4 MOD 2
=0</font>
</p>
<p><font color="#000000" size="4">
6 MOD 2 =0 8 MOD 2 =0</font>
</p>
<p><font color="#000000" size="4"> 所以一次命中,四次失效.</font>
</p>
<div align="center">
<center>
<table border="1" width="74%" height="67" bordercolordark="#CC9966" bordercolorlight="#FFCC66">
<tr>
<td width="9%" height="38" rowspan="2"><font color="#000000" size="4">Address
of memory block accessed</font></td>
<td width="6%" height="38" rowspan="2"><font color="#000000" size="4">Hit
or miss</font></td>
<td width="50%" height="45" colspan="4"><font color="#000000" size="4">contents
of cache blocks after reference</font></td>
</tr>
<tr>
<td width="12%" height="29"><font color="#000000" size="4">set 0</font></td>
<td width="13%" height="29"><font color="#000000" size="4">set 0</font></td>
<td width="12%" height="29"><font color="#000000" size="4">set 1</font></td>
<td width="13%" height="29"><font color="#000000" size="4">set 1</font></td>
</tr>
<tr>
<td width="9%" height="22"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="22"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="1"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="1"></td>
<td width="12%" height="1"></td>
<td width="13%" height="1"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
8</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Hit</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
6</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[6]</font></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"></td>
<td width="13%" height="16"></td>
</tr>
</table>
</center>
</div>
<p><font color="#000000" size="4">
c.全相联映象法</font>
</p>
<p><font color="#000000" size="4">
一共二次命中,三次失效.</font>
</p>
<div align="center">
<center>
<table border="1" width="74%" height="67" bordercolordark="#CC9966" bordercolorlight="#FFCC66">
<tr>
<td width="9%" height="38" rowspan="2"><font color="#000000" size="4">Address
of memory block accessed</font></td>
<td width="6%" height="38" rowspan="2"><font color="#000000" size="4">Hit
or miss</font></td>
<td width="50%" height="45" colspan="4"><font color="#000000" size="4">contents
of cache blocks after reference</font></td>
</tr>
<tr>
<td width="12%" height="29"><font color="#000000" size="4">set 0</font></td>
<td width="13%" height="29"><font color="#000000" size="4">set 0</font></td>
<td width="12%" height="29"><font color="#000000" size="4">set 1</font></td>
<td width="13%" height="29"><font color="#000000" size="4">set 1</font></td>
</tr>
<tr>
<td width="9%" height="22"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="22"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="1"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="1"><font color="#000000" size="4"> </font></td>
<td width="12%" height="1"><font color="#000000" size="4"> </font></td>
<td width="13%" height="1"><font color="#000000" size="4"> </font></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
8</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"><font color="#000000" size="4"> </font></td>
<td width="13%" height="16"><font color="#000000" size="4"> </font></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Hit</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"><font color="#000000" size="4"> </font></td>
<td width="13%" height="16"><font color="#000000" size="4"> </font></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
6</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Miss</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[6]</font></td>
<td width="13%" height="16"><font color="#000000" size="4"> </font></td>
</tr>
<tr>
<td width="9%" height="16"><font color="#000000" size="4">
0</font></td>
<td width="6%" height="16"><font color="#000000" size="4">Hit</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[0]</font></td>
<td width="13%" height="16"><font color="#000000" size="4">Memory[8]</font></td>
<td width="12%" height="16"><font color="#000000" size="4">Memory[6]</font></td>
<td width="13%" height="16"><font color="#000000" size="4"> </font></td>
</tr>
</table>
</center>
</div>
<p><font color="#000000" size="4">
可见全相联映象方法效果最好. <br>
</font>
</p>
<p>
<font color="#000000">
<font size="4">
<br>
</font>
<br>
<br>
<br>
<br>
<br>
<br>
</font>
</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -