Welcome to the Linux Foundation Forum!

process identifiers (pid) and namespaces

Hi

re : process identifiers and namespaces

thanks google , i can find the meanings of uid, uid, euid,suid, fsuid; gid_t gid, egid, sgid, fsgid (inside struct task_struct ).

But I still find hard to form a relationship between different IDs and their role in namespaces.

http://manpages.courier-mta.org/htmlman7/credentials.7.html

http://www.mjmwired.net/kernel/Documentation/credentials.txt

Comments

  • fishchip2
    fishchip2 Posts: 19

    I find 2 related articles:

    1. PID namespaces in the 2.6.24 kernel
    http://lwn.net/Articles/259217/

    "One of the new features in the upcoming 2.6.24 kernel will be the PID namespaces support developed by the OpenVZ team with the help of IBM. The PID namespace allows for creating sets of tasks, with each such set looking like a standalone machine with respect to process IDs. In other words, tasks in different namespaces can have the same IDs. "

    " This feature is the major prerequisite for the migration of containers between hosts; having a namespace, one may move it to another host while keeping the PID values -- and this is a requirement since a task is not expected to change its PID.

    Without this feature, the migration will very likely fail, as the processes with the same IDs can exist on the destination node, which will cause conflicts when addressing tasks by their IDs."

    "PID namespaces are hierarchical; once a new PID namespace is created, all the tasks in the current PID namespace will see the tasks (i.e. will be able to address them with their PIDs) in this new namespace. However, tasks from the new namespace will not see the ones from the current. This means that now each task has more than one PID -- one for each namespace. "

    2. see also : Notes from a container
    http://lwn.net/Articles/256389/

  • marc
    marc Posts: 647
    Very nice, thanks for sharing the information with us :D

Categories

Upcoming Training