Sharing a data buffer
AssigneeApple Inc.
InventorsRonnie Misra, Joshua Shaffer
Life of this patent
Estimating the term…
Abstract
A method of executing program instructions may include receiving, in a processor, an instruction that causes the processor to read data from or write data to a portion of memory that is shared by one or more processes, at least one process of which manipulates data in a format that is different than a format of data in the shared portion of memory. The method may further include executing alternate instructions in place of the received instruction. The alternate instructions may effect transformation of data associated with the shared portion of memory from a first data format to a second data format.
Claims15
A method of processing an instruction stream comprising instructions associated with two or more processes, the method comprising:
- receiving an instruction associated with a first process;
- determining if the instruction, when executed, causes data to be read from or written to a buffer that is shared by the first process and a second process;
- forwarding the instruction to an execution unit if the instruction does not cause data to be read from or written to a buffer that is shared by the first process and the second process;
- if the instruction causes data to be read from or written to a buffer that is shared by the first process and the second process:
- retrieving a rule associated with the instruction;
- determining, based on the retrieved rule, if the instruction is to be replaced;
- if the instruction is not to be replaced, forwarding the instruction to the execution unit;
- if the instruction is to be replaced, replacing the instruction with one or more replacement instructions, based on the retrieved rule.
A method of executing program instructions, the method comprising:
- receiving, in a processor, an instruction;
- generating an exception if the instruction will cause the processor to read data from or write data to a portion of memory that is shared by one or more processes;
- and
- executing, in response to the exception, an exception handling routine with alternate instructions in place of the received instruction, the alternate instructions causing the processor to:
- read or write the data from or to the portion of memory in a first format;
- and
- transform the read or write data to a second format.
A method of executing program instructions, the method comprising:
- receiving, in a processor, an instruction that causes the processor to read data from or write data to a portion of memory that is shared by one or more processes, at least one process of which manipulates data in a format that is different than a format of data in the shared portion of memory;
- and
- executing alternate instructions in place of the received instruction, the alternate instructions effecting transformation of data associated with the shared portion of memory, the transformation being from a first data format to a second data format.
A method of executing program instructions, the method comprising:
- analyzing an instruction that is to be executed by a processor to determine if the instruction will cause the processor to read data from or write data to a shared buffer that stores data used by one or more processes;
- if the instruction will not cause the processor to read data from or write data to the shared buffer, forwarding the instruction to the processor for execution;
- and
- if the instruction will cause the processor to read data from or write data to the shared buffer, transforming the data as required for a given process prior to the write or before delivery of the read data.
A method of executing program instructions, the method comprising:
- analyzing an instruction from an instruction queue that is to be executed by a processor to determine if the instruction will cause the processor to read data from or write data to a shared buffer that stores data used by one or more processes;
- if the instruction will not cause the processor to read data from or write data to the shared buffer, forwarding the instruction to the processor for execution;
- and
- if the instruction will cause the processor to read data from or write data to the shared buffer, transforming the data as required for a given process prior to the write or before delivery of the read data.
Dependencies are inferred from the claim text.