We present the first spin-free, kernel-lock-free mutex that cooperates with user-mode schedulers and is formally proven FIFO-fair and linearizable using CSP/FDR. Our fairness oracle and stability-based proof method are reusable across coroutine runtime designs. We designed the claim/release protocol for a process-oriented language -- ProcessJ -- to manage the race for claiming shared inter-process communication channels. Internally, we use a lock-free queue to park waiting processes for gaining access to a shared object, such as exclusive access to a shared channel to read from or write to. The queue ensures control and fairness for processes wishing to access a shared resource, as the protocol handles claim requests in the order they are inserted into the queue. We produce CSP models of our protocol and a mutex specification, demonstrating with FDR that our protocol behaves as a locking mutex.
翻译:我们提出了首个无自旋、无内核锁的互斥锁,该锁与用户模式调度器协作,并使用CSP/FDR形式化验证了其FIFO公平性与线性一致性。我们的公平性预言机及基于稳定性的证明方法可复用于各类协程运行时设计。该声明/释放协议专为面向进程语言ProcessJ设计,用于管理共享进程间通信通道的竞争访问。协议内部采用无锁队列来挂起等待访问共享对象(例如对共享通道进行独占读写)的进程。该队列通过按请求入队顺序处理声明请求,确保了对共享资源访问的控制权与公平性。我们构建了协议的CSP模型及互斥锁规约,并通过FDR验证了协议行为符合锁定式互斥锁的规范。