Implementation

The implementation of namespaces requires two components: per-subsystem namespace structures that wrap all formerly global components on a per-namespace basis, and a mechanism that associates a given process with the individual namespaces to which it belongs. Figure 2-4 illustrates the situation.

UTS Namespace

Tasks struct task_struct struct task_struct struct task_strut struct nsproxy

Tasks struct task_struct

struct nsproxy

uts_

.namespc

user

_namespc

mnt_

.namespc

struct nsproxy

uts_

.namespc

user

_namespc

mnt_

.namespc

User Namespace

Figure 2-4: Connection between processes and namespaces.

Formerly global properties of subsystems are wrapped up in namespaces, and each process is associated with a particular selection of namespaces. Each kernel subsystem that is aware of namespaces must provide a data structure that collects all objects that must be available on a per-namespace basis. struct nsproxy is used to collect pointers to the subsystem-specific namespace wrappers:

Continue reading here: Info

Was this article helpful?

0 0