comp.lang.ada
 help / color / mirror / Atom feed
From: Anh Vo <anhvofrcaus@gmail.com>
Subject: Re: Competing Servers
Date: Tue, 26 Mar 2019 08:50:20 -0700 (PDT)
Date: 2019-03-26T08:50:20-07:00	[thread overview]
Message-ID: <2d8df013-ed41-4b9f-8b26-b719cd2989b6@googlegroups.com> (raw)
In-Reply-To: <q7d8dd$nv7$1@gioia.aioe.org>

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:
> 
> > I want to consider any problem that can be viewed as search, and for which only one solution is required, and the problem is suitable for a data parallel approach, provided that the computation time is large enough to make the communication time negligible.
> > 
> > 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 its allocated sub-domain. When one of the tasks has found a solution: it should report it, all tasks should stop immediately and the initiating program should terminate.
> > 
> > A variant from above would be to add a monitoring task, which after receiving a success message by one of the tasks, should then report and stop all tasks immediately and terminate.
> 
> Usual design is a pool of worker task. A worker task takes jobs from a 
> queue controlled by a protected object. The task never terminates, just 
> waits for another job. Cancellation of a job is done again over a 
> protected object. A worker task simply periodically checks if its 
> current job were terminated. The check will propagate an exception, that 
> will roll the stack with all local objects back to the main body loop 
> where the task will accept the next job.

why is an exception involved in the checking? 

Anh Vo


  reply	other threads:[~2019-03-26 15:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 10:42 Competing Servers hnptz
2019-03-26 13:11 ` Dmitry A. Kazakov
2019-03-26 15:50   ` Anh Vo [this message]
2019-03-26 17:03     ` Dmitry A. Kazakov
2019-04-01 19:21       ` Anh Vo
2019-04-01 19:58         ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox