3

I hit the sentence:

The ProcessPoolExecutor class is an Executor subclass that uses a pool of processes to execute calls asynchronously.

I was looking for the word pool which means swimming pool in most cases. So, I'm asking the question: Why we're using in concurrent programming terminology the term pool of processes and not list of processes, set of processes etc. How did the term come into existence? Where is the origin?

2
  • 3
    You might want to ask this over on stackoverflow.com Quick answer: a pool is a group of resources that a program allocates and which is shared by functions/instances/processes/threads/etc.
    – JeffSahol
    Dec 27, 2011 at 20:07
  • @JeffSahol I'm aware of stackoverflow, but believe here are more programmers interested in language. Tao and Lynn defined it even more precise.
    – xralf
    Dec 28, 2011 at 10:30

3 Answers 3

14

I would imagine that it means a collection here. This from OALD - a supply of things or money that is shared by a group of people and can be used when needed

For example:

A car pool

Let's pool our resources.

We have a pool of free-lancers we can call in if necessary.

4
  • So, why we don't rather use collection of processes or bunch of processes or group of processes?
    – xralf
    Dec 27, 2011 at 19:50
  • 2
    It may merely be convention now, but "pool" also implies the sum total of communal resources. For example, a betting pool is the combined stakes of all participating gamblers, not just any group of gamblers; a company's typing pool (in the days before widespread personal computing) would be all members of a team solely dedicated to typing.
    – choster
    Dec 27, 2011 at 19:59
  • 2
    @xralf: The main distinction is that a pool (in the sense of a collection - connections, processes, etc) implies sharing; none of collection, bunch or group have that implication.
    – Tao
    Dec 27, 2011 at 20:10
  • @RandomIdeaEnglish I realized that your answer is perfectly right, but I understood it after reading the answers of others. Your answer is nice short and good summary.
    – xralf
    Dec 28, 2011 at 10:43
5

RandomIdeaEnglish has the right idea. The origin is from this definition of pool:

any communal combination of resources, funds, etc: a typing pool

While you're correct that collection/bunch/group would make sense in reference to processes, the term dates back much earlier in reference to other types of shared resources. I believe memory was the first, though I can't find confirmation of that, only this citation from StackOverflow:

The term heap (meaning memory pool) was used at least as early as 1971 by Wijngaarden in discussions of Algol.

It would not make sense to refer to a "bunch" of memory, or a "group" of memory. Nor would it make much sense to refer to a "heap" of processes. Whereas "pool" works equally well for a wide variety of resource types.

1
  • Ah, now I understand. Pool of memory = shared memory regions and pool of processes = bunch of processes that share processor time and the pool is changing while processes execute. As Tao comments there is implication of sharing.
    – xralf
    Dec 28, 2011 at 10:28
2

According to the Online Etymology Dictionary, the use of pool in the sense of "common reservoir of resources" dates from 1917.

Other terms like list or set don't embody the sense of a common reservoir, which is explicit in this definition of pool.

2
  • Thank you for finding the root of the word. I think that in case of pool of processes, the common reservoir is time of the processor shared by processes. So pool means a group of entities that share some resource.
    – xralf
    Dec 28, 2011 at 10:34
  • Actually, the shared resource is the pool. Read this excellent article explaining a connection pool; the concepts are the same for all pools used in computing.
    – Gnawme
    Dec 29, 2011 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.