Date: Sat, 23 Nov 1996 20:24:49 +0100 (MET) From: Martin Cracauer <cracauer@cons.org> To: freebsd-smp@freebsd.org Subject: Thread issues Message-ID: <199611231924.UAA08217@knight.cons.org>
next in thread | raw e-mail | index | archive | help
It's maybe a little too early to discuss it, but what are the plans for MP-capable threads? The Linux folks decided to dump their previous thread packages (4, if I remember right) and have just a clone(2)-based kernel thread package. They claim they reduced the minimum syscall time to an extend that pure kernel-threads are the best choice. clone() is very similar to FreeBSD's rfork(). I looked into their pthread layer above clone() package at ftp://alpha.gnu.ai.mit.edu/gnu/linuxthreads-960922.tar.gz and it looks the thing can be easily used (or reimplemented) to have a pthread package on top of rfork(). The main Linux dependency in this package is the interfaces to the Linux sheduler. I'd like to ask a few questions and hope some people people with more experience than mine could drop me a note: Do you think that Linus' view could be applicable to FreeBSD, too? That it would be sufficient to have one pure thread library using rfork() only? How much overhead would be involved? As I understand, the biggest issue will be context switch time when a thread hits a locked mutex. Anyone has some numbers handy how often this happens in a typical pthread application, expressed in lock hits/CPU instruction? Having only kernel threads on FreeBSD causes some additional problems, i.e., there's no userlevel code left to handle Posix signal delivering specification. To solve this problem, Linux is about to extend their clone() call with an option to share the pid between mother and child. In addition, some new pid-like variable for each kernel 'execution context' (to name it) will be introduced. Do you think the FreeBSD community would be open to such a rather radical change? Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer cracauer@wavehh.hanse.de (batched, preferred for large mails) Tel.: (daytime) +4940 41478712 (sometimes hacker's daytime :-) Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611231924.UAA08217>