Date: Wed, 26 Mar 2003 13:45:02 +0300 (MSK) From: Igor Sysoev <is@rambler-co.ru> To: Jeff Roberson <jroberson@chesapeake.net> Cc: Julian Elischer <julian@elischer.org> Subject: Re: 1:1 Threading implementation. Message-ID: <Pine.BSF.4.21.0303261335410.5080-100000@is> In-Reply-To: <20030326031245.O64602-100000@mail.chesapeake.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 26 Mar 2003, Jeff Roberson wrote: > > > What this means is that for every pthread in an application there is one > > > KSE and thread. There is also only one ksegroup per proc in this model. > > > Since the kernel knows about all threads it handles all scheduling > > > decisions and all signal delivery. I have followed the POSIX spec while > > > implementing the signal code. I would really appreciate review from > > > anyone who is intimately familiar with signals and threads. Included in > > > this is an implementation of sigwait(), sigtimedwait(), and sigwaitinfo(). > > > > Wouldn't it have been easier to have one KSEGRP+KSE+thread per user > > thread? Having one ksegrp and many KSEs requires changing the kernel > > code where doing it the other way you could do it without making any > > changes. > > I don't understand? There are relatively minor changes to the kernel to > support this. Since nice is a property of the process, it makes sense > that there is only one ksegrp per process. I'm starting to think that the > ksegrp was overkill in general. As I understand all KSEs in one KSEGRP have the same priority. If you need several thread priority inside a process you need several KSEGRPs so Julian's suggestion is better. As far as I know KSEGRP has two orthogonal features: 1) it limits number of KSEs to number of CPU; 2) and it set KSE priority. Igor Sysoev http://sysoev.ru/en/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0303261335410.5080-100000>