Kernel Stack and User Mode Application Stack

Is the kernel stack a different structure for the user-mode stack that is used by the applications that we (programmers) write?

Can you explain the differences?

+3
source share
2 answers

Conceptually, both represent the same data structure: a stack.

The reason that there are two different stacks for a thread is because in user mode, the code should not allow the kernel memory to be corrupted. When switching to kernel mode to access addresses, and so on, another stack in memory is used, available only in kernel mode.

, (), ; ​​ , !

, / ( ) , .

+6

- , . , , . , , ( ).

, . , , .

0

Source: https://habr.com/ru/post/1726793/


All Articles