rcore-os / rcore-os/rCore-Tutorial-v3
第9章之后easy-fs仍然使用自旋锁而非关中断锁
Open
@wyfcyx is already working on this.
Since Feb 9, 2023.
bug
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 560
- PR merge metrics
- No merged PRs in 30d
Description
问题:第9章开始,内核在执行系统调用的时候打开中断,因此内核自身的同步设施需要从单核独占访问UPSafeCell换成关中断版本的UPIntrFreeCell。然而,文件系统模块easy-fs仍然使用自旋锁spin::Mutex,就有可能在持有锁进行文件系统操作的时候,进入中断并再次尝试获取文件系统的锁而造成死锁。
触发方法:比如这种并发进行多个fork+exec的情况。
解决方案:将UPIntrFreeCell分离到一个独立的crate中,使得内核本体和easy-fs均依赖它。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.