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 10.182.130.162 with SMTP id of2mr835351obb.33.1418892424980; Thu, 18 Dec 2014 00:47:04 -0800 (PST) X-Received: by 10.140.25.242 with SMTP id 105mr10401qgt.19.1418892424951; Thu, 18 Dec 2014 00:47:04 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h15no24778024igd.0!news-out.google.com!r1ni69qat.1!nntp.google.com!s7no8771486qap.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 18 Dec 2014 00:47:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.30.132.97; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 185.30.132.97 References: <455d0987-734a-4505-bb39-37bfd1a2cc6b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0b33cce3-7b1b-47e0-9d6d-48fafcfb025c@googlegroups.com> Subject: =?ISO-8859-1?Q?Re=3A_GNAT=A0and_Tasklets?= From: vincent.diemunsch@gmail.com Injection-Date: Thu, 18 Dec 2014 08:47:04 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:24101 Date: 2014-12-18T00:47:04-08:00 List-Id: Le mercredi 17 d=E9cembre 2014 22:08:33 UTC+1, Brad Moore a =E9crit=A0: >> I could understand that a Library level task (i.e. a task declared immed= iately=20 >> in a package that is at lirary level) be mapped to an OS thread, but a= =20 >> simple local task should definetly not.=20 > > Why not?=20 Because a thread is, in my understanding of an OS, an abstraction of a CPU.= And technicaly a kernel thread is a scarce ressource, because it needs to store= data inside the kernel, with a strong overhead because creating it, destroying i= t and even using it is done through expensive kernel - process transitions. A local task is a simple way to express parallelism in a part of an alogrit= hm inside a subrogram. It must be lightweight otherwise it is useless. And = it is exactly the problem we encountered, for current compiler creates heav= y kernel threads even for little tasks. Remember it was also my motivation = at the beginning of this post : to have a Library to do parallelism. So I have a good response now, for I think you have very well solved the pr= oblem with your Library, that I will try to use ! But it remains the question of the Ada language : it is not acceptable that= Ada degenerates slowly into a low level langage, where we need to replace a tas= k abstraction by=20 - a procedure - an access to that procedure - the instanciation of a spawning mecanism, taking the access to subprogram= m. This is exactly the job of a compiler ! So the next step is to integrate the good job you made in your Library in a= compiler... Kind regards, Vincent =20 and given good solutions for