What is the difference between the kernel space and the user space?

前端 未结 16 1294
渐次进展
渐次进展 2020-11-30 16:28

What is the difference between the kernel space and the user space? Do kernel space, kernel threads, kernel processes and kernel stack mean the same thing? Also, why do we n

16条回答
  •  旧时难觅i
    2020-11-30 16:52

    Briefly : Kernel runs in Kernel Space, the kernel space has full access to all memory and resources, you can say the memory divide into two parts, part for kernel , and part for user own process, (user space) runs normal programs, user space cannot access directly to kernel space so it request from kernel to use resources. by syscall (predefined system call in glibc)

    there is a statement that simplify the different "User Space is Just a test load for the Kernel " ...

    To be very clear : processor architecture allow CPU to operate in two mode, Kernel Mode and User Mode, the Hardware instruction allow switching from one mode to the other.

    memory can be marked as being part of user space or kernel space.

    When CPU running in User Mode, the CPU can access only memory that is being in user space, while cpu attempts to access memory in Kernel space the result is a "hardware exception", when CPU running in Kernel mode, the CPU can access directly to both kernel space and user space ...

提交回复
热议问题