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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d1a2aff784715896 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!b2g2000yqi.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Start a Windows process and get its text output Date: Sun, 7 Feb 2010 12:35:17 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <22cd779c-b1bb-4501-abfe-7b35c2dd7a7b@b2g2000yqi.googlegroups.com> NNTP-Posting-Host: 86.66.190.226 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265574917 13149 127.0.0.1 (7 Feb 2010 20:35:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 7 Feb 2010 20:35:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b2g2000yqi.googlegroups.com; posting-host=86.66.190.226; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8957 Date: 2010-02-07T12:35:17-08:00 List-Id: On 7 f=E9v, 20:24, Hibou57 (Yannick Duch=EAne) wrote: > I was wondering about the cost of threads on Windows, as GNAT create > Ada task as Windows thread (I suppose its the same for Janus and > others, I hope to be honest). > [...] > > The sole words about it in the MS reference says : For any interested parties, I've found an answer which seems reasonable here : http://stackoverflow.com/questions/304752/how-to-estimate-the-thread-contex= t-switching-overhead Two interesting quotes are: > Oh, and I remember an application running on Windows CE 4.X, where > we also have four threads with intensive switching at times, and > never ran into performance issues. and > Output > Number of thread switches in about one second was 108406 > Over 100'000 is not too bad and that even though we have locking and > conditional waits. I'd guess without all this stuff at least twice > as many thread switches were possible a second. Threads does not cost so much after all (keep in mind this was on architecture with support for Windows, this is Windows specific).