and protection bits. Kernel allocates a new page when a process with no
access right writes to the page. Kernel allocates the region and then attaches to the
needed process. someone please correct me if I am wrong. See "The Design of
Unit Operating System" for detailed expl.
On 7/12/05, William J Beksi <wjbeksi@xxxxxxxxxxx> wrote:
Raj wrote:
> Hi,
> I have a doubt regarding the working of the VMA. How is a program
> executable's text region shared among processes that are running the
> same program ? I would like to understand how finally the same pages
> are shared between the 2 processes .
I'll try to explain, someone please correct me if I am wrong. Each
process has a structure that keeps a count of other processes that
access it's memory region.
Two processes can share the same memory region as long as they don't try
to write that region. If a process wants to write a shared region then
the kernel will allocate a new copy of that memory region for the
process to write to.
William
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/