Mail Archives: cygwin/2001/06/26/08:17:24
----- Original Message -----
From: "Brian Genisio" <genisiob AT pilot DOT msu DOT edu>
To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
Sent: Wednesday, June 27, 2001 12:26 AM
Subject: Re: setting thread prioirty
>
> >
> > > I have tried setting the attribute to priority 0 with the
> > > pthread_attr_setschedparam. Unfortunately, this does not work for
me.
> >The two
> > > threads compete for processor, slowing down the entire system.
> >
> >This should work :}. All my testcases seemed to run ok. Can you
provide
> >a testcase showing the problem?.
> >If your problem is simple contention - that the pri 0 thread gets
less
> >cpu than the -20 thread, then that is expected. If there are locking
and
> >reosurce issues occuring I need a test case to demonstrate the
problem,
> >and then I'll look into it.
>
> It is quite difficult to show a test case... Very large, internal
> application... And synchronization is not an issue, because they do
not
> require it... but what I find, is that if both threads are at high
> priority, they work so hard, that the rest of the system bogs down.
So I
> wanted my most important thread, the parent to have a higher priority,
but
> keep the spawned thread to the normal priority. The above did not
work,
> but the following did the trick for me... :
> SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
>
Which is essentially what we call when the thread priority is set to
sched_get_priority_max(). So there must be a bug of some sort. If I get
the time (ha!) to create a test case I'll look into this. However,
testcases _really_ make it simpler to track down - you know the
circumstances your app is running under, and I don't, so recreating your
bug symptoms is much harder for me than it is for you.
I've cc'd this back to the list for posterity.
Rob
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -