Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
shark-ctrl opened this issue Oct 23, 2022 · 3 comments
Labels
bug Content error

Comments

@shark-ctrl
Copy link
Contributor

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
@Snailclimb
Copy link
Owner

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

感谢,我这块画的确实不准确,会尽快抽时间完善。

@Snailclimb
Copy link
Owner

Snailclimb commented Oct 23, 2022

已修正。
image

@Snailclimb Snailclimb added the bug Content error label Oct 23, 2022
@kindear
Copy link

kindear commented Sep 26, 2023

good good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Content error
Projects
None yet
Development

No branches or pull requests

3 participants