delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/05/10:11:33

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: Interference between instances on MS-Windows
Date: Thu, 5 Jul 2007 10:10:36 -0400
Message-ID: <FF8482A96323694490C194BABEAC24A0012364D9@Email.cbord.com>
From: "Bob McConnell" <rvm AT CBORD DOT com>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019