IO Completion port Linux equivalent

user3861866

Windows OS, A threading model where ThreadPool associated with an IO Completion, ~releasing~ a thread each time an Async IO is completed, the ~released~ thread is then used to deal with the IO completion.

While linux select can be used for async IO it doesn't seem to support the IO Completion / ThreadPool logic.

Is there any Linux equivalent to the IO Completion / ThreadPool above threading model ?

Wyzard

I don't know of anything that does that directly, but you can combine a select() loop with a thread pool of your own to get similar behavior. When select() returns and you examine your fd_sets to see which file descriptors are ready, push each of those descriptors to a thread pool for processing. You'll still need a main thread to run the select() loop, independent of the thread pool for processing the I/O events.

Most of the complexity in this approach will be in how you keep track of which descriptors need to be included in the select() call at each iteration, and in the thread pool itself (since POSIX provides threads but not a standard thread pool API).

You might be interested in using a library like GLib, which provides a modular main loop that helps with polling on a varying set of file descriptors, as well as a thread pool implementation.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

IO Completion port Linux equivalent

From Dev

Business logic in IO completion Port

From Dev

IO Completion Ports (IOCP)

From Dev

Equivalent of SharedWorker Port in ServiceWorker?

From Dev

IO Completion Ports and socket send()

From Dev

IO Completion Ports and socket WSARecv()

From Dev

IO Completion Ports and OVERLAPPED management

From Dev

IO Completion Ports and socket send()

From Dev

IO Completion Ports and socket WSARecv()

From Dev

What is the equivalent of a Swift completion block in Python?

From Dev

Holding IO Port open

From Dev

"Un-associate" socket from completion port

From Dev

How to create multiple threads for the completion port?

From Dev

VPN equivalent to SSH port forwarding?

From Dev

Asynchronous action methods and IO completion ports

From Dev

How to reregister for IO Completion ports for a handle

From Dev

How does the operating system post io completion messages for async io

From Dev

How does the operating system post io completion messages for async io

From Dev

ASIO IO completion callbacks order vs the order of actual IO operations

From Dev

Equivalent for Linux's "screen"

From Dev

WSL equivalent for Linux

From Dev

Equivalent of dwAllocationGranularity in Linux?

From Dev

Process Monitor equivalent for Linux?

From Dev

Linux equivalent for Microsoft Visio?

From Dev

$(find -X) equivalent on linux

From Dev

SHGetKnownFolderPath equivalent API in Linux

From Dev

Linux equivalent of taskkill

From Dev

Equivalent of import libraries in Linux

From Dev

Linux equivalent for Microsoft Visio?