cache
cache高速缓冲存储器一种特殊的存储器子系统,其中复制了频繁使用的数据以利于快速访问。存储器的高速缓冲存储器存储了频繁访问的RAM位置的内容及这些数据项的存储地址。当处理器引用存储器中的某地址时,高速缓冲存储器便检查是否存有该地址。如果存有该地址,则将数据返回处理器;如果没有保存该地址,则进行常规的存储器访问。因为高速缓冲存储器总是比主RAM存储器速度快,所以当RAM的访问速度低于微处理器的速度时,常使用高速缓冲存储器。





1、直接映像
是指每个主存页只能复制到某一固定的Cache页中。直接映像的规律是:将主存的2048页分为128组,每组有16页,分别与Cache的16页直接对应,即主存的第0页、第16页、第32页……只能映像到Cache的第0页。
2、全相联映像
全相联映像是指主存的每一页可以映像可以映像到Cache的任意一页。
3、组相联映像
组相联映像是直接映像与全相联映像的折中方案,它将Cache分为若干组,如8组;每组若干页,如2页;同时将主存分为若干组,如255组;每组内的页数与Cache的组数相同,如8页。组相联映像的规律是主存中的各页与Cache的组号有固定的映像关系,但可自由映像到对应的Cache组中的任意一页。即组间采用直接映像,而组内的页为全相联映像。





