Hi,

I've recently been studying the scheduler and kernel thread implementation in 
GNU Mach.

I learned that GNU Mach currently does not support kernel preemption, and that 
this is closely related to its use of continuations. A continuation allows a 
blocked kernel thread to save where it should resume execution without keeping 
the entire kernel stack.

I then looked at Apple's XNU kernel to see how it handles this problem. XNU 
also uses continuations, but appears to use them more selectively. At the same 
time, XNU supports kernel preemption and keeps the kernel stack and execution 
context when necessary.

This makes me wonder whether GNU Mach necessarily has to choose between 
continuations and kernel preemption.

I think kernel preemption is important, especially for future scheduler 
improvements and possible migration of scheduler-related work from other 
systems. However, I would like to understand the trade-offs in the current Mach 
design before assuming that adding preemption is the right direction.

I would like to hear what people in the GNU Mach/Hurd community think
about this.

references:
- 
https://www.usenix.org/legacy/publications/library/proceedings/bsdcon02/full_papers/gerbarg/gerbarg_html/index.html

-- 
DonjuanPlatinum, Yifei Yao <[email protected]>
GPG: 1C9E EEE5 4C8E D5A8 3039  1C87 A9F6 8632 D259 40E6
满堂兮美人 忽独与余兮目成

Reply via email to