X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Interference between instances on MS-Windows Date: Thu, 5 Jul 2007 10:10:36 -0400 Message-ID: From: "Bob McConnell" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 l65EBMpn018246 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? CYGWIN_NT-5.0 1.5.24(0.156/4/2) 2007-01-31 10:57 Win2K SP4 P4 3.0GHz, 1 GB RAM Thank you, Bob McConnell Principal Communications Programmer The CBORD Group, Inc. 61 Brown Road Ithaca NY, 14850 Phone 607 257-2410 FAX 607 257-1902 Email rvm AT cbord DOT com Web www.cbord.com -- 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/