Re: Many COMM Serial Ports Open & Idle causes high System Process time
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Thu, 31 Mar 2005 23:03:10 -0800
"rmsterling" <rmsterling@xxxxxxxxx> wrote:
>
>Subject : Many COMM Serial Ports Open & Idle causes high System Process time
>...
>Serial COMM Ports (on a special USB multi-serial adapter which connects to
>PC via one USB cable)
>
>I open many communication serial ports at the beginning of my program.
>I do not reads or writes from the port. The COMM port exists but nothing is
>plugged in to it to ensure nothing is received from the COMM port.
>
>Whilst in this state the application obviously consumes 0-1% average CPU
>time with little or no related Kernel activity.
>
>However on the "System" process an average of 10% CPU time with the majority
>being kernel related activity.
USB is not an interrupt-driven bus. It is master/slave, and the host is
always the master. In order for the system to find out if the device has
anything to read, it has to send read requests continuously to each
endpoint. Until one of them responds, the IRP/URB won't bubble back up to
user mode, but there certainly is kernel overhead in the act of monitoring.
>Can anyone answer why there is so much system (kernel) activity when...
> The Port is open
> No activity on the port is generated activity by the application
> Nothing is plugged in to the port
The fact that nothing is plugged in to the COM port is irrelevant. The USB
driver cannot tell that, so it has to keep those I/O packets flowing.
See, a DDK MVP *can* be of use in a VC++ newsgroup.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc
.
- Prev by Date: Newbie: Simple program crashes on close
- Next by Date: Re: Combined usage of exception handling
- Previous by thread: Newbie: Simple program crashes on close
- Next by thread: Is it a bad techinique?
- Index(es):
Relevant Pages
|
Loading