From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B0966BBAF for ; Sat, 17 Jul 2010 20:34:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlQDAHeUQUzRVdY0kGdsb2JhbACfGFAIFQEBAQEJCQwHEQMfrneCEIUYLohUAQEDBYUgBIN7hFw X-IronPort-AV: E=Sophos;i="4.55,219,1278280800"; d="scan'208";a="54391964" Received: from mail-bw0-f52.google.com ([209.85.214.52]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Jul 2010 20:34:28 +0200 Received: by bwz14 with SMTP id 14so2167072bwz.39 for ; Sat, 17 Jul 2010 11:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:in-reply-to :mime-version:content-transfer-encoding:content-type:message-id:cc :x-mailer:from:subject:date:to; bh=5VYUqY4HFfZc2/IMeqqjNfDTV/pDsnOZhLSfncTmh40=; b=OL9wBmI6uQc6974v/mpw4+Ubhwvg9RcgYjYsPcr1ZB7gl9tACMghqN5aGs6v2sWBcP ysBqi9RC4JdUHSWfW5WXJmm+uCRMm1h2upEmefSlrf7cae1LJX3FgMTa+6BcVtFsjeZQ uOCMBCL1wFnwPZsGzQKYq4KMukgHiNwTDHq30= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; b=ZNZ5A2kinL7ft+rrIya0aInMmsnVHJX0U9t9PxfqrAj8rQulrdnShtcJ4W2faVwy+U thhiqwPg29OmCqvUQRCihXWgSGf5mDGGMObyetuGCE130CHCTfO0wgK9QJheu+Jj46lE dn1Xh+3H3FHIP5oxbtlyF7Ncdh9izPTTiA0pw= Received: by 10.204.51.77 with SMTP id c13mr2148462bkg.98.1279391667578; Sat, 17 Jul 2010 11:34:27 -0700 (PDT) Received: from [188.57.33.0] ([188.57.33.0]) by mx.google.com with ESMTPS id o20sm16969805bkw.15.2010.07.17.11.34.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 17 Jul 2010 11:34:26 -0700 (PDT) References: <87sk3mcaeq.fsf@frosties.localdomain> <87zkxsfvsg.fsf@frosties.localdomain> <87hbk0vzut.fsf@frosties.localdomain> In-Reply-To: <87hbk0vzut.fsf@frosties.localdomain> Mime-Version: 1.0 (iPhone Mail 8A293) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <942FD9F6-601C-4F02-83E8-84CD280A04FF@gmail.com> Cc: Rich Neswold , "caml-list@yquem.inria.fr" X-Mailer: iPhone Mail (8A293) From: Eray Ozkural Subject: Re: [Caml-list] Smart ways to implement worker threads Date: Sat, 17 Jul 2010 21:34:12 +0300 To: Goswin von Brederlow X-Spam: no; 0.00; eray:01 ozkural:01 abstraction:01 pointers:01 re-use:01 ocaml:01 trivial:01 algebra:01 topology:01 topology:01 cheers:01 eray:01 parallelism:01 parallelism:01 domination:98 When I'm implementing a parallel/dist algorithm I take care of making the co= mmunication code abstract enough to be re-used. Since abstraction in C deriv= ative languages (function pointers, templates etc) are a joke; one need not b= other with this as expected future code re-use isn't much. On the other hand in ocaml we have the best module system which can be used t= o create advanced parallel data structures and algorithms. A shared mem queu= e would be among the most trivial of such constructs. If we think of world d= omination we have to see the whole picture. Parallel programming is consider= ed difficult because common programmers don't understand enough algebra to s= ee that most problems could be solved by substituting an operator in a gener= ic parallel algorithm template. Or that optimal algorithms could be re-used c= ombinatorially (consider the relation of a mesh topology to a linear topolog= y with s/f routing) The fact is that an efficient parallel algorithm need not be long (theory su= ggests that fastest is shortest). It is our collective lack of creativity th= at usually makes it long. Cheers, Eray Ps: parallelism is not tangential here. I believe it is unnecessary to imple= ment asynchronous processes just for the sake of handling overlapping I/O an= d computation. That's like parallelism for high school programming class.=