Skip to main content

Timeline for How is async implemented natively?

Current License: CC BY-SA 4.0

8 events
when toggle format what by license comment
Sep 8, 2024 at 20:55 comment added candied_orange Might be worth explaining how a context switch works. Which is how an OS suspends a process even if it only has one core. Even if that process doesn’t understand how to suspend itself.
Sep 8, 2024 at 1:42 comment added Basilevs To be fair every sycall is done in a thread. And OS needs something to wake up, when the call receives the signal. So we can't say that threads are irrelevant for this model. Also long polling like this is arguably not asynchronous. A better example could be signal handling.
Sep 7, 2024 at 20:46 comment added codefast Got it. Thank you for your answer. I appreciate your time.
Sep 7, 2024 at 20:39 history edited freakish CC BY-SA 4.0
added 76 characters in body
Sep 7, 2024 at 20:38 comment added freakish @codefast I've already explained how epoll syscalls are widely used. By pretty much every async runtime over linux. Are you asking how epoll (or any other async mechanism) is implemented in the kernel? Nothing in your question suggests that. Yet I still explained very briefly how kernel receives interrupts from network device and wakes up appropriate file descriptors. If such answer is not satisfactory, then you have to read linux source code I suppose.
Sep 7, 2024 at 20:34 comment added codefast Thank you for taking the time to write the answer. My question is more how the operating system implements it, like aiocb/iouring in linux.
Sep 7, 2024 at 20:27 history edited freakish CC BY-SA 4.0
added 70 characters in body
Sep 7, 2024 at 20:21 history answered freakish CC BY-SA 4.0