刚看了 io 的五种模型,其中说到只有内核复制到用户空间的才是真正的异步 io,其他都是同步 io,那么 io 的时候不需要用到 cpu 么?问题可能有点小白,求大佬解答下
1 iceheart 2018-05-23 12:46:05 +08:00 via Android 你还没说你看到的是哪五种模型呢,这让人怎么喷啊 |
2 PanPancf 2018-05-23 12:47:18 +08:00 io 的时候不需要 CPU,io 结束时会有硬件中断通知 CPU 的 |
![]() | 3 seaswalker 2018-05-23 13:06:44 +08:00 via iPhone 更有效地利用 CPU 资源 |
4 batman2010 2018-05-23 13:33:15 +08:00 POSIX defines these two terms as follows: 1. A synchronous I/O operation causes the requesting process to be blocked until that I/O operation completes. 2. An asynchronous I/O operation does not cause the requesting process to be blocked. |
![]() | 5 cuzfinal 2018-05-23 15:08:10 +08:00 异步 IO 不卡啊,谁说异步 IO 快了。 |
![]() | 6 0x8C 2018-05-23 16:35:33 +08:00 1.要看应用场景 2.得看你对快的定义 |
![]() | 7 verrickt 2l 说到点上了。 这是我以前学习异步时候看过的一片博客,虽然是讲 C#的,但是基本原理是相通的 https://blog.stephencleary.com/2013/11/there-is-no-thread.html |