3
votes
2answers
880 views

Multithreaded Socket code to connect to 100 different machines

This is my socket.cpp #pragma hdrstop #include "MySocketClient.h" MySocketClient::MySocketClient() throw(SocketException){ WSAData data; InitializeCriticalSection(&sect_); ...
3
votes
2answers
316 views

Implementing a shared array cache without locking

Edited 3/27/2012 to explain selection of answer: After giving this some more thought, I have come around to William Morris' view (see accepted answer) that this is basically the wrong approach. I am ...
2
votes
1answer
138 views

Lock free MPMC Ring buffer implementation in C

I have written a lock free MPMC FIFO in C based on a ring buffer. It uses gcc's atomic built-ins to achieve thread safety. The queue is designed to return -1 if it's full on enqueue or empty on ...
2
votes
0answers
21 views

Fast popcount on Intel Xeon Phi

I'm implementing an ultra fast popcount on Intel Xeon® Phi®, as it's a performance hotspot of various bioinformatics software. I've implemented five pieces of codes, #if defined(__MIC__) #include ...
2
votes
0answers
513 views

mutex and condition variable implementation using futex

I have implemented mutex and contition variables using futex syscall. I believe that my implementation is correct, but would like it to be verified by some one else. If some of you could verify its ...
1
vote
1answer
2k views

Producer-consumer in C using pthread_barrier

We're preparing for an exam at the moment, and our lecturer has given us a sample problem to work on. I have it completed, but would like to know a) If it is actually doing what it's supposed to, and ...
1
vote
0answers
82 views

Memory/Threads leaks, developing simple HTTP-server with WinSock2 [closed]

I begin to develop my tool, which works with net at the TCP level, which will present simple functions of web-server. In testing my program I have got very bad mistakes: Memory leaks Creating ...