Process task structure between Docker and Host

前端 未结 1 1314
面向向阳花
面向向阳花 2020-12-20 04:07

How the process task structure is different in both docker and the host process any specific module is differed in docker apart from host?

相关标签:
1条回答
  • 2020-12-20 04:54

    Since processed are represented in kernel by structure called ‘task_struct', that structure is the same in a container.

    A container is based on system calls to the host kernel, and any kernel-related structure comes directly from said kernel.

    See "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 a getpid() call which requests its own process identity.
    Also, notice that the cat command requests access to /etc/hosts with a file open() call.

    0 讨论(0)
提交回复
热议问题