Patent ID: 8850440

Claim:
A method for managing processing of processing requests in a data processing system comprising a computer on which execute at least a first processing environment and a second processing environment, comprising: receiving a processing request for the first processing environment of the computer, completion of the processing request requiring services provided by a set of one or more programs; and responsive to determining that the set of one or more programs is not loaded in the first processing environment, determining whether to process the processing request in the first processing environment or to route the processing request by performing: determining a second processing environment in which the set of one or more programs is already loaded; computing a cost of loading the set of one or more programs in the first processing environment, and if at least one loaded program must be cleared from memory of the first processing environment in order to load the set of one or more programs in the first processing environment, then including a predetermined cost of the clearing when computing the cost of loading the set of one or more programs; computing a cost of routing the processing request to the second processing environment, wherein the cost of loading the set of one or more programs in the first processing environment and the cost of routing the processing request to the second processing environment are predetermined; and determining that the processing request will be routed to the second processing environment for processing therein only if the computed cost of the routing is less than the computed cost of the loading and otherwise, determining that the processing request will be processed in the first processing environment and then loading the set of one or more programs in the first processing environment for processing the processing request therein.