【问题标题】:what's the relationship among nio, DMA, sendfile and epollnio、DMA、sendfile和epoll之间的关系是什么
【发布时间】:2018-06-13 21:58:46
【问题描述】:

一开始以为nio只是基于epoll,后来看了nio use sendfile。现在我完全对这些概念感到困惑。甚至我怀疑我没有理解 epoll。 sendfile 必须使用 DMA 吗? nio和epoll是什么关系? nio和sendfile是什么关系? nio是同时基于epoll和sendfile的吗?

【问题讨论】:

    标签: java tomcat linux-kernel nio epoll


    【解决方案1】:

    一开始以为nio只是基于epoll,后来看了nio use sendfile。

    两者都使用,但不是同时使用。

    sendfile 必须使用 DMA 吗?

    没有。

    nio和epoll是什么关系?

    当你打电话给Selector.select()时,蔚来会打电话给epoll()和朋友。

    nio和sendfile是什么关系?

    当您拨打FileChannel.transferTo()/transferFrom()时,蔚来可能会拨打sendfile()

    nio 是同时基于 epoll 和 sendfile 的吗?

    是的,在适当的平台上。

    【讨论】:

      猜你喜欢
      • 2020-01-02
      • 2021-10-27
      • 2021-01-04
      • 2012-01-30
      • 2012-08-12
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多