Re: What's the relationship between pid and pid_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Jul 20, 2010 at 8:26 AM, Aiolia Lea <casmyu@xxxxxxxxx> wrote:

Then, what's the pid structure used for? and what's the relationship between pid structure and pid_t?

From :-
http://lwn.net/Articles/257054/

If you need to store a persistent reference to a user space process use a
struct pid *.  Not a task_struct reference.

References can potentially last for a long time after user space processes
have exited so holding a reference to a tiny struct pid is much cheaper
memory wise.  In addition a struct pid is a drop in replacement for a
pid_t (except for the need for reference counting).  A struct pid can
reference process groups, thread groups, and sessions not just individual
processes.  Further a struct pid is immune from pid wrap around, removing
a whole class of theoretical problems from being issues in the kernel.

Regards,
Neependra

 

Why the kernel required to involved pid this structure?

Hope you could give me some explanation or some  links.

Thank you very much~
--
Best Regards!
Aiolia Lea


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux