comp.lang.ada
 help / color / mirror / Atom feed
From: Adrian Knoth <adi@thur.de>
Subject: Re: Poor tasking performance
Date: 19 Jun 2004 23:51:58 GMT
Date: 2004-06-19T23:51:58+00:00	[thread overview]
Message-ID: <slrncd9kcu.rj9.adi@ppc201.mipool.uni-jena.de> (raw)
In-Reply-To: yZqdnc70OahGAkndRVn_iw@comcast.com

Robert I. Eachus <rieachus@comcast.net> wrote:

>> Is that normal? Only by adding one task which hangs in Get_Line
>> increases the load so much?
>> Environment is Linux 2.6.7 with Debian gcc-3.3 (unstable).
> First, let me say you are lucky to get working results with that 
> combination.

Ok, I can give gcc-cvs a try, let's see if it helps.

>   This is definitely an area where the underlying OS implementation of 
> reading from the console is going to account for most of the overhead.

I don't think the overhead is caused by Get_Line, but by tasks.

Get_Line can sleep until the OS wakes the thread up by a signal.
But I don't know if my runtime environment uses threads and
if they are wakeup-able ;)

> If you are using Get_Immediate in Text_IO, you could switch to line at a 
> time reading and see if that helps.  But I suspect that it won't--the OS 
> needs to poll the UART that buffers keyboard input at a certain rate to 
> avoid losing characters. 

Keyboard is interrupt driven.

I'll remove the Get_Line and see how much a serial program,
written as a task, will consume. If it's equal to the non-tasking
implementation I'll create a null-task to achieve some switching.


-- 
mail: adi@thur.de  	http://adi.thur.de	PGP: v2-key via keyserver

Natuerlich benutze ich Windows...$#��A NO CARRIER



  reply	other threads:[~2004-06-19 23:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-19  7:38 Poor tasking performance Adrian Knoth
2004-06-19 20:19 ` Robert I. Eachus
2004-06-19 23:51   ` Adrian Knoth [this message]
2004-06-19 23:58   ` Björn Persson
2004-06-20  5:28     ` Robert I. Eachus
2004-06-20  7:58       ` Adrian Knoth
2004-06-20  9:18       ` Björn Persson
2004-06-26 17:30         ` Robert I. Eachus
replies disabled

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