如何确定系统调用是否与I/O相关?

发布于 2025-01-30 17:34:14 字数 1042 浏览 2 评论 0 原文

最近,我有一项任务来重视I/O相关的系统调用。 我在Internet上搜索了有关:基本I/O系统调用是 write read open ,<代码>关闭和 lseek

但是在搜索搜索之后,我读到了有记忆I/O和网络I/O。网络I/O用于构建插座连接,并且有一些系统调用,例如: socket bind 等。

这些系统调用的所有源代码均位于 net/socket.c 中, 因此,我想知道记忆I/O是否相同,读取来自 fs/read_write.c open 关闭来自 fs/open.c ,还有来自同一文件的其他系统调用。代码>也来自 fs/open.c ,是命令而不是系统调用。

我怀疑,如果这是找到I/O相关系统调用的正确方法?我应该检查系统调用表以查找I/O系统调用吗?我认为可能有一些简单的方法来识别它,但是我在互联网上没有发现很多有关它的讨论。

**我使用 example/syscalls.rs 来自 href =“ https://github.com/ranweiler/pete” rel =“ nofollow noreferrer”> pete ,以识别所有系统调用所使用的命令。它将获取系统呼叫号码,将其与系统调用表匹配,然后将系统调用名称放置。我用一个数组扩展代码包含I/O系统调用的数字,如果数字在数组中,则输出名称,否则不会输出。但是我需要添加数字手法。

Recently i have a task to idenity the i/o related system calls.
I searched around about it on the internet and get somethings like: the basic i/o system calls are write, read, open, close and lseek.

But after futher search, i read about that there are memories i/o and network i/o.The network i/o are used to build a socket connction, and there are some system calls like:socket, bind, listen , etc.

All the source code of these system calls are located in net/socket.c ,
so i wonder if the memories i/o are the same, read ,write are from fs/read_write.c and open , close are from fs/open.c , and there are other system calls from same file.But the man page shows that the truncate , which is also from fs/open.c , is a command rather than a system call.

I'm doubt, if this is a right way to find i/o related system calls? Should i check through the system call tables to find i/o system calls? i think there might have some easy way to identify it, but i didn`t find many discuss about it on the internet.

** I use example/syscalls.rs from pete , which is written in rust, to identify all system call a command used. It will get the system call number, match it with the system call table and out put the name of the system call. I extend the code with an array contains the numbers of the i/o system calls, if the number is in the array then output the name, otherwise not. But i need to add numbers manully.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文