Linux kernel: What process does schedule() run in?

后端 未结 4 564
没有蜡笔的小新
没有蜡笔的小新 2021-02-04 22:24

When you call a system call such as fork in process X, the kernel is said to be executing in process context. So, fork can be said to be running in pro

4条回答
  •  离开以前
    2021-02-04 22:35

    Q: So, fork can be said to be running in process X, right?

    A: Yes, absolutely. The system call by which a process REQUESTS to "fork" occurs in user space. The act of making the system call TRANSITIONS from user space to kernel space. The IMPLEMENTATION of the system call may involve many separate steps. Some may occur in user space; other steps occur in kernel space.

    Q: ...taking into account the monolithic nature of the kernel ?

    A: The issue of "user space" vs "kernel space" has absolutely NOTHING to do with whether the kernel happens to be "monolithic", a "microkernel" or something else entirely.

提交回复
热议问题