Re: Interlocked Singly Linked Lists (for Ben or anyone else).




"Pops" <dude@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23tndYNsJIHA.4712@xxxxxxxxxxxxxxxxxxxxxxx
Ben (C++ MVP) recommended using the Interlocked Singly Linked Lists API:

http://msdn2.microsoft.com/en-us/library/ms686962.aspx

as a more efficient synchronization method for a recent thread discussion
in regards to a FIFO queue design.

If Ben is reading or if anyone else is familiar with this API, I have a
few questions:

First, based on what I see, this is for LIFO designs (i.e., stacks)? Not
FIFO. Am I missing something? I only see Push/Pop functions, no
head/tail functions.

We were discussing a multiple writer, single consumer queue. For this the
writers each use the InterlockedPushEntrySList function, while the consumer
uses the InterlockedFlushSList function to retrieve the entire queue as an
atomic operation. The consumer is then responsible for iterating through
the list of items retrieved in FIFO order.


Seconds, can you tell how it works with IPC, can it work for IPC?

Because there is no name assigned, the SList cannot establish an IPC
channel. However, because the caller has control over the placement of all
data structures involved, it should be possible to use with shared memory.
It would be highly desirable in such cases to obtain the same virtual
address space in each of the processes. If this is not possible, then you
probably can't use the Win32 API implementation, though the underlying
algorithm will still work (using relative addresses / indices instead of
pointers).


Thanks

--
HLS





.



Relevant Pages

  • Re: Block-ram FIFO in Xilinx
    ... In a BlockRAM implementation, this does not make any sense, for width ... Remember, excessive depth or width has no impact, as long as the FIFO ... reliable generation of the Full and Empty flags at high clock rates. ... I would like to use the queue with different sizes of the data bus. ...
    (comp.arch.fpga)
  • Re: Block-ram FIFO in Xilinx
    ... Also Din and Dout have the same width. ... reliable generation of the Full and Empty flags at high clock rates. ... I have generated a block-ram based FIFO queue (2 independent clocks, ... I would like to use the queue with different sizes of the data bus. ...
    (comp.arch.fpga)
  • Re: FIFO lost on Critical Section
    ... CriticalSection object I need a way to find another way to achieve that ... These events must be handled in the order coming off of the iocp queue. ... is part of each session object. ... waiting in FIFO order with this scenario. ...
    (microsoft.public.win32.programmer.kernel)
  • Asynchromous interprocess message queue (possible with fifo ?)
    ... I want to program some queue facilities for independent processes ... read end and a write end, numerous reader processes and writer ... My initial idea is to use fifo, since it's first in first out just ...
    (comp.unix.programmer)

Loading