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: a07f3367d7,8060bed478dfa9cd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.89.74 with SMTP id bm10mr5182818pab.19.1356837703145; Sat, 29 Dec 2012 19:21:43 -0800 (PST) Path: 6ni71717pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!backlog1.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Ada 2012 automatic concurrency? Date: Wed, 26 Dec 2012 17:02:26 -0500 Organization: The Wasteland Message-ID: References: NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2455 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: 2012-12-26T17:02:26-05:00 List-Id: In article , charleshixsn@earthlink.net wrote: > In the RM I read (page 209): > NOTES > 1 Concurrent task execution may be implemented on multicomputers, > multiprocessors, or with interleaved execution on a single physical > processor. On the other hand, whenever an implementation can > determine that the required semantic effects can be achieved when > parts of the execution of a given task are performed by different > physical processors acting in parallel, it may choose to perform them > in this way. > > ---------------- > Does this imply that if I use protected types, that the code will > automatically be run concurrently on a multiprocessor system, or > might automatically be run concurrently? Perhaps, to the extent possible, but Ada 95 Rationale, Section 9.1 Protected Types suggests that the approach was chosen, in part, to "enable the implementation of a synchronization mechanism that scales smoothly from a single processor to a multiprocessor." Similar language appeared in the Ada 83 LRM, Section 9: Tasks, and it has remained unchanged since Ada 95, Section 9: Tasks and Synchronization. > If so, does Gnat do this? I don't know what it does currently, but I recall an older version targeting Mac OS 9: absent preemptive multi-tasking, the implementation used an available FSU threads library. Protected types proved ideal for synchronizing access to the platform's single-threaded GUI library. -- John B. Matthews trashgod at gmail dot com