Step four: the write system call returns, creating our fourth context switch.
步骤四:系统调用返回,导致了第4次上下文切换。
Step three: the write system call causes a context switch from user mode to kernel mode.
send() 套接字调用引发了从用户模式到内核模式的上下文切换。
Similarly, functions such as printf and fprintf invoke the write system call to do their work.
类似地,printf和fprintf这样的函数调用write系统调用完成其工作。
Your write system call will be interrupted by the bus error signal SIGBUS, because you performed a bad memory access.
此时write系统调用会被进程接收到的SIGBUS信号中断,因为当前进程访问了非法内存地址。
Also note that the result of the write system call is the number of characters written — in this case, 17 plus one carriage return.
还可以注意到,write系统调用的结果是写入字符的个数数目,在这个示例中为17加上一个回车。
By doing this the write system call returns with the number of bytes it wrote before it got interrupted and the errno set to success.
在这样处理方式下,write系统调用返回被信号中断前已写的字节数,并将errno全局变量设置为成功。
Step two: the write system call causes the kernel to copy the data from the original kernel buffers into the kernel buffers associated with sockets.
步骤二:write系统调用导致内核将数据从内核缓冲区复制到与socket相关联的内核缓冲区中。
The program text and data segments now need to get written into the mem file, either using the write system call, or by mapping the file into the process address space.
程序的文本和数据段现在需要写入到mem文件中,这可以使用write系统调用,或者通过将该文件映射到该进程的地址空间中实现。
These system plug-ins have their own API that regular plug-ins (such as the plug-ins you might write) can call.
这些系统插件有自己的API,常规插件(例如您可能编写的插件)可以调用它们。
This can lead to an insecure system, as hackers may be able to write code to call the EJB directly and bypass the Web tier.
这可能导致系统不安全,因为黑客可以编写代码来直接调用EJB,而得以绕过web层。
From the system call count, there were several calls to read, write, close, and stat that didn't appear before.
从系统调用计数中可以看出,有一些以前没有出现过的调用,包括read、write、close和stat。
At the top of the kernel is the system call interface, which handles the routing of user-space calls to their appropriate destination in the kernel (such as an open, read, or write).
内核的顶部是系统调用接口,处理用户空间调用到内核中合适的目的地的路由(例如open、read或write)。
Only an additional string CLUSTER=YES needs to be passed in the write() system call to send and receive remote notifications for these events.
只要在 write()系统调用中另外加上CLUSTER=YES字符串就可以发送和接收此类事件的远程通知。
At the top is the system call interface, which implements the basic functions such as read and write.
最上面是系统调用接口,它实现了一些基本的功能,例如read和write。
The inode refers to the file operations that are possible on it, most of which map directly to the system-call interfaces (for example, open, read, write, and flush).
inode引用它所允许的文件操作,大部分这些操作直接映射到系统调用接口(例如,open、read、write和flush)。
While writing a user space program to execute a system call is the "proper" way to do it, when you just want to test a system call module, it's annoying to have to write an additional program first.
当你想去测试一个系统调用模块时,编写一个用户空间的程序来执行一个系统调用是种“正规”的方法。但首先要编写额外的程序,这是恼人的事情。怎样才可以执行一个系统调用而又不用编写用户空间的程序呢?
Now, let's write a simple user space program to execute and test this new system call.
现在,让我们写些个简单的用户空间程序,运行和测试一个这个新的系统调用。
Now, let's write a simple user space program to execute and test this new system call.
现在,让我们写些个简单的用户空间程序,运行和测试一个这个新的系统调用。
应用推荐