Distributed arrays are a fully generic solution that scales across many networked hosts in order to work on data that cannot fit in memory on a single machine. However, in many circumstances, the data does fit in memory, but we would want multiple Julia processes to improve throughput by fully utilizing all cores in a machine. In this situation, shared arrays are useful in terms of getting different Julia processes to operate on the same data.
Shared arrays, as the name suggests, are arrays that are shared across multiple Julia processes on the same machine. They are created by mapping the same region in memory to different processes. Functionality relating to shared arrays lives in the SharedArrays module within base Julia. Constructing a shared array requires specifying its type, its dimensions, and the list of process IDs that will have access to the...