delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/26/08:17:24

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <008901c0fe33$d5f75fc0$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Brian Genisio" <genisiob AT pilot DOT msu DOT edu>
Cc: <cygwin AT cygwin DOT com>
References: <200106251631 DOT f5PGV0H19106 AT pilot14 DOT cl DOT msu DOT edu> <4 DOT 3 DOT 1 DOT 0 DOT 20010626072021 DOT 0190eef0 AT pilot DOT msu DOT edu>
Subject: Re: setting thread prioirty
Date: Tue, 26 Jun 2001 21:33:34 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 26 Jun 2001 11:21:51.0131 (UTC) FILETIME=[3240EEB0:01C0FE32]

----- 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019