优先级提高总是需要使用内核调用。
内核调用是异步的观点的CPU(见这个答案)。
Kernel calls are asynchronous from the point of view of the CPU (see this answer).
UNIX下的内核调用由所谓的syscall或者trap操作构成。
Under UNIX, calling the kernel consists of an operation known as a syscall or trap.
在标准2.6Linux内核中,当用户空间的进程执行内核调用时(通过系统调用),它便不能被抢占。
In the standard 2.6 Linux kernel, when a user space process makes a call into the kernel (through a system call), it cannot be preempted.
与之形成鲜明对比,Linux内核调用图——不同程序代码之间的交互网络——看起来几乎像一个倒置的金字塔。
In stark contrast, the Linux kernel call graph - the network of interactions between different pieces of program code - looks almost like an inverted pyramid.
然而,现在启用了devfs,设备驱动程序是用一种新的、改进了的内核调用来注册设备,称为devfs_register 。
However, now that devfs is enabled, the device drivers use a new and improved kernel call to register their devices, called devfs_register .
你可以设置一些寄存器,并发出一个系统调用指令(或中断),并由陷阱处理程序直接调用内核代码。
You set some registers and issue a system call instruction (or an interrupt) and have the kernel code called directly from the trap handler.
但如果方向反过来呢,内核空间调用用户空间?
But what about going in the other direction, kernel space calling user space?
系统调用是请求内核中服务的一种有效方法。
System calls are an efficient way of requesting services in the kernel.
这个例子启用了一个调用pci内核api的“虚拟的”pci设备。
This example enables a "dummy" pci device that calls the pci kernel APIs.
其结果是您可以使用它们的名字来调用内核函数,就像其他任何系统调用一样。
But the result is that you can call your kernel functions using their names, just like any other system call.
TAMOS内核扩展拦截所有系统调用。
图1的流程图演示了TAMOS如何通过在内核层面拦截系统调用来实现安全层。
The flow chart in Figure 1 demonstrates how TAMOS implements the security layer by intercepting the system calls at the kernel level.
这个表列举了几种探针类型,包括调用内核函数和从内核函数返回。
This table enumerates several probe types, including calling a kernel function and returning from a kernel function.
它提供了连接内核的系统调用接口,还提供了在用户空间应用程序和内核之间进行转换的机制。
This provides the system call interface that connects to the kernel and provides the mechanism to transition between the user-space application and the kernel.
在VFS之上的是标准的内核系统调用接口(SCI)。
Above the VFS is the standard kernel system-call interface (SCI).
使用新的内核系统调用有两种方法。
There are two ways that you can use new kernel system calls.
替换门也是非常重要的,它可以用于放弃调用者的键;通常在这些情况中,内核就是您的调用者,并且保持对内核内部数据的访问权限是不合理的。
The replace gate is also important in relinquishing the caller's keys; typically the kernel is your caller in these situations, and retaining access to kernel internal data would be inappropriate.
sci层提供了某些机制执行从用户空间到内核的函数调用。
The SCI is a thin layer that provides the means to perform function calls from user space into the kernel.
通常来说,应用程序在运行时既要花费一些时间来运行用户代码,也要花费一些时间来运行“系统代码”,例如内核系统调用。
Typically, applications spend some of their time in user code and some in "system code," such as kernel system calls.
微内核在执行任何调用之前,首先会检查该调用是否被许可。
However, before executing any call, the microkernel first checks to make sure the call is permitted.
系统调用或内核函数(link、sethostname、mkdir)。
System calls or kernel functions (link, sethostname, mkdir).
向内核中添加新系统调用,需要执行3 个基本步骤
You perform three basic steps to add a new system call to the kernel
这通常是调用panic内核服务或断言失败造成的。
This is normally from a call to the panic kernel service or from a failed assert.
函数 start_kthread通过调用内核API kernel_thread 来启动这个线程。
The function start_kthread launches the thread by calling kernel API kernel_thread.
最后,他们使用了某一版本的BSD内核,作为进程运行在他们的微内核上层,调用Mach,而不是运行特权指令。
In the end, they had a version of the BSD kernel running as a process on top of their microkernel and calling down to Mach instead of executing privileged instructions.
这个用户空间程序在预定义的proc -entries上执行ioctl,这会导致对内核模块的调用。
When executed, the user-space program does an ioctl on pre-defined proc-entries, which results in a call to the kernel module.
connect系统调用将外来地址(需要将连接请求发送到地址)从进程复制到内核,并调用soconnect()。
The connect system call copies the foreign address (the address to which the connection request needs to be sent) from the process to the kernel and calls soconnect().
当客户端进程发布connect系统调用时,内核负责执行隐式绑定。
The kernel takes care of doing an implicit binding when the client process issues the connect system call.
Linux系统调用接口提供了用户空间应用程序调用内核功能的方法。
The Linux system call interface provides the means for user-space applications to invoke kernel functionality.
应用推荐