Interference between instances on MS-Windows
Bob McConnell
rvm@CBORD.com
Fri Jul 6 13:42:00 GMT 2007
> -----Original Message-----
> From: cygwin-owner@cygwin.com
> [mailto:cygwin-owner@cygwin.com] On Behalf Of Dave Korn
> Sent: Thursday, July 05, 2007 11:48 AM
> To: cygwin@cygwin.com
> Subject: RE: Interference between instances on MS-Windows
>
> On 05 July 2007 16:33, Bob McConnell wrote:
>
>
> > If I read this right, you are saying there are no reported
> conflicts in
> > pthread resources between multiple processes. That is all I
> wanted to
> > know. I don't like to waste time diagnosing known problems
> and then be
> > told much later that there is an easy workaround.
> >
> > I wasn't asking anyone to debug either my code or Cygwin. All I was
> > asking is if there are any known threading issues in this
> situation. I
> > have no idea how you implemented pthreads, nor do I care.
> Just knowing
> > that this may be covering new ground is adequate.
>
> Well yeh, but there might be /unknown/ problems in the
> pthreads code, which
> we'd love to fix if we knew they were there.
Silly me, it looks like the sample code I found from a Google search
will do nicely as a test case.
From my own tests, I found that if I eliminate the message queue and
simply sleep more than enough time to get the ACK from the host, two
instances would run in the same time as a single instance. When I use
the queue, two instances take twice as long. Sometime this morning, the
light bulb came on. I added an elapsed time calculation to the example I
copied the queue from and increased the iteration count by an order of
magnitude to make it run long enough to make a difference. A single
instance will complete in 18 seconds. Two instances take 36 seconds.
(Actually, one falls somewhere in between, but the other always takes
36.)
I have attached that code with the timers.
Compile command: gcc -o ex2 ex2b.c -Wall<Enter>
System:
CYGWIN_NT-5.0 1.5.24(0.156/4/2) 2007-01-31 10:57
Win2K SP4
P4 3.0GHz, 1 GB RAM
Any suggestions would be appreciated.
Bob McConnell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex2b.c
Type: application/octet-stream
Size: 2963 bytes
Desc: ex2b.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070706/4cdcaa1f/attachment.obj>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list