|
From: Jeremy F. <je...@go...> - 2004-01-17 01:02:48
|
On Fri, 2004-01-16 at 01:51, Doug Rabson wrote: > This happens automatically in the FreeBSD kernel. When a thread blocks > in the kernel, an upcall to the userland thread scheduler happens and it > switches to the next runnable thread. Ah, OK. That sounds like an interesting thing to virtualize when we move to a threading model in which we expose virtual kernel interfaces rather than just pthreads. > It was an interesting exercise putting together a pthread proxylwp > implementation but its certainly not the right solution for some > systems. For example on FreeBSD 4.x there is no decent support for > kernel threads and the userland threading library relies on intercepting > all the blocking syscalls and using poll(2) in the thread scheduler to > attempt to switch threads when they would block. Is that because FreeBSD 4.x doesn't have any kind of kernel-level shared-address-space thread thing? Is it that the poll trick works for looking at syscalls which block on FDs, but doesn't really help for other types of blocking syscall? How important is FreeBSD 4.x as a target? J |