In this invention, there is a resource manager managing different types of resources for n number of consumers. Let there be x number of resources for each resource type and x can vary from one resource type to another. Resource Manager creates group of consumers for each resource type and keeps an account of priority of each of the consumer in the group. It also maintains a key-value store with consumer identifier as the key and the value as the count of resources absorbs or in use by the corresponding consumer. The entries are arranged in order of priority of the respective consumers. So for a consumer C1 wanting to use a resource of particular type A, Resource Manager performs a check whether the consumer exists in the group created by it for that particular resource type and if yes then it checks whether the number of resources for that resource type(type A) is not zero. Resource counts for a particular resource type is maintained by an atomic increment operation for releasing of a resource and an atomic