Arceos-monolithic / Starry

An experimental modular OS written in Rust.
http://rcore-os.cn/arceos/
Apache License 2.0
12 stars 15 forks source link

futex 设计没有考虑 private futex 问题 #22

Open Azure-stars opened 8 months ago

Azure-stars commented 8 months ago

linux 的 futex 包括了 private futex 和 shared futex 两种,即进程间是否共享,当前 starry 的 futex 设计仅是 shared futex,在 private futex 下可能出现访问地址无效的错误。

YXalix commented 6 months ago

目前用一个全局的BTreeMap存储的. 当两个进程都存在futex wait时, 每次进入syscall处理前, 都会调用check_dead_wait, 这时private futex的情况下就乱套了;

能否一起讨论下如何重构futex, 并实现它