Skip to content

关于面试题总结"JMM(Java 内存模型)详解"一文的"从 CPU 缓存模型"小节图片一些个人个人不严谨的地方 #1848

Closed
@shark-ctrl

Description

guide哥绘制的CPU Cache 示意图如图所示:
image

参考网上文章,我认为CPU Cache应该分为3级:

  1. L1 cache为CPU私有,相较于其他两种缓存更加接近CPU,访问速度差不多2-4个时钟周期。
  2. L2 cache为CPU私有,访问速度差不多10-20个时钟周期。
  3. L3 Cache,所有物理核共享,是最慢的一级,访问速度差不多20-60个时钟周期。

由上所述,我建议图片应该改为下面这个样子

image

详情可参阅:

  1. https://zhuanlan.zhihu.com/p/370057417
  2. 《深入理解高并发编程》 6.1.2 章节CPU多级缓存架构原理
    image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugContent error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions