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-7-bit X-Google-Thread: 103376,63360011f8addace X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-16 04:57:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!129.240.148.23!uio.no!newsfeed.song.fi!news.cc.tut.fi!news.helsinki.fi!not-for-mail From: aaro@iki.fi (Aaro Koskinen) Newsgroups: comp.lang.ada Subject: Re: gnat: time-slicing Date: 16 Jul 2002 14:57:42 +0300 Organization: University of Helsinki Message-ID: References: NNTP-Posting-Host: sirppi.helsinki.fi X-Trace: oravannahka.helsinki.fi 1026820664 8050 128.214.205.27 (16 Jul 2002 11:57:44 GMT) X-Complaints-To: usenet@news.helsinki.fi NNTP-Posting-Date: 16 Jul 2002 11:57:44 GMT X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: archiver1.google.com comp.lang.ada:27145 Date: 2002-07-16T11:57:44+00:00 List-Id: lutz@iks-jena.de (Lutz Donnerhacke) writes: > * Jan Prazak wrote: > >The tutorial mentions, that > > > >ab > > > >ab > > > >can be produced even on systems with only one CPU, depending on the > >compiler. > > First you need a OS able to perform a task switch while performing system IO. > Most multitasking OS do not do this. While performing a system call, this > call can not interrupted by normal tasking. It's also a question of I/O buffering. I'm not sure if GNAT libraries use libc for I/O in Linux, but if they do, then the default buffering mode for stdout is "line buffering", i.e. each line is written using a single system call. It is possible to turn I/O buffering off, which results in a system call for each character - and this would allow a task switch between each character. A. -- Aaro Koskinen E-mail: aaro@iki.fi "I'm the ocean, I'm the giant undertow." http://www.iki.fi/aaro