Date: Mon, 07 Jul 2003 15:57:58 +0300 From: Petri Helenius <pete@he.iki.fi> To: freebsd-threads@freebsd.org Subject: thread scheduling priority Message-ID: <3F096E56.4010609@he.iki.fi>
next in thread | raw e-mail | index | archive | help
I have two threads on a SMP (2 CPU, HT disabled) box with world+kernel
from mid-June. (cvsupping to latest right now) and a process which
runs two threads with the following code snippet, more or less in a process
& maintenance (collecting statistics, doing housekeeping, etc.) fashion.
While
the main thread does it's stuff it competes for a mutex with the other
thread. However
I'm observing that the thread created in the snippet below has hard time
getting
scheduled while the main thread is running.
Am I missing something? No rtprio stuff here, contention scope is the
default.
{
struct sched_param param;
pthread_attr_t attributes;
pthread_attr_init (&attributes);
pthread_attr_getschedparam (&attributes,¶m);
param.sched_priority += 5;
pthread_attr_setschedparam (&attributes,¶m);
pthread_create (&smem_thread,&attributes,&live_poll_sharedmem,0);
}
Pete
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F096E56.4010609>
