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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6f24e26ea2e03c4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b30g2000yqd.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Threadpool with priority version 1.1 ... Date: Fri, 26 Mar 2010 02:30:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7b059d0f-791b-4ac9-bf64-c50448ec99f7@b30g2000yqd.googlegroups.com> References: <21e6697e-fd7c-4c5e-93dc-8d894449b5e6@f8g2000yqn.googlegroups.com> <4ba9e189$0$6886$9b4e6d93@newsspool2.arcor-online.net> <1id5xnuz0x892$.1odbic5ppiv07.dlg@40tude.net> <4baa27f2$0$6770$9b4e6d93@newsspool3.arcor-online.net> <7794a413-34e9-4340-abcc-a6568246fc38@h18g2000yqo.googlegroups.com> <1rn39ttn5pon9$.11n683q5t6itu.dlg@40tude.net> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1269595823 2654 127.0.0.1 (26 Mar 2010 09:30:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 26 Mar 2010 09:30:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b30g2000yqd.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10749 Date: 2010-03-26T02:30:23-07:00 List-Id: On 26 Mar, 09:19, "Dmitry A. Kazakov" wrote: > BTW, if this approach worked for an application, it should also do for the > OS, It is true, obtaining resources up-front requires more careful analysis of the problem that is being solve and is not always possible. The difference between application and OS is in the amount of knowledge about what the software will do and applications tend to know more than OS in this aspect. That is why it is more realistic to have applications allocating their resources during initialization phase than to see that at the OS level. I'm not a big fan of programs that allocate and deallocate the same resource repeatedly - this is an obvious candidate for caching and object reuse, where the cost of allocation is amortized. Fortunately, it is not even necessary for a user code to do that - think about a caching memory allocator, there are analogies. And the language standard does not prevent implementations from reusing physical threads, if they are used as implementation foundations for tasks. -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4