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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:2cc8:: with SMTP id i191-v6mr10486818iti.35.1523074602460; Fri, 06 Apr 2018 21:16:42 -0700 (PDT) X-Received: by 2002:a9d:554b:: with SMTP id h11-v6mr1604482oti.12.1523074602374; Fri, 06 Apr 2018 21:16:42 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!k65-v6no328764ita.0!news-out.google.com!u64-v6ni456itb.0!nntp.google.com!k65-v6no328757ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 6 Apr 2018 21:16:42 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.147.43.80; posting-account=lzqe5AoAAADHhp_gregSufVhvwu22fBS NNTP-Posting-Host: 68.147.43.80 References: <1aa8f536-250d-4bef-9392-4d936f916e5f@googlegroups.com> <9377f941-31d0-4260-818a-8e189aac8c19@googlegroups.com> <10e74e0c-119a-4d86-8a12-c05101f744f1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <89d99c15-aea2-4821-b6dd-f6cc60bba0a2@googlegroups.com> Subject: Re: Large number of tasks slows down my program (using debian) - any fix? From: Brad Moore Injection-Date: Sat, 07 Apr 2018 04:16:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:51372 Date: 2018-04-06T21:16:42-07:00 List-Id: On Thursday, April 5, 2018 at 9:09:49 AM UTC-6, Dmitry A. Kazakov wrote: > That is unfair! (:-)) With protected object and same token you can=20 > "pass" it at all available cores without blocking, at once, which IMO=20 > defeats the idea of the benchmark, but shows how cool are Ada's tasking= =20 > primitives. I see your point, :-) but I still feel its fair in that there are 503 "pseu= do threads" that each serially get access to the protected object in a ring= fashion, each "pseudo"-thread in fact stores its reference inside the prot= ected object when it "has" the baton. At time same time, there are also 503= real OS threads driving the thing, where the semantics of a protected obje= ct is that there is a queue for an entry, and the queue is serviced seriall= y, even if the implementation of the queue happens to be efficient. Since t= here are only 503 threads and 50_000_000 iterations, each OS thread (Ada ta= sk) has to requeue on the protected entry many many times. Brad