Method and system for invoking remote procedure calls
First Claim
1. In a computer system having a first process in a first address space, a second process in a second address space, and a managing address space that is authorized to access the first address space and the second address space, a method for transferring information between the first process and the second process, comprising the steps of:
- mapping a portion of the second address space into the managing address space so as to provide the managing address space with access to the mapped portion, wherein the mapped portion of the second address space is a stack of a procedure contained within the second address space;
identifying a stack for a procedure contained within the first address space; and
while the managing address space has access to the first address space, copying the information between the mapped portion of the second address space and the first address space by transferring the information directly between the stack of the procedure contained within the second address space and the stack of the procedure contained within the first address space.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system that allows a client process to invoke a remote procedure. An operating system maintains a table with an entry for each remote procedure. Each entry of this table contains a signature that specifies a format in which parameters are exchanged between the client process and the remote procedure. When the client process requests the invocation of the remote procedure, the operating system creates a stack for the remote procedure. This stack is then mapped into the operating system'"'"'s address space. By mapping the remote procedure'"'"'s stack in this fashion, the operating system can simultaneously access the client'"'"'s stack and the remote procedure'"'"'s stack. The operating system then copies, in accordance with the remote procedure'"'"'s signature, parameters directly from the client'"'"'s stack to the remote procedure'"'"'s stack. Once the parameters are copied, the remote procedure executes using the data contained on its own stack. When the substantive execution of the remote procedure is complete, the remote procedure traps back to the operating system. The operating system then copies, in accordance with the remote procedure'"'"'s signature, return parameters from the remote procedure'"'"'s stack to the client'"'"'s stack. Once these parameters have been copied, the operating system returns to the client process so that the client process can continue with its execution.
150 Citations
50 Claims
-
1. In a computer system having a first process in a first address space, a second process in a second address space, and a managing address space that is authorized to access the first address space and the second address space, a method for transferring information between the first process and the second process, comprising the steps of:
-
mapping a portion of the second address space into the managing address space so as to provide the managing address space with access to the mapped portion, wherein the mapped portion of the second address space is a stack of a procedure contained within the second address space; identifying a stack for a procedure contained within the first address space; and while the managing address space has access to the first address space, copying the information between the mapped portion of the second address space and the first address space by transferring the information directly between the stack of the procedure contained within the second address space and the stack of the procedure contained within the first address space. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. In a computer system having a kernel for managing resources of a computer system, a method for invoking a server procedure from a client procedure, the client procedure having a client procedure stack, the server procedure having a server procedure stack, the server procedure having at least one parameter, wherein the kernel performs the computer-implemented steps of:
-
receiving, from the client process, a request to invoke the server procedure; mapping the server procedure stack into an address space of the kernel; when the server procedure utilizes an input parameter, directly copying the input parameter from the client procedure stack to the server procedure stack so as to allow the server procedure to execute using the copied input parameter; and when the server procedure utilizes an output parameter, directly copying the output parameter from the server procedure stack to the client procedure stack after the server procedure has completed its execution. - View Dependent Claims (10, 11)
-
-
12. In a computer system having a first address space containing a first procedure, a second address space containing a second procedure, and a kernel address space, a method for transferring parameter data between the first and the second procedures, the method comprising the steps of:
-
mapping a stack of the second procedure into the kernel address space; and copying stack data directly between the mapped stack and a stack of the first procedure. - View Dependent Claims (13, 14)
-
-
15. In a computer system having a main memory that comprises a first address space having a first routine, a second address space having a second routine, and a third address space containing an operating system component, a method for responding to a request to remotely invoke the second routine, the method comprising the steps of:
-
receiving, in the third address space, a request from the first routine to invoke the second routine; preserving, in the main memory, a return address for the first routine; locating, on a stack of the first routine, any input parameters of the second routine; mapping the stack of the first routine into the third address space to facilitate the copying of parameters between the stack of the first routine and a stack of the second routine; for each located input parameter, directly copying the input parameter from the stack of the first routine to the stack of the second routine to allow the second routine to execute using data contained on its own stack; and once that the second routine has completed its execution, locating, on the stack of the second routine, any output parameters of the second routine, for each located output parameter, copying the located output parameter from the stack of the second routine to the stack of the first routine, and returning to the first routine at the location of the preserved address. - View Dependent Claims (16, 17, 18, 19, 20)
-
-
21. In a computer system having a main memory that comprises a kernel in a kernel address space, a client process in a client address space, a method for allowing the client process to invoke a server procedure, the method comprising the steps of:
-
receiving, in the kernel address space, a request from the client process to invoke the server procedure; preserving, in the main memory, a return address for the client process; determining a stack frame structure of the server procedure, the stack frame structure specifying a format for parameters of the server procedure; using the kernel to create a stack for the server procedure; mapping the stack of the server procedure into the kernel address space so as to provide for direct copying of parameters between a stack of the client process and the stack of the server procedure; copying, in accordance with the determined stack frame structure, the parameters directly from the stack of the client process to the stack of the server procedure; storing, in the stack of the server procedure, an address of a return thunk so that when the server procedure has completed its execution it will return to the return thunk; and when the server procedure has completed its execution, returning to the kernel via the return thunk, copying any output parameters directly from the stack of the server procedure to the stack of the client process, retrieving, from the main memory, the preserved return address of the client process, and using the retrieved return address to return to the client process. - View Dependent Claims (22, 23)
-
-
24. In a computer system having a first address space containing a first process, the first process having a first stack, a second address space containing a second process, the second process having a second stack, and an authorized address space, the authorized address space being entitled to access the first and the second address spaces, an apparatus for transferring data between the first and the second address spaces, the apparatus comprising:
-
a mapping device that maps the first stack into the authorized address space; and a transfer device that copies stack data between the first stack and the second stack while the mapping device has the first stack mapped into the authorized address space. - View Dependent Claims (25, 26)
-
-
27. In a computer system having a kernel in a kernel address space, an apparatus for allowing a client process to remotely invoke a server procedure, the client process existing in a client address space and having a client stack, the server procedure existing in a server address space and having a server stack, the server procedure utilizing a parameter, the apparatus comprising:
-
a signature specifier that provides a format that the server procedure uses to access its parameter; and a copier that directly transfers the parameter between the client stack and the server stack in accordance with the format provided by the signature specifier, wherein the copier comprises a mapping component that selectively maps at least one of the two stacks into the kernel address space to facilitate the direct transfer of the parameter between the client stack and the server stack. - View Dependent Claims (28, 29)
-
-
30. A computer-readable medium containing instructions for controlling a computer system to transfer information between a first process and a second process, the first process having a first address space and the second process having a second address space, the computer system having a managing address space that is authorized to access the first address space and the second address space, by performing the steps of:
-
mapping a portion of the second address space into the managing address space so as to provide the managing address space with access to the mapped portion; and while the managing address space has access to the first address space, copying the information between the mapped portion of the second address space and the first address space. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 38)
-
-
39. A computer-readable medium containing instructions for controlling a kernel of a computer system to invoke a server procedure of a server process from a client procedure of a client process, the kernel for managing resources of the computer system, the client procedure having a client procedure stack, the server procedure having a server procedure stack, the server procedure having at least one parameter, by performing the steps of:
-
receiving, from the client process, a request to invoke the server procedure; mapping the server procedure stack into an address space of the kernel; when the server procedure utilizes an input parameter, directly copying the input parameter from the client procedure stack to the server procedure stack so as to allow the server procedure to execute using the copied input parameter; and when the server procedure utilizes an output parameter, directly copying the output parameter from the server procedure stack to the client procedure stack after the server procedure has completed its execution. - View Dependent Claims (40, 41)
-
-
42. A computer-readable medium containing instructions for controlling a computer system to transfer parameter data between a first procedure and a first address space and a second procedure in a second address space, the computer system having a kernel address space, by performing the steps of:
-
mapping a stack of the second procedure into the kernel address space; and copying stack data directly between the mapped stack and a stack of the first procedure. - View Dependent Claims (43, 44)
-
-
45. A method in a computer system for a client procedure of a client computer program in a client address space to invoke a server procedure of a server computer program in a server address space, the computer system having a kernel in a kernel address space for facilitating the invocation of the server procedure, the method performed by the kernel, comprising the steps of:
-
receiving a first request to invoke the server procedure from the client procedure such that the kernel has access to a client stack in the client address space, the client stack containing first data for the invocation of the server procedure; identifying in the server address space a server stack for the invocation of the server procedure; mapping the server stack into the kernel address space; and while the server stack remains mapped into the kernel address space, directly copying the first data from the client stack to the server stack; gaining access to the server address space; invoking the server procedure wherein results of the invocation of the server procedure are stored onto the server stack; gaining access to the client address space; directly copying the results from the server stack to the client stack so that the client procedure is able to access the results to complete the server procedure invocation of the first request; receiving a second request to invoke the server procedure from the client procedure, wherein the client stack contains second data for the invocation of the server procedure; directly copying the second data from the client stack to the server stack; and invoking the server procedure for a second time with the server stack.
-
-
46. A method in a computer system for callers to invoke a remote procedure of a remote process, each of the callers being in an address space, the remote process being in an address space that is remote with respect to each of the address spaces of the callers, the computer system having a kernel for facilitating the invocation of the remote procedure, the method performed by the kernel, comprising the steps of:
-
receiving a first request from one of the callers to invoke the remote procedure such that the kernel has access to the address space of the one caller, the one caller having a stack containing first data to be used during the remote procedure invocation; creating a stack for the remote procedure in the remote address space and mapping the created stack into the kernel address space; and while the mapped stack remains mapped into the kernel address space, directly copying the data from the stack of the one caller to the mapped stack and invoking the remote procedure; receiving a second request from another one of the callers to invoke the remote procedure, the another caller having a stack containing second data to be used during the remote procedure invocation; and directly copying the second data from the stack of the another caller to the mapped stack and invoking the remote procedure for a second time with the mapped stack. - View Dependent Claims (47)
-
-
48. A computer-readable medium containing instructions for controlling a computer system to perform a method for a client procedure of a client computer program in a client address space to invoke a server procedure of a server computer program in a server address space, the computer system having a kernel in a kernel address space for facilitating the invocation of the server procedure, the method performed by the kernel, comprising the steps of:
-
receiving a first request to invoke the server procedure from the client procedure such that the kernel has access to a client stack in the client address space, the client stack containing first data for the invocation of the server procedure; identifying in the server address space a server stack for the invocation of the server procedure; mapping the server stack into the kernel address space; and while the server stack remains mapped into the kernel address space, directly copying the first data from the client stack to the server stack; gaining access to the server address space; invoking the server procedure wherein results of the invocation of the server procedure are stored onto the server stack; gaining access to the client address space; directly copying the results from the server stack to the client stack so that the client procedure is able to access the results to complete the server procedure invocation of the first request; receiving a second request to invoke the server procedure from the client procedure, wherein the client stack contains second data for the invocation of the server procedure; directly copying the second data from the client stack to the server stack; and invoking the server procedure for a second time with the server stack.
-
-
49. A computer-readable medium containing instructions for controlling a computer system to perform a method for callers to invoke a remote procedure of a remote process, each of the callers being in an address space, the remote process being in an address space that is remote with respect to each of the address spaces of the callers, the computer system having a kernel for facilitating the invocation of the remote procedure, the method performed by the kernel comprising the steps of:
-
receiving a first request from one of the callers to invoke the remote procedure such that the kernel has access to the address space of the one caller, the one caller having a stack containing first data to be used during the remote procedure invocation; creating a stack for the remote procedure in the remote address space and mapping the created stack into the kernel address space; and while the mapped stack remains mapped into the kernel address space, directly copying the data from the stack of the one caller to the mapped stack and invoking the remote procedure; receiving a second request from another one of the callers to invoke the remote procedure, the another caller having a stack containing second data to be used during the remote procedure invocation; and directly copying the second data from the stack of the another caller to the mapped stack and invoking the remote procedure for a second time with the mapped stack. - View Dependent Claims (50)
-
Specification