bug-hurd
[Top][All Lists]
Advanced

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

procfs - Design Issue


From: Madhusudan C.S
Subject: procfs - Design Issue
Date: Tue, 17 Jun 2008 04:12:42 +0530

Hi all,
          I have a design question regarding implementation of procfs. Whenever we look into /proc, it is very likely that its contents change(directory names with PIDs), since processes are created and die. So everytime it is better to fetch this information whenever a contents are looked in this directory. But how to manage the old nodes?

1.   Is it better to free all those nodes as soon as they are displayed and create them whenever they are required?
2.   Or create nodes for each of these PIDs and keep them, when updating the nodes when client looks at /proc replace only the name and information of the nodes which no longer exists(corresponding to a process that died), with new process information and also create new nodes if the number of process currently running only when it exceeds its previous number?
3.  Whenever client looks into /proc create nodes for directories and give the required information. When /proc is looked for second time, free all the previous nodes and create nodes?

 Which among the above is a better approach than the other. Please suggest me.
--
Thanks and regards,
Madhusudan.C.S

Blogs at: www.madhusudancs.info


reply via email to

[Prev in Thread] Current Thread [Next in Thread]