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.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URI_HEX autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ddc02527645a844 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-31 15:15:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: tasking with GNAT 3.14p on windows Date: Mon, 31 Mar 2003 18:09:37 -0500 Organization: Michigan State University Message-ID: References: <3e87f4e2$1@epflnews.epfl.ch> <7vu1djubmk.fsf@vlinux.voxelvision.no> NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:35839 Date: 2003-03-31T18:09:37-05:00 List-Id: "Jano" wrote in message news:MPG.18f2dca67f9d5139896cd@News.CIS.DFN.DE... > Chad R. Meiners dice... > > > > "Jano" wrote in message > > news:MPG.18f2a01651aa20aa9896cb@News.CIS.DFN.DE... > > > trying to know the behavior with blocking I/O. In XP with -gnatP, you > > > get indefinite wait for user input, but if more than 10 seconds has > > > passed when you hit enter, you get also the "aborted" print. > > > > > > Is that expected behavior? Gnat docs say that polling implements calls > > > in each loop iteration / function call. Should I assume that if you > > > haven't loops / calls, abort will never work properly? > > > > It seems like reasonable behavior. System calls are not guaranteed to be > > abortable. > > That's what I wanted to know. I'm not a RM lawyer, so I don't knew that. > I'll be glad if someone can point the relevant sections in the RM about > code not abortable. > > > > I feel nevertheless very unsafe using anything else than trivial tasks > > > in NT. The priority system of NT messes things greatly out of > > > real_time_class, and that, for example, is never pointed in Gnat docs > > > (in my knowledge). > > > > NT is not a real time operating system. > > I know that. > > > The task support on NT is not > > broken; your understanding of Ada tasking is broken. ;) > > ;) As I've said, I'm not an Ada RM expert, but I think I'm not totally > clueless about how a multitasking program should work, if the compiler > adheres to annex D, as Gnat says. OTOH, as far as I know, Gnat isn't > validated under win32. > > > It is very easy to > > write system dependent tasking code. I have written several robust > > multi-tasking windows applications. You just have to understand how to > > implement your os calls so that they play well with tasking. > > I've also written multitasking window apps, and I don't like the tricks > you must do to workaround some NT limitations, and that's about I was > asking. One of the points of using Ada is to remain as much as possible > in the system independent side of the world ;-) > > > > Also, the faulty ceiling_priority model for protected objects is > > > mentioned or not? I can't remember... > > > > If you don't know then why are spreading FUD about tasking on NT? > > Well, I was thinking out loud to see if someone shares my concerns. I > like to be enlightened by others greater experience. I have nothing > against Gnat nor intend to spread FUD. > > The following points I believe are true, and not mentioned in Gnat NT > documentation. I will not point the RM sections which I think aren't > satisfied, but every time I try to read the D annex in detail, I feel a > bit disturbed about Gnat saying it complies with it, hence my asking: > > * You must set your app in realtime priority class because NT priorities > below that class aren't static. > > * You may have two tasks with different priorities specified via pragma > priority. The two will map to the same NT priority (because there are > less than in system.priority'range), and your tasks will preempt each > other even having specified a higher priority for one of them. > > * The ceiling priority of protected objects is simply ignored. The > caller will not inherit the ceiling priority. I was taught that in > university, and my tests seem to confirm that. To be fair, I have a > vague remembrance of reading about it, but can remember if it was in > some papers from my professor or in Gnat docs. > > These are valid concerns, I think, and not FUD. The former two I'm > nearly sure are not in NT docs, and I think are very important for a > newcomer which wants to experiment with tasking and has windows. You can > blame me for trying to do realtime tasking in NT, but that's not my > point. These things I've discovered not in gnat docs, and that was my > original comment. > > Please feel free to correct me. > > Kind regards, > > -- > ------------------------- > Jano > 402450.at.cepsz.unizar.es > -------------------------