1:1 Threading implementation.
Igor Sysoev
is at rambler-co.ru
Wed Mar 26 10:45:22 PST 2003
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/
More information about the freebsd-arch
mailing list