In this paper, we investigate the problem of efficient allocation of cooperating (concurrent) tasks (of programs) onto processors of distributed computing systems with heterogeneous resources. After pointing out several inadequacies with the existing formulations of the task allocation problem, we propose a new cost function for this problem. This function allows us to allocate tasks to the best possible resources taking a balanced work load on the resources; inter-processor communication and parallelism constraints into account. The task allocation problem in distributed computing systems considered here is NP-hard. Hence we present an efficient heuristic algorithm based on simulated annealing for solving this problem. We demonstrate the effectiveness of this algorithm by comparing the results of our algorithm with that of random and round robin allocations.