Any of those help Ideally independent 2 tasks running on unideal OS like Windows 2012 will run faster on 2 cores at 1.5GHz, than on 1 core at 3GHz due to elimination of thread context switching overhead. Unfortunately, there are very very few ideally independent tasks.
problem with multi thread and socket programming(multi connection)
Hope that helps I would just like to kindly point out that your question is a little too general for Stack Overflow but I will do my best to try and answer you. So the short answer is that this cannot be done. You cannot have multiple sockets bound on the same port for one given host. Concretely, this means that you won't be able to bind multiple sockets to, say, 127.0.0.1:7777, only one socket can be bound per port.
Win32: Calculate Thread CPU Utilization in a Multi-Core / Multi-Processor System
To fix this issue At the C/C++ level you do not have access to which CPU core will run which thread. Just use the C++ 11 standard threads and let the OS scheduler to decide which thread runs where. That said, Linux has the taskset tool to check thread affinity and there 's also sched_setaffinity() function.