> to make it clear .. say we have a program running in the RAM and it needs to > load a library to access some function from the secondary storage and map it > into its address space. how does the process get to know whether its present > in the RAM already or the library is to be copied form the storage. That is what harish pointed out. When mmap is requested, kernel would check if the requested part of the file (offset and length) is alreadypresent in the memory. It would attempt loading from secondary storage only if it is required. HTH. Om. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/