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:a05:6638:388:: with SMTP id y8mr1126830jap.12.1553615421269; Tue, 26 Mar 2019 08:50:21 -0700 (PDT) X-Received: by 2002:a9d:7246:: with SMTP id a6mr2645407otk.246.1553615420975; Tue, 26 Mar 2019 08:50:20 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w126no211232ita.0!news-out.google.com!l81ni221itl.0!nntp.google.com!78no210631itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 26 Mar 2019 08:50:20 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.35; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.35 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2d8df013-ed41-4b9f-8b26-b719cd2989b6@googlegroups.com> Subject: Re: Competing Servers From: Anh Vo Injection-Date: Tue, 26 Mar 2019 15:50:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55972 Date: 2019-03-26T08:50:20-07:00 List-Id: On Tuesday, March 26, 2019 at 6:11:12 AM UTC-7, Dmitry A. Kazakov wrote: > On 2019-03-26 11:42, hnptz@yahoo.de wrote: >=20 > > I want to consider any problem that can be viewed as search, and for wh= ich only one solution is required, and the problem is suitable for a data p= arallel approach, provided that the computation time is large enough to mak= e the communication time negligible. > >=20 > > Assume we habe s servers and n tasks. I may start with one server and n= tasks. After a simple domain decomposition I want a task only search in it= s allocated sub-domain. When one of the tasks has found a solution: it shou= ld report it, all tasks should stop immediately and the initiating program = should terminate. > >=20 > > A variant from above would be to add a monitoring task, which after rec= eiving a success message by one of the tasks, should then report and stop a= ll tasks immediately and terminate. >=20 > Usual design is a pool of worker task. A worker task takes jobs from a=20 > queue controlled by a protected object. The task never terminates, just= =20 > waits for another job. Cancellation of a job is done again over a=20 > protected object. A worker task simply periodically checks if its=20 > current job were terminated. The check will propagate an exception, that= =20 > will roll the stack with all local objects back to the main body loop=20 > where the task will accept the next job. why is an exception involved in the checking?=20 Anh Vo