摘要 |
Embodiments of the present invention provide a method and a device for multithread to access multiple copies. The method includes: when multiple threads of a process are distributed to different nodes, creating a thread page directory table whose content is the same as that of a process page directory table of the process, where each thread page directory table includes a special entry, which points to specific data, and a common entry other than the special entry, each thread corresponds to a thread page directory table, execution of each thread is based on a corresponding thread page directory table, and the specific data is data with multiple copies at different nodes; and when each thread is scheduled and the special entry in the thread page directory table of the each thread does not point to the specific data stored in a node where the thread is located, modifying, based on a physical address of the specific data, the special entry to point to the specific data. Based on the technical solutions, the threads distributed to different nodes are enabled to access data copies stored in nodes where the threads are located, and thereby improving the system performance. |