Why is asynchronous programming more efficient at handling I/O concurrency than multiple processes/threads?
Asynchronous programming is a very effective solution when dealing with I/O concurrency because it allows us to multiplex I/O actions without memory or computing overhead. Alternative solutions that are based on multithreading or multiprocesses require either more CPU either more memory, or even both.
Multithreading hits a limit when 1,000 threads are running concurrently. On heavy workloads, this puts some pressure on the OS scheduler and ends up wasting a lot of CPU resources due to contention.
Multiprocess solutions face the same problem, but also require more memory because the address space of the program is allocated for each instance of the program. Some of this memory is shared between these instances (such as the code sections), but a big part has to be...