docker 和主机进程中的进程任务结构有何不同,除了主机之外,docker 中的任何特定模块有何不同?
最佳答案
由于处理在内核中由名为“task_struct
”的结构表示,因此该结构在容器中是相同的。
容器基于 system calls 到主机内核,任何与内核相关的结构都直接来自所述内核。
参见“Architecting Containers: Why Understanding User Space vs. Kernel Space Matters”
A typical program gets access to resources in the kernel through layers of abstraction similar to the following diagram:
The kernel provides abstraction for security, hardware, and internal data structures. The open() system call is commonly used to get a file handle
Notice in the following drawing that
bash
makes agetpid()
call which requests its own process identity.
Also, notice that thecat
command requests access to/etc/hosts
with a fileopen()
call.
关于Docker和Host之间的进程任务结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33116930/