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
- High-performance Async IO interface for the Linux Kernel that allows Process (进程) in User Space to make System Call (系统调用) without blocking the process
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.