Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.programming.threads Subject: Re: A book for learning threads? Date: Sat, 03 Nov 2012 14:52:53 +1300 Lines: 22 Message-ID: References: <508dcd4d$0$7581$a8266bb1@newsreader.readnews.com> <5c142f28-f08c-4569-ab8e-e17257e6afd0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net iE7epGJMuVuryThltgQO9QlZTEAv1/uGkCjjiaeeENgGgQni3CoyuTMu248N93a8AE Cancel-Lock: sha1:nyv6Bep/gMbSi/tgxlOdW8/zpEY= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:12.0) Gecko/20120423 Thunderbird/12.0 In-Reply-To: <5c142f28-f08c-4569-ab8e-e17257e6afd0@googlegroups.com> Xref: csiph.com comp.programming.threads:1218 On 10/30/12 19:49, Robert Miles wrote: > On Monday, October 29, 2012 11:35:14 AM UTC-5, Lucas Levrel wrote: >> >> If it already uses Pthreads and compiles on these platforms, where's the >> worry? Just stick with the Pthread implementation of the threads concept. > Please trim your lines and tidy up the mess google makes of your replies! > There's no desire to have it run only on platforms that can run for a month or more without any interruptions. Adding checkpoints so that it can resume with less computer time lost due to any interruptions REQUIRES understanding threads so that I can suspend all threads except the main thread when writing checkpoints or restoring from them. I don't yet know if it also requires telling all the other threads to place information specific to those threads where the main thread can find it and include it in the checkpoint.. Applications like BOINC typically dish out units of work to client machines and these in turn pass them on to worker threads. In this case, it makes sense for the unit of work to be scaled to be a) useful and b) small enough so not too much is wasted if the machine dies during processing. Saving state part way through a work unit probably isn't worth while. Make your "checkpoints" the completion of a work unit. -- Ian Collins