Patent ID: 7644137

Claim:
A computer-readable storage medium storing a computer program which, when executed by a processor, causes a computer system to perform a method for sharing resources from a pool of machines including servers among a plurality of clusters, the clusters including a first cluster and a second cluster, the method comprising: determining a current workload of the first cluster through a first dispatcher; determining a current workload of the second cluster through a second dispatcher; calculating a combined workload of the first and second clusters; and allocating a first number of resources from the pool to the first cluster in accordance with R pool ⁡ ( t , i ) = R total ⁢ L ⁡ ( t , i ) ∑ k n ⁢ L ⁡ ( t , k ) , wherein R pool(t,i) is the number of assignable resources in the pool for cluster i at time t, R total is the total number of resources available in the pool, L(t,i) is the workload of cluster i at time t, and n is a positive integer, wherein machines from the pool include a number of server instances corresponding to the number of clusters, the server instances running processes corresponding to different clusters, wherein allocating a resource to the first cluster includes activating a server instance in the pool for the first cluster, and wherein only one server instance in a machine is active at a time.