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,af960bc705aaf51b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-02 16:54:33 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Complexity of protected objects Date: 2 Mar 2002 16:54:33 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0203021654.223591d8@posting.google.com> References: <3C7A75F2.30503@worldnet.att.net> <3c7e7c60.8192226@news.cis.dfn.de> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015116873 25478 127.0.0.1 (3 Mar 2002 00:54:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Mar 2002 00:54:33 GMT Xref: archiver1.google.com comp.lang.ada:20704 Date: 2002-03-03T00:54:33+00:00 List-Id: nickroberts@ukf.net (Nick Roberts) wrote in message news:<3c7e7c60.8192226@news.cis.dfn.de>... > On Mon, 25 Feb 2002 17:35:45 GMT, Jim Rogers > It's perhaps a little sweeping to say "I/O is always > potentially blocking". There may be certain rare cases > where this is not so. But it will certainly > always be so for reading or writing files, in practice. Again this is wrong, and is based on the very common misunderstanding that the technical term "potentially blocking" corresponds to the OS/notion of the current task being blocked. It does not! The point is that *for a very particular kind of implementation approach*, you will want to make this correspondence, so in this environment (typically a low level implementation on a monoprocessor), you will want to make the correspondence, and the provision in the RM allows you to do so. But in more typical environments, e.g. working on top of an operating system, or real time executive, there is absolutely no requirement to restrict what can be done in protected subprograms, and in practice may implementations do not do so. > Consider, for example, virtual memory. Depending on the > peculiarities of the Ada implementation and the target > execution environment, it may be that the execution of a > protected subprogram could cause a virtual memory 'page > fault' at any point in its execution. Such page faults > will typically cause I/O activity to occur (to swap a > page in, swap a page out, allocate a page on secondary > storage, or whatever). But I/O is 'potentially blocking'. Now the full scale of the confusion hits. Of *COURSE* it is the case that a memory read is NOT potentially blocking in the RM sense, even if in practice in some operating systems it might cause a context switch. > Agreed. > > Tony Gair wrote: > >>(is this an oxymoron?). > > Well, I admire the shapeless solidity of the question. > Now there is a *true* oxymoron, very nice, quite poetic :-)