Is there a way to use multi-core networks when working with network connections?

When we do network programming, whether you use multiprocessor, multithreaded or select / poll (epoll), there is only one process / thread to deal with accepting connections on the same port. And if you want to use multi-core processors, you need to create workflows / threads. But what about communication with network connections? Is there a way to use multi-core when working with network connections?

I found some materials. And it seems hard to complete. The core will implicitly tremble in three directions. And in the smp structure, the operating system will be divided into several critical zones. One and the same critical zone cannot work simultaneously on several cores.

+3
source share
2 answers

All modern PC operating systems already have their own network stacks, highly optimized for multi-core processors. For example, the packet processing code that moves data to and from the network interface card will be independent of the TCP / IP stack code, so a hardware interrupt can complete without breaking the TCP code.

. , , , , , . , . , . , Windows -, . Linux epoll.

+1

, (.. ). ( , / ), / .

, , , . , . , , .

0

All Articles