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 05:57:24 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!sdd.hp.com!usc.edu!attla2!ip.att.net!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: gnat: time-slicing X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1026824227 12.225.227.101 (Tue, 16 Jul 2002 12:57:07 GMT) NNTP-Posting-Date: Tue, 16 Jul 2002 12:57:07 GMT Organization: AT&T Broadband Date: Tue, 16 Jul 2002 12:57:07 GMT Xref: archiver1.google.com comp.lang.ada:27148 Date: 2002-07-16T12:57:07+00:00 List-Id: "Lutz Donnerhacke" wrote in message news:slrnaj7uc6.oq.lutz@taranis.iks-jena.de... > > 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. I would say that the exact opposite is true. Most multitasking OS do task switching while performing system IO. But I suppose it depends on what you mean by "performing system IO". I/O devices tend to be slow. Typically I/O requests are queued to a driver. The driver actually performs the I/O. A common technique is for serial drivers is for the I/O request to enter data into a ring buffer and trigger the driver to start transmitting. The driver sends the first block of characters from the ring buffer and then relinquishes control back to the scheduler (permitting tasks to run). The serial device generates an interrupt when the transmit buffer is empty triggering the driver to send the next block of characters from the ring buffer. This continues until the ring buffer is empty. Whether or not characters are interleaved when the program does a "Put_Line" depends on whether characters are added to the ring buffer one at a time or as a block. Whether or not you program continues executing after data is queued to I/O or when the I/O is complete depends on the OS and implementation of the driver. SteveD