From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.2uCIJahv+a4XEBqttj5Vkw.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: is there a version of unix written in Ada Date: Thu, 1 Oct 2020 19:37:01 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <00cd3aaa-d518-43a2-b321-58d6fae70aebo@googlegroups.com> <57eb7a65-51ea-4624-b9dc-9c4dda0fee59n@googlegroups.com> <5f70fd3b$0$13541$426a74cc@news.free.fr> <87wo0d3iac.fsf@nightsong.com> <87sgb02l7b.fsf@nightsong.com> <875z7vyy1u.fsf@nightsong.com> <87wo0bkns3.fsf@nightsong.com> NNTP-Posting-Host: 2uCIJahv+a4XEBqttj5Vkw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:60369 List-Id: On 01/10/2020 19:01, Niklas Holsti wrote: > On 2020-10-01 19:06, Dmitry A. Kazakov wrote: >> On 01/10/2020 17:38, Niklas Holsti wrote: >> >>> If the protected procedures belong to different protected objects, >>> yes it is legal. But not if they belong to the same object, as J-P >>> noted. >> >> But then you have a problem when two independently running protected >> procedures of *different* objects call a procedure of a third object. >> You must serialize these calls, and that is effectively blocking. > > > I don't know what you mean by "effectively", here, but yes, one of the > tasks must wait for the other task to complete the protected operation > on the third object. So what? It looks quite complicated to implement, e.g. checking barriers and doing locking when you are already done that. Now let's continue the example. What happens when the calling paths are: O1.P1 --> O3.P3 --> O2.Q O2.P2 --> O3.P3 --> O2.Q Let Q1.P1 blocks Q2.P2 on a attempt to enter O3.P3: O1.P1 --> O3.P3 O2.P2 --> blocked Then O3.P3 calls O2.Q: O1.P1 --> O3.P3 --> O2.Q | O2.P2 --> blocked V This will either re-enter O2 or deadlock. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de