Hi Harshal ,
Hi,
Is there any chance that the memory ocupied by the /proc filesystem can be swapped out by the kernel?
The /proc is a pseudo file system that provides an abstraction over kernel data structures and allows you to access them and read them or write to them (depending on permissions ofcourse) .
What information does one get out of proc. A simple example would be the ability to read and look at the memory maps for every process. Available at /proc/<pid>/maps
(Shared libraries where are they mapped , what is the range of virtual addresses being used by this process so on and so forth )
Ok why do we want such information in the form of a filesystem . I can think of 2 scenarios off the cuff.
1. You want to know where a particular shared library is mapped maybe for a particular process in its vm. Or you might want to know the cmd line options passed to that process. Or the open file descriptors for that process. The mind boggles at the number of questions that /proc can answer.
2. Lets say you as the sysad wants to know for e.g the cpuid and information about the cpu. you could just do a cat /proc/cpuinfo. Now this info is stored in some data structure in the kernel. All that the proc file system allows you to do is to look at kernel data structures through the FS interface.
3. Also this information is useful for debuggers like gdb when they want to do native debugging using /proc.
So your question about swapping out memory occupied by the /proc file system amounts to swapping out memory used by the kernel for its internal data structures . Now can you answer your question ?
For more on this do a man proc.
A little thought on the above question drives me to another question.
Is the memory occupied by /proc a part of kernel memory ?
Look above .
<snip>
By the means of this question I just wanted to know the real answer.
Go read man proc. you will have more insights !
cheers Ramana --- Ramana Radhakrishnan GNU Tools (codito ergo sum) www.codito.com
man man . The best command in the world
-- ______________________________________________________________________ Pune GNU/Linux Users Group Mailing List: ([EMAIL PROTECTED]) List Information: http://plug.org.in/mailing-list/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.
