Date: Thu, 15 Jan 2009 14:19:09 -0800 From: Pramod Srinivasan <pramod@juniper.net> To: Daniel Eischen <deischen@freebsd.org> Cc: freebsd-threads@freebsd.org Subject: Re: Priority scheduling in 6.x Message-ID: <C594F65D.5677C%pramod@juniper.net> In-Reply-To: <Pine.GSO.4.64.0901142220230.27761@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Daniel Thanks for your response. On 1/14/09 7:25 PM, "Daniel Eischen" <deischen@freebsd.org> wrote: > On Wed, 14 Jan 2009, Pramod Srinivasan wrote: > >> Hi, >> >> I have 3 threads low, medium and high , and the scheduling policy is set to >> SCHED_FIFO. The priority of the threads are at 28,29,30 respectively. Looks >> like on FreeBSD 6.x, the priority of the threads are not honored while >> scheduling the threads, but the same test on FreeBSD 7.x seems to work fine. >> Are there known issues with the priority scheduling in FreeBSD 6.x or am I >> doing something wrong? (I am using libthr) > > Are you using libpthread or libthr on 6.3? I am using libthr on 6.1, but had similar issues on 6.2 as well. > > If you are using libthr, then you need to be running with > superuser privileges for SCHED_FIFO to work. I'm not sure > if this works correctly at all in 6.3. I am running the program with super user privileges on 6.1, tried this on 6.2 as well. Priority scheduling using libthr does not work, unless I am missing something very basic?. The same program works fine on 7.1, any ideas? > > If you are using libpthread, then it will work if the > threads are PTHREAD_SCOPE_PROCESS, but will not work > if they are PTHREAD_SCOPE_SYSTEM. You do not need > superuser privileges for SCHED_FIFO with libpthread > and process scope threads. I don't believe the kernel > has ever worked properly for libpthread (kse) SCHED_FIFO > system scope threads. I tried libpthread with PTHREAD_SCOPE_PROCESS, it was better, I see that the priority is honored. Thanks for the pointer. Thanks, Pramod
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C594F65D.5677C%pramod>