How does a shared library work?

Tony Arnold tony.arnold at manchester.ac.uk
Fri Oct 28 20:18:31 UTC 2005


On Fri, 2005-10-28 at 10:13 -0500, Eldridge, Michael wrote:

> > Is the memory controller a part of the kernel?
> 
> no.  see here: http://en.wikipedia.org/wiki/Memory_management_unit

Yes, there is some hardware that helps map virtual memory to real memory
in the machine, and that is what is described in the article referenced
above.

However, there are some page tables that need to be established in order
to achieve the mapping of shared libraries etc referred to in a previous
post. There is also code needed to deal with case when a program
references a memory location that has not been loaded into memory, a
called page fault. In fact, initially, no pages of a process are loaded
into memory, just the relevant page tables set and the process started.
The page fault code takes care of the rest.

The code that does all of the above is usually part of the kernel, as it
is fundamental to the operating system. Algorithms for managing memory
in the best way have been extensively explored by Computer Scientists.

Regards,
Tony.






More information about the ubuntu-users mailing list