Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Can I lose pulses?: (3 Items)
   
Can I lose pulses?  
Hi all

Can I lose pulses sent by another process?

The documentation for MsgReceivePulse / MsgSendPulse states that an 8-bit count is kept in the kernel to count equal 
pulse messages. What happens if I send 1000 equal pulse messages to a process but I read them too slow with 
MsgReceivePulse? Do I lose pulse messages then?

Cheers,
Freddy
Re: Can I lose pulses?  
On Mon, Feb 25, 2008 at 10:09:29AM -0500, Freddy Martens wrote:
> Can I lose pulses sent by another process?

No you won't.

> The documentation for MsgReceivePulse / MsgSendPulse states that an 
> 8-bit count is kept in the kernel to count equal pulse messages. 
> What happens if I send 1000 equal pulse messages to a process but I 
> read them too slow with MsgReceivePulse? Do I lose pulse messages then?

The count is just to compress identical pulses to save on memory usage. If
the max is reached, another pulse entry is allocated and the process
repeats until max compression number is reached on that entry. If we
can't allocate a new pulse entry due to an out of memory condition, the
MsgSendPulse() call will fail with EAGAIN.

What we do have is a latency issue if the send queue for the channel
gets too long (e.g. too many unreceived pulses). Since the entries
in the send queue are inserted in priority order, we have to scan the
list for the right place to add the new entry. A long list means a
long scan. We hope to have that fixed in the 6.4 release.

-- 
Brian Stecher (bstecher@qnx.com)        QNX Software Systems
phone: +1 (613) 591-0931 (voice)        175 Terence Matthews Cr.
       +1 (613) 591-3579 (fax)          Kanata, Ontario, Canada K2M 1W8
Re: Can I lose pulses?  
Thanks for the explanation.