What are the tasks of process operator?

If there are large data set of computing tasks each with a unique numeric ID, what are some ways to mathematically assign each task based on numeric ID to a different worker process on multiple machines?

  • For example: Suppose I have a database of 1 million tasks to be performed. I have 100 machines that can perform 1 task per second. These tasks need to be near equally be divided among all workers, but the workers need to compute based on tasks numeric id if the task needs to be performed by them. Any clues?

  • Answer:

    You want a hash function. A simple choice would be mod, so machine id = task id % 100.

Anon User at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.