Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2003 23:33:57 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: rtprio and kse
Message-ID:  <Pine.BSF.4.21.0306292332230.42233-100000@InterJet.elischer.org>
In-Reply-To: <20030629223142.W17881-100000@mail.chesapeake.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 29 Jun 2003, Jeff Roberson wrote:

> On Mon, 30 Jun 2003, Petri Helenius wrote:
> 
> > >
> > > The rtprio() call affects the KSEG in which the thread runs.
> > > So it is the KSEG that has the realtime priority, and all
> > > threads that run in that KSEG will be affected.  This doesn't
> > > affect other KSEGs, so if you are creating system scope
> > > threads (each has their own KSEG and KSE), they will only
> > > be affected if you call rtprio() from their threads.
> > >
> > So if I interpret this correctly, to achieve the "expected" result,
> > one should link with -lthr, not -lkse? Expected result being
> > priorities apply only to threads which call for it.
> >
> > Does -lthr have any (known) issues with spinlocks like linuxthreads has, where
> > a thread with rtprio going into a spinlock might monopolize the CPU
> > and the other thread never gets a quantum to actually release the lock?
> >
> 
> If you mean spinlock_t, no, there are no issues with that.  There is a
> race condition that sometimes leads to deadlocked threads if you use the
> pthread mutex.  I expect that to be tracked down and fixed soon.


Theoretically any process with rt priority can monopolise the CPU if it
spins, regardless of whether it's threaded or not..

Is not that what having RT-priority means?

> 
> Cheers,
> Jeff
> 
> _______________________________________________
> freebsd-threads@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0306292332230.42233-100000>