X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: Interference between instances on MS-Windows Date: Thu, 5 Jul 2007 11:32:39 -0400 Message-ID: In-Reply-To: <20070705145916.GA27040@ednor> References: <20070705145916 DOT GA27040 AT ednor> From: "Bob McConnell" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l65FXSG8031147 > -----Original Message----- > From: cygwin-owner AT cygwin DOT com > [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Christopher Faylor > Sent: Thursday, July 05, 2007 10:59 AM > To: cygwin AT cygwin DOT com > Subject: Re: Interference between instances on MS-Windows > > On Thu, Jul 05, 2007 at 10:10:36AM -0400, Bob McConnell wrote: > >Good morning, > > > >I have a POS emulation program written in C. It uses two threads, two > >condition variables and a mutex. One thread receives from a > serial port, > >the other sends. The condition variables and mutex are used > to create a > >message queue between the two threads to pass received ACK/NAK to the > >sending thread with an adjustable timeout (using code from somebody's > >ex2.c I got via Google). Outgoing messages are read from a file and > >responses are written into a second file. Outgoing messages > average 54 > >bytes with 39 byte responses. > > > >This program will send 2000 transactions in about 12 minutes at 9600 > >bps. This is what I normally expect. However, if I open a second > >instance of bash, then run this program in both shells driving two > >serial ports, it takes 24 minutes for them both to send the same 2000 > >transactions. I expected them to complete in the same 12 > minutes. It is > >as if there is some resource limitation that only one > process can run at > >a time. The only external resource they share is the input file which > >they both open read-only. > > > >Is this a known issue? Is there any way to prevent the two instances > >from interfering with each other? > > You need to think about this as if someone was reporting a problem to > you. I suspect that if that was the case, a two paragraph overview of > the problem with suppositions about what the problem might be > would not > suffice. > > You can start here: http://cygwin.com/problems.html but please don't > just take this, as most people do, as a subtle hint that you need to > provide cygcheck output. Instead, take it as an opportunity to think > about what you are reporting and what kind of information a technical > person would want to see if they were going to help you with > a problem. > For instance, a test case showing the problem would be > useful. You also > might want to think about instrumenting your program to see where the > slowdowns are occuring. > > To answer as much of the question as I can: No, we don't > impose resource > limitations on threads or processes. > > cgf 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. Thank you, Bob McConnell -- 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/