rtprio and kse

Daniel Eischen eischen at vigrid.com
Tue Jul 1 06:30:06 PDT 2003


On Tue, 1 Jul 2003, Petri Helenius wrote:
> > It is legitimate to want a single (or set) of threads to
> > have real-time priority and not the others.  Since the
> > priority is in the KSEG, this is possible to do without
> > fork()ing.
> > 
> > Dan Eischen
> > 
> So to summarize, in order to achieve rtprio for one of the ~dozen threads
> in the process, winthout affecting the rest of the threads in the same process,
> set PTHREAD_SCOPE_SYSTEM when creating the thread
> and ask for rtprio in the thread after it has started?

I don't understand.  Do you want all threads in the process
to be affected by rtprio()?  Or are you saying there are
more than 12 threads in the process, but you only want 
rtprio() to affect those 12 threads?

As I've said before, rtprio() affects the thread's calling
KSEG.  Threads created with scope system each get their own
KSEG.  Threads created with scope process all run in the
same KSEG.  Threads never migrate between KSEGs.  That's
all you need to know.  Do with it what you will.

-- 
Dan Eischen



More information about the freebsd-threads mailing list