Re: Member variable locking (Critical Section)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Chris Thomasson" <cristom@xxxxxxxxxxx> wrote in message news:zqCdnUaZ09tF2mnbnZ2dnUVZ_gmdnZ2d@xxxxxxxxxxxxxx
"Kürþat" <xx@xxxxxx> wrote in message news:%230NOLY3%23HHA.1188@xxxxxxxxxxxxxxxxxxxxxxx
[...]
Is there any better solution?

It depends on the way your handling the state that represents a socket connection and/or the "internal" server state which it may interact with. For instance, you can use exotic/high-performance synchronization method that can allow a plurality of threads to read through a shared list of connections while other threads are concurrently issuing mutations.
[...]

Reader threads can access the shared list of connections without using _any_ interlocked rmw or memory barrier instructions... Multi-processor, especially NUMA, even ccNUMA architectures, do NOT take kindly to being forced to execute those type of operations. It can flood the system with costly coherency traffic. Think of the traffic generated by using software and/or hardware based transactional memory schemes:

http://groups.google.com/group/comp.arch/browse_frm/thread/91cb3fbfa2eb362a


Ouch!

.



Relevant Pages

  • Re: sockets
    ... start application, and establish socket connection. ... restart application, ... the connections, that your application connects and disconnects from. ... think that pranks are a revolution. ...
    (comp.os.linux.networking)
  • sockets
    ... start application, and establish socket connection. ... quit application, without closing connections ... restart application, and continue using old connections? ...
    (comp.lang.c)
  • sockets
    ... start application, and establish socket connection. ... quit application, without closing connections ... restart application, and continue using old connections? ...
    (comp.os.linux.networking)
  • Re: BB tip
    ... confusion because the diagram referred to shows what appear to be two ... connections both marked 6 when one of them should be 5. ... socket connection numbers do you connect to? ... Peter Parry. ...
    (uk.people.silversurfers)