在计算机系统设计中,根据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: |
笔记:
- 默认情况下,计算机系统的内存结构是使用分层访问内存组织设计的,这是因为在这种类型的内存组织中,由于引用的位置而缩短了平均访问时间。
- 同时访问内存组织用于实现“直写式高速缓存” 。
- 在这两种类型的内存组织中,最后一个内存级别的命中率始终为1。