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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab2ba9c5d12b0f12 X-Google-Attributes: gid103376,public From: cosc19z5@Bayou.UH.EDU (Spasmo) Subject: Re: Concurrency in Gnat 3.05? Date: 1996/07/19 Message-ID: <4smktd$phu@masala.cc.uh.edu>#1/1 X-Deja-AN: 168781037 references: <4sjqte$3mu@masala.cc.uh.edu> <19960718.082642.172@satcom.whit.org> organization: University of Houston newsgroups: comp.lang.ada Date: 1996-07-19T00:00:00+00:00 List-Id: Robert Dunn (red@satcom.whit.org) wrote: : In article <4sjqte$3mu@masala.cc.uh.edu>, : on 17 Jul 1996 22:53:34 GMT, : Spasmo writes: : >Hey all. : > : >Is Gnat 3.05 (for DOS) truly concurrent when executing tasks? I'm : >asking because I've written some tasking code (finally got it : >to link) and when I ran the code, the tasks didn't run : >concurrently at all. I'm running in a Win95 DOS box. One task : >runs to completion before the other task starts up. I've also : >tried some sample code including Feldman's Twotasks program : >and they exhibit the same behavior. Is there a way to get : >tasks to run concurrently, or would I have to look for a : >GNAT that's native to something like WinNT/95 that can : >handle multi-tasking? : > : > : Ok, here is how you answer that question. Go get yourself both a : phillips and a t-15 screwdriver. Now, remove the cover from your : Win95/DOS7.0 Box. Count the number of processors. If you counted : one, you are absolutely correct. Now, ask yourself, how many : operations can run on one processor at a time. If you answered one : again, you now have two points. ;> : Now, for the big question? Can one processor run two (or more) tasks : concurrently? If you answered no, you have just won the grand prize. : The question that now remains is, How do you make a single processor : seem as if it is doing more than one thing at a time. Did you say : time slicing? Well, that is correct. And what is time slicing : synonomyous (ok so I can't spell) with? OVERHEAD!!! Ok, Time slicing -- whatever :). Still, with Linux I could easily write C programs that used time slicing on my processor courtesy of fork(), so I had assumed that GNAT also did something similar with tasks. Somebody (I forgot the name) emailed me and did bring up the suggestion of modifying task priorities dynamically to pre-empt and thus achieve the effect of time slicing. : The logical conclusion therefore is to save the overhead by allowing : a task to run until a natural break (eg completion, accept, call, etc). : Yes, it would be nice to have true multi-tasking. Well others did manage to do it, so I had assumed that GNAT was the same. Still it's a shame not having tasks that time slice, I mean it doesn't really seem all that big a deal to have tasking when they don't appear to run concurrently. Entries into them and all are allright, but still without time slicing... : Sorry if this sounds harsh, it is designed to entertain. Of course, : I have yet to meet a programmer who didn't have a unique sence of humor. Np. Thanks for the response. -- Spasmo "Here's a present just for you When you open it, you'll be through" "Letter Bomb" by the Circle Jerks