An application service provision apparatus is provided with one or more
components to perform a dispatching and a shared resource monitoring
function to allow applications be hosted with multiple versions of a
hosting service runtime library in a more efficient manner. The
dispatching function, upon receipt of a request for service for an
application, determines if the version of the runtime library required is
known. If not, the dispatching function turns to the latest version of
the runtime library to determine the version required. In one embodiment,
the required earlier versions are loaded only on an as needed basis. The
shared resource monitoring function, upon detecting aggregated allocation
of a shared resource reaching a pre-determined threshold, requests
consumers of the shared resource to provide tracked last used times of
their allocations. In response, the monitoring function selects a number
of the allocations for release, and instructed the shared resource
consumers accordingly.