From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,dd6489250ee6bc95 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!news-fra1.dfn.de!news-lei1.dfn.de!news.uni-jena.de!not-for-mail From: Adrian Knoth Newsgroups: comp.lang.ada Subject: Re: Poor tasking performance Date: 19 Jun 2004 23:51:58 GMT Organization: loris.TV Message-ID: References: NNTP-Posting-Host: ppc201.mipool.uni-jena.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fsuj29.rz.uni-jena.de 1087689118 30118 141.35.13.101 (19 Jun 2004 23:51:58 GMT) X-Complaints-To: news@rz.uni-jena.de NNTP-Posting-Date: 19 Jun 2004 23:51:58 GMT User-Agent: slrn/0.9.8.0 (Linux) Xref: g2news1.google.com comp.lang.ada:1704 Date: 2004-06-19T23:51:58+00:00 List-Id: Robert I. Eachus 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