Why keep a kernel stack for every process on Linux?

What is the point of maintaining a separate kernel stack for each process on Linux?

Why not save just one stack for the kernel to work?

+4
source share
2 answers

What is the point of maintaining a separate kernel stack for each process on Linux?

This simplifies the continuity of processes in the core space.

Why not save just one stack for the kernel to work?

It would be a night mare to implement preemption without separate stacks.


Separate kernel stacks are optional. Each architecture can do whatever it wants. If there was no privilege during a system call, then one kernel stack might make sense.

, * nix , . , Linux write() .. . , .

, . A thread_info - . , , . , thread_info . , . ?

+3

?

/ ​​ .

, , . ( ), .

+1

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


All Articles