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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: RFC: Prototype for a user threading library in Ada Date: Sun, 3 Jul 2016 00:14:28 +0300 Organization: Tidorum Ltd Message-ID: References: <58b78af5-28d8-4029-8804-598b2b63013c@googlegroups.com> <1e32c714-34cf-4828-81fc-6b7fd77e4532@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net OleReKp8YVukTj1thHRpSgNS4Y3kEe6dL2AJgjDjEm9qe6rA0C Cancel-Lock: sha1:fUTSxBlWy83dc98u+AxVXJFhYXg= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:31008 Date: 2016-07-03T00:14:28+03:00 List-Id: On 16-07-02 14:13 , Hadrien Grasland wrote: > Le samedi 2 juillet 2016 06:36:09 UTC+2, Randy Brukardt a écrit : >> But I don't think that really helps the race and deadlock issues >> that are the real problem with programming with Ada tasks. I'd like >> to find some help there, too. > > Here's my view of this: people are heavily overusing shared mutable > data in multitasking programs, and that is the source of too many > data races, which in turn people attempt to fix with locks, thusly > killing their performance and introducing deadlocks. > > In many cases, better performance and correctness can be easily > achieved by moving to asynchronous tasking runtimes, where the > runtime internally manages an event-based dependency graph of tasks > that can be processed condurrently, and data is kept task-private but > can be moved around between tasks. Do you have real experience of such "asynchronous tasking runtimes"? In Ada or in other languages? It seems to me that it would be difficult for such a run-time system to support the full Ada tasking features, such as conditional entry calls. Ada tasks have more control over their own execution than such a run-time system would allow. Moreover, in present Ada it seems to me that the only way to move task-private data from one task to another is to send a copy of the data from one task to the other. Copying data is often poison for performance. Perhaps a new, restricted tasking profile would be needed, analogous to the Ravenscar profile but aimed not at real-time systems but at parallel computation in this event-based style. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .