Hi everyone,
I'm curious to the exact scheduling policy of POSIX threads in relation to
mutexes and conditions. If there are two threads (a & b), both with the
following code:
while (1) {
pthread_mutex_lock(mutex);
...
pthread_mutex_unlock(mutex);
}
What is the scheduli
Bernard van Gastel writes:
> What is the scheduling policy of the different thread libraries?
Threads are scheduled by the kernel, not by the library. Look at
sys/kern/sched_umtx.c and sys/kern/sched_{4bsd,ule}.c.
DES
--
Dag-Erling Smørgrav - d...@des.no
___
In the last episode (Jan 19), Bernard van Gastel said:
> I'm curious to the exact scheduling policy of POSIX threads in relation to
> mutexes and conditions. If there are two threads (a & b), both with the
> following code:
>
> while (1) {
> pthread_mutex_lock(mutex);
> ...
> pt
But the descheduling of threads if the mutex is not available is done by the
library. And especially the order of rescheduling of the threads (thats what
I'm interested in). Or am I missing something in the sys/kern/sched files (btw
I don't have the umtx file).
Regards,
Bernard
Op 19 j
In real world application such a proposed queue would work almost always, but
I'm trying to exclude all starvation situations primarily (speed is less
relevant). And although such a worker can execute it work and be scheduled
fairly, the addition of the work to the queue can result in starvation
On Thu, 21 Jan 2010, Bernard van Gastel wrote:
But the descheduling of threads if the mutex is not available is done
by the library. And especially the order of rescheduling of the
threads (thats what I'm interested in). Or am I missing something in
the sys/kern/sched files (btw I don't have t
Bernard van Gastel writes:
> But the descheduling of threads if the mutex is not available is done
> by the library. And especially the order of rescheduling of the
> threads (thats what I'm interested in). Or am I missing something in
> the sys/kern/sched files (btw I don't have the umtx file).
On Thu, 21 Jan 2010, Bernard van Gastel wrote:
In real world application such a proposed queue would work almost
always, but I'm trying to exclude all starvation situations primarily
(speed is less relevant). And although such a worker can execute it
work and be scheduled fairly, the addition
On Thursday 21 January 2010 11:27:23 Bernard van Gastel wrote:
> In real world application such a proposed queue would work almost always,
> but I'm trying to exclude all starvation situations primarily (speed is
> less relevant). And although such a worker can execute it work and be
> scheduled
Bernard van Gastel wrote:
But the descheduling of threads if the mutex is not available is done by the
library. And especially the order of rescheduling of the threads (thats what
I'm interested in). Or am I missing something in the sys/kern/sched files (btw
I don't have the umtx file).
Regar
10 matches
Mail list logo