在计算机系统设计中,内存组织主要根据 CPU 尝试访问不同级别内存的方式分为两种主要类型。
这两种类型包括同步存取存储器组织和分层存取存储器组织。让我们从下表中了解两者之间的区别:
同时和分层存取存储器组织之间的区别:
Simultaneous Access Memory Organisation | Hierarchical Access Memory Organisation | In this organisation, CPU is directly connected to all the levels of Memory. | In this organisation, CPU is always directly connected to L1 i.e. Level-1 Memory only. |
---|---|
CPU accesses the data from all levels of Memory simultaneously. | CPU always accesses the data from Level-1 Memory. |
For any “miss” encountered in L1 memory, CPU can directly access data from higher memory levels (i.e. L2, L3, …..Ln). |
For any “miss” encountered in L1 memory, CPU cannot directly access data from higher memory levels(i.e. L2, L3, …..Ln). First the desired data will be transferred from higher memory levels to L1 memory. Only then it can be accessed by the CPU. |
If H1 and H2 are the Hit Ratios and T1 and T2 are the access time of L1 and L2 memory levels respectively then the Average Memory Access Time can be calculated as: |
If H1 and H2 are the Hit Ratios and T1 and T2 are the access time of L1 and L2 memory levels respectively then the Average Memory Access Time can be calculated as: |
笔记:
- 默认情况下,计算机系统的内存结构设计为分层访问内存组织。这是因为在这种类型的内存组织中,由于引用的局部性,平均访问时间减少了。
- 同时访问内存组织用于实现Write Through Cache 。
- 在两种类型的内存组织中,最后一个内存级别的命中率始终为 1。