# US 6,732,363 B1 · Supporting inter-process communication through a conditional trap instruction

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

- Number: US 6,732,363 B1
- Document ID: US6732363B1
- Status: Granted
- Kind: B1
- Application number: 09/592,050
- Filed: 2000-06-12
- Granted: 2004-05-04
- Earliest claimed: 2000-02-28
- Assignees: Sun Microsystems, Inc.
- Inventors: Shailender Chaudhry; Marc Tremblay
- Web page: https://patentgrep.com/patent/US6732363B1

## CPC

- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment of the present invention provides a system that supports inter-process communication through use of a conditional trap instruction. The system operates by allowing a first process to send a communication to a second process by writing to a register that is visible to the second process. The second process then examines a value in the register by executing the conditional trap instruction. If the value in the register satisfies a condition specified by the conditional trap instruction, the system executes a trap handling routine that takes an action in response to the communication from the first process. If the value in the register does not satisfy the condition, the system takes no action and proceeds with execution of the code. In one embodiment of the present invention, the first process writes to the register by causing an interrupt that writes to the register.

## Claims

### Claim 1

A method for supporting inter-process communication through use of a conditional trap instruction, comprising:
sending a communication from a first process to a second process at a predetermined point in the instruction sequence by executing an instruction that causes a write to a register that is visible to the second process;
within the second process, examining a value in the register by executing the conditional trap instruction, which examines the value in the register, the conditional trap instruction being located within code being executed by the second process;
if the value in the register satisfies a condition specified by the conditional trap instruction, executing a trap handling routine that takes an action in response to the communication from the first process; and
if the value in the register does not satisfy the condition, taking no action and proceeding with execution of the code.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first process is a head thread and the second process is a speculative thread that speculatively executes program instructions in advance of the head thread while the head thread is executing, and wherein the head thread communicates with the speculative thread in order to inform the speculative thread that the speculative thread can perform a join operation with the head thread.

### Claim 3 (depends on 2)

The method of claim 2, further comprising keeping track of how many locks the speculative thread is holding, and only executing the conditional trap instruction if the speculative thread is holding no locks, so that the speculative thread will only perform the join operation with the head thread if the speculative thread is holding no locks.

### Claim 4 (depends on 3)

The method of claim 3, wherein the conditional trap instruction is located within code that implements a monitor exit operation.

### Claim 5 (depends on 1)

The method of claim 1, wherein the first process writes to the register by causing an interrupt that writes to the register.

### Claim 6 (depends on 1)

The method of claim 1, wherein the register is a processor status register for a processor on which the second process is running, and wherein the conditional trap instruction examines a conditional trap bit in the processor status register.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first process and the second process execute on different processors within a multi-processor system.

### Claim 8 (depends on 1)

The method of claim 1, wherein the conditional trap instruction is located within a very long instruction word (VLIW) instruction.

### Claim 9 (depends on 1)

The method of claim 1, wherein the conditional trap instruction is a bounds check instruction.

### Claim 10

A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for supporting inter-process communication through use of a conditional trap instruction, comprising:
sending a communication from a first process to a second process at a predetermined point in the instruction sequence by executing an instruction that causes a write to a register that is visible to the second process;
within the second process, examining a value in the register by executing the conditional trap instruction, which examines the value in the register, the conditional trap instruction being located within code being executed by the second process;
if the value in the register satisfies a condition specified by the conditional trap instruction, executing a trap handling routine that takes an action in response to the communication from the first process; and
if the value in the register does not satisfy the condition, taking no action and proceeding with execution of the code.

### Claim 11 (depends on 10)

The computer-readable storage medium of claim 10, wherein the first process is a head thread and the second process is a speculative thread that speculatively executes program instructions in advance of the head thread while the head thread is executing, and wherein the head thread communicates with the speculative thread in order to inform the speculative thread that the speculative thread can perform a join operation with the head thread.

### Claim 12 (depends on 11)

The computer-readable storage medium of claim 11, wherein the method further comprises keeping track of how many locks the speculative thread is holding, and only executing the conditional trap instruction if the speculative thread is holding no locks, so that the speculative thread will only perform the join operation with the head thread if the speculative thread is holding no locks.

### Claim 13 (depends on 12)

The computer-readable storage medium of claim 12, wherein the conditional trap instruction is located within code that implements a monitor exit operation.

### Claim 14 (depends on 10)

The computer-readable storage medium of claim 10, wherein the first process writes to the register by causing an interrupt that writes to the register.

### Claim 15 (depends on 10)

The computer-readable storage medium of claim 10, wherein the register is a processor status register for a processor on which the second process is running, and wherein the conditional trap instruction examines a conditional trap bit in the processor status register.

### Claim 16 (depends on 10)

The computer-readable storage medium of claim 10, wherein the first process and the second process execute on different processors within a multi-processor system.

### Claim 17 (depends on 10)

The computer-readable storage medium of claim 10, wherein the conditional trap instruction is located within a very long instruction word (VLIW) instruction.

### Claim 18 (depends on 10)

The computer-readable storage medium of claim 10, wherein the conditional trap instruction is a bounds check instruction.

### Claim 19

An apparatus that supports inter-process communication through use of a conditional trap instruction, comprising:
a first process that sends a communication to a second process at a predetermined point in the instruction sequence by executing an instruction that causes a write to a register that is visible to the second process;
the second process that is configured to examine a value in the register by executing the conditional trap instruction, which examines the value in the register, the conditional trap instruction being located within code being executed by the second process; and
a conditional trap processing mechanism that is configured to,
execute a trap handling routine that takes an action in response to the communication from the first process if the value in the register satisfies a condition specified by the conditional trap instruction, and to
take no action and proceed with execution of the code if the value in the register does not satisfy the condition.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein the first process is a head thread and the second process is a speculative thread that speculatively executes program instructions in advance of the head thread while the head thread is executing, and wherein the head thread communicates with the speculative thread in order to inform the speculative thread that the speculative thread can perform a join operation with the head thread.

### Claim 21 (depends on 20)

The apparatus of claim 20, wherein the speculative thread is configured to keep track of how many locks the speculative thread is holding, and to only execute the conditional trap instruction if the speculative thread is holding no locks, so that the speculative thread will only perform the join operation with the head thread if the speculative thread is holding no locks.

### Claim 22 (depends on 21)

The apparatus of claim 21, wherein the conditional trap instruction is located within code that implements a monitor exit operation.

### Claim 23 (depends on 19)

The apparatus of claim 19, wherein the first process is configured to write to the register by causing an interrupt that writes to the register.

### Claim 24 (depends on 19)

The apparatus of claim 19, wherein the register is a processor status register for a processor on which the second process is running, and wherein the conditional trap instruction is configured to examine a conditional trap bit in the processor status register.

### Claim 25 (depends on 19)

The apparatus of claim 19, wherein the first process and the second process execute on different processors within a multi-processor system.

### Claim 26 (depends on 19)

The apparatus of claim 19, wherein the conditional trap instruction is located within a very long instruction word (VLIW) instruction.

### Claim 27 (depends on 19)

The apparatus of claim 19, wherein the conditional trap instruction is a bounds check instruction.
