Cancelling POSIX syscalls in Managarm - an asynchronous microkernel-based OS

Day 1 | 17:50 | 00:20 | UB4.136 | Geert Custers


Note: I'm reworking this at the moment, some things won't work.

The stream isn't available yet! Check back at 17:50.

One of the most idiosyncratic parts of POSIX compliance is signal support. On microkernels the implementation can prove to be quite difficult. One especially tricky part is the cancellation of POSIX syscalls when they are interrupted by signals, and the intricacies of EINTR side effects. Monolithic kernels inheritely have the bookkeeping required to implement this without extra overhead. In contrast, due to the generally distributed nature of microkernels, properly cancelling syscalls requires extra work. This is especially the case for Managarm, where (1) POSIX is implemented in a userspace server, (2) syscalls are asynchronous and (3) can involve multiple servers.

In this talk, we will explore the process of implementing syscall cancellation on Managarm. A brief overview of signal delivery is given, followed by a deep dive into the new lifetime of a Managarm POSIX request. Finally, we give a summary of the lessons learned while implementing cancellation in a fully asynchronous microkernel.