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-Thread: 103376,e0e1d3b3f7c994b8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Robert Dewar's great article about the Strengths of Ada over other langauges in multiprocessing! Date: Fri, 28 Mar 2008 00:10:30 +0100 Message-ID: <87prtfzrtl.fsf@mid.deneb.enyo.de> References: <13t4b2kkjem20f3@corp.supernews.com> <89af8399-94fb-42b3-909d-edf3c98d32e5@n75g2000hsh.googlegroups.com> <87bq56peg1.fsf@mid.deneb.enyo.de> <87bq516uri.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: idssi.enyo.de 1206659430 2928 212.9.189.177 (27 Mar 2008 23:10:30 GMT) X-Complaints-To: Cancel-Lock: sha1:gboEcviHggblWI5oF8xizuwEqvc= Xref: g2news1.google.com comp.lang.ada:20608 Date: 2008-03-28T00:10:30+01:00 List-Id: * Ole-Hjalmar Kristensen: > If you mean that it may be difficult to optimize, I agree, but I > cannot agree that you need *more* than an entryless protected object > to implement a hash table, since it guarantees that each operation on > the object is indivisible. You need some kind of signaling construct. Suppose you put some access value as a value into the hash table. If there's no signaling (the case of an entryless protected object, it seems), a task that retrieves the value from the table cannot make any assumptions regarding the object the access value refers to, unless there is some other form of synchronization. > On the other hand, I cannot see any reason why Annex C just couldn't > say that intrinsic subprograms for compare-amd-swap and similar > machine operations shall be provided *if* they are available on a > platform. CAS alone is not sufficient, you also need some sort of barrier (both against compiler optimizations and reordering in the silicon).