# US 2001/0025295 A1 · Computer system, memory management method, storage medium and program transmission apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2001/0025295 A1
- Document ID: US20010025295A1
- Status: Published application
- Kind: A1
- Application number: 09/803,168
- Filed: 2001-03-09
- Published: 2001-09-27
- Earliest claimed: 2000-03-09
- Assignees: International Business Machines Corporation
- Inventors: Kiyokuni Kawachiya; Tamiya Onodera
- Web page: https://patentgrep.com/patent/US20010025295A1

## CPC

- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F 12/0269: {Incremental or concurrent garbage collection, e.g. in real-time systems (G06F12/0261 takes precedence)}
- Y10S 707/99953: Recoverability
- Y10S 707/99957: Garbage collection
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

The present invention provides a technique for skipping a locking process for an object in memory when a thread accesses an object that only it will access in order to reduce the load imposed on a system and to improve the overall system performance. A program executing in a computer system has multiple threads that share and access objects stored in memory. The objects have thread locality flags associated therewith that indicate the presence or absence of thread localities. The threads examine the thread locality flags for the objects they attempt to access to determine whether the corresponding objects, which are to be accessed, have localities for the threads. If, so the, threads skip the locking process and access objects immediately. If not, the object is locked prior to being accessed.

## Claims

### Claim 1

A computer system having a data processing environment in which a program is divided into and executed as multiple threads, and in which said threads share and access data that is stored in a memory device, comprising:
means for indicating specific data that will be accessed only by a specific thread;
means for determining, when a thread attempts to access data, whether a specific thread indication is present relative to the data being accessed;
means for accessing said specific data without first performing a locking process to reject access attempts by other threads, when the specific thread indication is present; and
means for performing a locking process for the data being accessed before accessing the data when it is determined that no specific thread indication is present.

### Claim 2 (depends on 1)

The computer system according to claim 1, wherein said specific thread detects data, included in said data stored in said memory device, and said specific thread does not have a reference pointer to said data, and thereafter releases memory occupied by said data to provide storage space that is freely available.

### Claim 3

In a data processing environment, a system in which multiple threads share and access objects, comprising:
flag data, provided for an object, for indicating an existence of a locality specifying that said object is to be accessed only by a specific thread;
means for having the specific thread access said object when said flag data for said object indicates said locality for said specific thread, without performing a locking process to reject access attempts by other threads or other objects before accessing said specific data; and
means for having the specific thread perform said locking process before accessing said object when said flag data does not indicate said locality for said specific thread.

### Claim 4 (depends on 3)

The computer system according to claim 3, wherein, when said object is created by a thread, said object sets said flag data indicating a locality exists for said thread, and wherein, before said object is changed so that it can be accessed by another thread or another object, said locality indicated by said flag data is canceled.

### Claim 5 (depends on 3)

The computer system according to claim 3, wherein said specific thread detects an object for which said flag data indicates the existence of a locality for said specific thread but said specific thread does not have a reference pointer to said data, and thereafter releases said object to provide in a memory device storage space that is freely available.

### Claim 6

A memory management method for a data processing environment in which a program is divided into and executed as multiple threads, and in which said threads share and access objects that are stored in a memory device, comprising the steps of:
setting flag data indicating an existence of a locality for a specific object that is created by a specific thread and that is to be accessed only by said specific thread;
canceling said locality indicated by said flag data before said specific object is changed so that said specific object can be accessed by another thread;
without performing a locking process to reject access attempts by other threads or objects, accessing said specific object when said flag data for said specific object indicates the existence of a locality for said specific thread; and
locking said specific object before accessing said specific object when there is no said flag data indicating a locality for said specific thread.

### Claim 7 (depends on 6)

The memory management method according to claim 6, wherein said step of canceling said locality indicated by said flag data for said specific object includes a step of:
performing said locking process, when said specific object has a locality for a specific thread, that was skipped at the time said specific object was accessed by said specific thread.

### Claim 8

A memory management method for a data processing environment in which a program is divided into and is executed as multiple threads, and in which said threads share and access objects that are stored in a memory device, comprising the steps of:
setting flag data indicating an existence of a locality indicating that a specific object that is created by a specific thread is to be accessed only by said specific thread;
permitting said specific thread to detect an object for which flag data indicates the existence of a locality for said specific thread and said specific thread does not have a reference pointer to said object; and
releasing said detected object to provide additional storage space in the memory device that may be freely used.

### Claim 9

Computer readable code stored on computer readable medium for permitting a locking step to be skipped in certain situations relative to data in a multi-thread environment, comprising:
first subprocesses for setting flag data indicating the existence of a locality for a specific object that is created by a specific thread and that is to be accessed only by said specific thread;
second subprocesses for canceling said locality indicated by said flag data before said specific object is changed so that said specific object can be accessed by another thread;
third subprocesses accessing said specific object when said flag data for said specific object indicates the existence of a locality for said specific thread without performing a locking process to reject access attempts by other threads; and
forth subprocesses for performing said locking process before accessing said specific object when said flag data indicates the absence of a locality for said specific thread.

### Claim 10

Computer readable code stored on computer readable medium for performing memory management for a program that executes in multiple threads, comprising:
first subprocesses for setting flag data indicating existence of a locality indicating that a specific object that is created by a specific thread is to be accessed only by said specific thread;
second subprocesses for permitting said specific thread to detect an object for which flag data indicates the existence of a locality for said specific thread and said specific thread does not have a reference pointer to said object; and
third subprocesses for unlocking said detected object so that storage space may be freely used.
