java - nio、DMA、sendfile和epoll之间有什么关系

标签 java tomcat linux-kernel nio epoll

一开始以为nio只是基于epoll,后来看了nio use sendfile。现在我完全混淆了这些概念。连我自己都怀疑自己没看懂epoll。 sendfile 必须使用 DMA 吗? nio和epoll有什么关系? nio和sendfile有什么关系? nio是不是同时基于epoll和sendfile?

最佳答案

In the beginning, I thought nio is just based on epoll, but later I read nio use sendfile.

它同时使用两者,但不同时使用。

Must sendfile use DMA?

没有。

What's the relationship between nio and epoll?

当您调用 Selector.select() 时,NIO 会调用 epoll() 和 friend 。

What's the relationship between nio and sendfile?

当您调用 FileChannel.transferTo()/transferFrom() 时,NIO 可能会调用 sendfile()

Is nio based on both epoll and sendfile?

是的,在适当的平台上。

关于java - nio、DMA、sendfile和epoll之间有什么关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48090729/

相关文章:

java - 如何在 Java 中正确实现 LZ4、Snappy 或等效的压缩技术?

c++ - 我正在使用 tcp 进行很多小的发送,我应该关闭 Nagles 算法吗? (人们也将其称为 TCP_NODELAY)

memory-management - Linux 内核启动 : how is memory allocation done when DTB and initramfs are initially in memory?

ubuntu - 在 ubuntu 22.04 中挂接系统调用(内核版本为 5.15)

Java 方法出现 "Illegal start of expression"和 "' ;' expected"错误?

java - 计算对象的年龄有什么好处?

java - 处理 BufferedImage 中的像素

tomcat - 从 Tomcat 连接到 JBoss 7.1.1 中的 EJB 时,JNDI 查找失败

java - 在 Servlet 规范 3.0 下传递 servlet 配置参数

xml - tomcat报错java spring项目