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,ce6f6f23c4e880ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-24 21:19:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D17EF7D.40F88B17@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Multitasking theory question References: <3d123f34.0@news.unibw-muenchen.de> <3D128BA9.8090707@telepath.com> <3D16B14B.2A5D8261@attbi.com> <3D173788.8758A005@san.rr.com> <3D17E1E2.AED28873@san.rr.com> <5VRR8.145$7G4.15087@news.xtra.co.nz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 25 Jun 2002 04:19:44 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1024978784 66.75.151.160 (Mon, 24 Jun 2002 21:19:44 PDT) NNTP-Posting-Date: Mon, 24 Jun 2002 21:19:44 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:26686 Date: 2002-06-25T04:19:44+00:00 List-Id: AG wrote: > Really? If I remember correctly, even the 3.something DOS could print > while it waited for the key-press. Depends on the system call, yes. There were definitely "read a key" calls that didn't return until a key had been pressed. There were some that did. The ones that did aren't the ones I'm talking about, naturally. > > If the question is "where does the OS enter into it if I do all my > > scheduling myself", the answer is "when you call the OS with one thread > and > > the OS prevents all the other threads from running." > > OK, I'll have to agree with that - if you really have an OS that can prevent > you > from executing arbitrary code regardless of permissions/access rightts etc > etc > that you have - then "no can do" I guess - the thing is simply broken. In > fact, > it's just not functional. Err, well, no. I think you're still missing the point. Say you're trying to write (say) a web server. The only I/O the OS supports is blocking I/O. There's no way to say "I have three sockets open, wait for whichever one is readable first." The only way to make this work is either rewrite the blocking device drivers yourself, or have threads that don't run "properly". There doesn't need to be a deadlock, but you don't want one dropped connection to take 5 minutes to time out before you service the next visitor either. > Will a car-engine control program written under DOS on x86 machine qualify? Dunno. Were you calling anyone else's code? Or did you write all the device drivers yourself? Of course if you don't use any blocking calls in the OS then you can write your own scheduler. Is it me, or do many of these discussions degenerate into "well, in spite of the fact that what you're trying to say is obvious, here's one possible way to read your words such that you'd be mistaken in a small number of special cases"? If there are OS services you rely on that might possibly take an unacceptably long time to return to the control of the user program, no amount of user-level coding in the run-time system is going to let you schedule another thread to run during that time. That just seems obvious (almost tautological) to me, but it's possible I'm mistaken. -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.