主权项 |
1. An information processing device comprising:
an application interface unit that
receives from an application program a request to use a resource,sends to the application program a first handle used as an identifier to identify the resource,receives from the application program an instruction to use the resource wherein the instruction designates the resource by including the first handle identifying the resource,and, that causes an instruction storage unit to store, by associating, the received instruction, the first handle, the application program, and the designated resource in a state that specifies that the first handle that designates the resource is used; a suspension/resumption management unit that
suspends the application program upon receipt of an instruction to suspend and changes the state of the first handle that designates the resource from used to suspended,resumes the application program upon receipt of an instruction to resume and transmits the instruction to use the resource again, the instruction including the first handle to identify the resource; and a handle control unit that
determines whether or not the first handle that designates the resource in the instruction is being currently used by the application program, wherein the first handle that designates the resource is currently used by the application program when the state specifies that the first handle that designates the resource is used, and the resource is not currently used when the state specifies that the first handle that designates the resource is suspended,when the first handle is determined not to be currently used, requests to an operating system the resource, receives a second handle corresponding to the resource from the operating system, and stores the received second handle in a handle storage unit as an alternative handle,when the first handle is determined to be currently used, determines whether the alternative handle corresponding to the first handle is stored or not by referring to the handle storage unit, andwhen the alternative handle is determined to be stored, replaces the first handle that designates the resource in the instruction received by the application interface unit with the alternative handle, wherein the replacing is not performed by the application program. |