Overlapped Serial Ports and buffering
- From: "Joe" <joewoodbury@xxxxxxxxx>
- Date: 29 Dec 2006 11:29:03 -0800
I'm writing a serial port class. My team lead said that when using
simple, non-overlapped I/O on Windows 2000, they found that doing 1 and
2 byte reads caused a significant peak in CPU utilization. (All our
packets are read with a 1 byte, then either a 1 or 2 byte read then a
lengthy read.) Do reduce this, they double buffered the reads.
I converted the class to use basic OVERLAPPED I/O. I wrote 2 versions
of the class; one uses straight reads, the other reads the data in
chunks and queues it up for the reader.
When testing both, I found that the process utilization was the same on
average. Does anyone know if OVERLAPPED I/O is already buffering serial
port reads? (Do serial port reads even make a ring transition at the
driver level? Did this possibly change between Windows 2000 and Windows
XP?)
.
- Follow-Ups:
- Re: Overlapped Serial Ports and buffering
- From: Pavel A.
- Re: Overlapped Serial Ports and buffering
- From: Alexander Grigoriev
- Re: Overlapped Serial Ports and buffering
- Prev by Date: Re: getting user-mode Socket handle from TDI_CONNECT
- Next by Date: Re: getting user-mode Socket handle from TDI_CONNECT
- Previous by thread: getting user-mode Socket handle from TDI_CONNECT
- Next by thread: Re: Overlapped Serial Ports and buffering
- Index(es):
Relevant Pages
|