Giter Club home page Giter Club logo

Comments (7)

SKTT1Ryze avatar SKTT1Ryze commented on July 30, 2024 1

那如果硬件没有缓存一致性,多核运行 xv6 会有问题吧,你们运行下来有很奇怪的 bug 吗?如果没有的话,可能厂商实现了缓存一致性,没有在手册中提到。:)

目前为止我们没有遇到过因为缓存一致性导致的bug,但也不能保证在后面的使用中不会遇到,对于任何软件来说将来遇到的bug都是未知的。朋友如果后面遇到问题,也欢迎在此repo下发issue,我们会尽量抽出时间一起来解决问题。感谢朋友的理解和支持。: )

from xv6-k210.

retrhelo avatar retrhelo commented on July 30, 2024

对于多核来说是有内存一致性是必须实现的,在xv6-k210中主要通过fence指令来完成。可以参考spinlock.c中的代码和注释。

from xv6-k210.

BigBrotherJu avatar BigBrotherJu commented on July 30, 2024

我说的是cache coherence,比如两个核读取同一个全局变量,这个变量被放在两个核的两个 cache里,然后一个核改变这个变量的值,两个 cache 必须保证不起冲突。

from xv6-k210.

retrhelo avatar retrhelo commented on July 30, 2024

我认为注释里的“to ensure that all the stores in the critical section are visible to other CPUs”已经足够回答你的问题了。

from xv6-k210.

BigBrotherJu avatar BigBrotherJu commented on July 30, 2024

我说的是硬件上 k210 这个 soc 是否实现了 cache coherence,我翻了一下 k210 的手册,好像没有提到实现了。

from xv6-k210.

SKTT1Ryze avatar SKTT1Ryze commented on July 30, 2024

我说的是硬件上 k210 这个 soc 是否实现了 cache coherence,我翻了一下 k210 的手册,好像没有提到实现了。

这是一个开源的操作系统内核项目,处理器/硬件层面的缓存一致性一般来说会交给硬件厂商处理,实现细节的话朋友可以咨询下 k210 的制作商。感谢反馈。: )

from xv6-k210.

BigBrotherJu avatar BigBrotherJu commented on July 30, 2024

那如果硬件没有缓存一致性,多核运行 xv6 会有问题吧,你们运行下来有很奇怪的 bug 吗?如果没有的话,可能厂商实现了缓存一致性,没有在手册中提到。:)

from xv6-k210.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.