We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题:第9章开始,内核在执行系统调用的时候打开中断,因此内核自身的同步设施需要从单核独占访问UPSafeCell换成关中断版本的UPIntrFreeCell。然而,文件系统模块easy-fs仍然使用自旋锁spin::Mutex,就有可能在持有锁进行文件系统操作的时候,进入中断并再次尝试获取文件系统的锁而造成死锁。 触发方法:比如这种并发进行多个fork+exec的情况。 解决方案:将UPIntrFreeCell分离到一个独立的crate中,使得内核本体和easy-fs均依赖它。
UPSafeCell
UPIntrFreeCell
easy-fs
spin::Mutex
The text was updated successfully, but these errors were encountered:
一些相关思考
Sorry, something went wrong.
wyfcyx
When branches are created from issues, their pull requests are automatically linked.
问题:第9章开始,内核在执行系统调用的时候打开中断,因此内核自身的同步设施需要从单核独占访问
UPSafeCell
换成关中断版本的UPIntrFreeCell
。然而,文件系统模块easy-fs
仍然使用自旋锁spin::Mutex
,就有可能在持有锁进行文件系统操作的时候,进入中断并再次尝试获取文件系统的锁而造成死锁。触发方法:比如这种并发进行多个fork+exec的情况。
解决方案:将
UPIntrFreeCell
分离到一个独立的crate中,使得内核本体和easy-fs
均依赖它。The text was updated successfully, but these errors were encountered: