Patent ID: 7469331

Claim:
A method in a data processing system for supporting shared library text replication, the method comprising: detecting a fork system call by a first process with a first processor affinity domain, wherein the first process requires a shared library which is represented using a set of effective addresses, and wherein the first processor affinity domain includes at least one first processor and a first memory; responsive to detecting the fork system call, creating a second process as a replication of the first process; selecting a second processor affinity domain for the second process,wherein the second processor affinity domain includes at least one second processor and a second memory; determining if the shared library is replicated in the first processor affinity domain of the first process; responsive to determining that the shared library is replicated in the first processor affinity domain, determining whether or not a copy of the replicated shared library of the first processor affinity domain is present in the second processor affinity domain, wherein the replicated shared library in the first processor affinity domain is represented by a first set of physical addresses that are unique within the first processor affinity domain; responsive to determining that a copy of the replicated shared library is not present in the second processor affinity domain, the data processing system transforming the second processor affinity domain by creating a copy of the replicated shared library in the second processor affinity domain, wherein the copy of the replicated shared library is represented by a second set of physical addresses that are unique within the second processor affinity domain; mapping the set of effective addresses to the first set of physical addresses in the first processor affinity domain; and mapping the set of effective addresses to the second set of physical addresses in the second processor affinity domain, wherein the same set of effective addresses are mapped to different sets of physical addresses.