Abstract


  • Short for asynchronous input/output
  • A programming paradigm that allows IO Operation to be performed concurrently with other tasks, without blocking the execution of the program, so the CPU can initiate multiple other I/O operations and continue executing other CPU-bounded tasks while waiting for the results
  • Powered by Asynchronous Thread

Higher complexity

Coding an excess of callback functions can get messy and becomes a nightmare for programmers attempting to analyze them.

Syntactic features, such as promises and async/await patterns, have been introduced to streamline code syntax and ease the experience of reading it for programmers. Still, these features add a layer of complexity to the code.

Async IO in JS (Promise Execution)

IO Uring


Async IO

Traditionally, the process in user space is blocked until it receives an IO completion signal form Kernel. But IO Uring introduces a Shared Memory between the User Space and Kernel Space. The process in user space is aware when the IO operation is completed without kernel sending back a completion signal. Thus, the process in user space can continue with its execution while the IO operation is in progress.

Caution

In June 2023, Google’s security team reported that 60% of Linux kernel exploits submitted to their bug bounty program in 2022 were exploits of io_uring vulnerabilities. As a result, io_uring was disabled for apps in Android, and disabled entirely in ChromeOS as well as Google servers.

References