comp.lang.ada
 help / color / mirror / Atom feed
From: geert@fozzie.sun3.iaf.nl (Geert Bosch)
Subject: Re: Ada Task priorities
Date: 1997/01/27
Date: 1997-01-27T00:00:00+00:00	[thread overview]
Message-ID: <5chu9v$kll@fozzie.sun3.iaf.nl> (raw)
In-Reply-To: polley-ya023180002601971518570001@news.netins.net


Jonathan Polley (polley@netins.net) wrote:
   I have found that (with the Rational compiler at least) if a higher
   priority task is waiting on an OS event (i.e., waiting on data from a TCP
   socket), it will starve all lower priority tasks.  Because of this, I make
   sure that all my I/O tasks (for TCP, UDP, and X) are the lowest priority
   tasks in the system. 

This is really bad behaviour! You want the call for waiting on data from
a socket to be a blocking call, so it doesn't consume any CPU time at all.
Setting the I/O tasks to high priority is very desirable, because then as 
soon as an I/O task is unblocked it will get the CPU to read the port
and for example store it in a buffer for later processing. This way
response to external events is very quick, which is desirable for 
interactive use such as X Windows.

Since I/O tasks typically require the CPU only for very short periods
of time before coming blocked again, setting these tasks to high priority
shouldn't have adverse effects on the rest of the system.

The way you are implementing I/O now makes it impossible to interact
with the system while the CPU is used by calculations etc. This looks
like unwanted behavior to me.

Regards,
   Geert
-- 
E-Mail: geert@sun3.iaf.nl    
      ``I think there is a world market for maybe five computers.''
        Thomas Watson,  chairman of IBM, 1943





  reply	other threads:[~1997-01-27  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-26  0:00 Ada Task priorities Kevin Radke
1997-01-26  0:00 ` Robert Dewar
1997-01-28  0:00   ` Robert I. Eachus
1997-01-26  0:00 ` Jonathan Polley
1997-01-27  0:00   ` Geert Bosch [this message]
1997-01-27  0:00 ` Geert Bosch
1997-01-27  0:00 ` Michael F Brenner
1997-01-28  0:00   ` Kevin Radke
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox