用户空间进程是否抢占了内核线程?

目前我正在阅读“理解Linux内核,第3版”,在第22页,我可以阅读:

In the simplest case,the cpu executes a kernel control path sequentially from the
first instruction to the last. When one of the following events occurs,however,the
cpu interleaves the kernel control paths:

  • A process executing in User Mode invokes a system call,and the corresponding
    kernel control path verifies that the request cannot be satisfied immediately; it
    then invokes the scheduler to select a new process to run. As a result,a process
    switch occurs. The first kernel control path is left unfinished,and the cpu
    resumes the execution of some other kernel control path. In this case,the two
    control paths are executed on behalf of two different processes.

内核控制路径可以从进行系统调用用户空间进程中断?
我认为优先级非常重要:

>中断
>内核线程
>用户空间流程

我检查了勘误表,但却找不到任何相关信息.

最佳答案
你对优先权清单是正确的,但这本书试图说的是(我认为):

>当(用户)进程进行系统调用时,内核会代表它开始执行.
>如果系统调用可以完成(内核控制路径没有遇到障碍),那么它通常会直接返回到调用进程 – 想想getpid()函数调用.
>另一方面,如果系统调用无法完成(例如,因为磁盘系统必须在将数据返回到调用进程之前将块读入内核缓冲池),则调度程序用于选择要运行的新进程 – 抢占(代表用户运行的控制的内核线程)用户进程.
>在适当的时候,原始系统调用将能够继续,并且原始(代表运行的控制的内核线程)用户进程将能够继续并最终完成,将控制权返回给运行的用户空间进程在用户空间而不是在内核中.

所以“不”:不是’内核路径可以从进行系统调用用户空间进程中断’的情况.

代表用户空间进程执行系统调用时,内核路径可能会被中断,原因是:发生中断,或者内核路径必须等待资源变为可用,或者……

相关文章

1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...
如何抑制stable_secret读取关键的“net.ipv6.conf.all.stabl...
1 删除0字节文件 find -type f -size 0 -exec rm -rf {} ...
## 步骤 1:安装必要的软件包 首先,需要确保系统已安装 `dh...