@Jeffrey Sarnoff - thank you for alerting me to my poor wording - I am 
still relatively new to memory mapping and  I'll try to clean it up. 

When working with memory mapped files in windows, you have the option to 
map a disk persisted file or a non-persisted file (in memory only). In both 
cases there is a name associated with the file and independent processes 
can access the file using said name. Non-persisted files are recommended 
for IPC (I was under the impression there were some performance benefits, 
but haven't extensively tested and it could be due to the provided 
implementation).

Using the Julia SharedArray constructor that allows for a named file, it 
appears that one must use a disk persisted file. The cleaner questions I 
should have started with are probably:
a) have I missed something in the docs - can one create and use a named, 
non-persisted, file with SharedArray? If so, could you please point me to 
the docs section or show a snippet?
b) is there a performance penalty being incurred when using a persisted 
file with SharedArray?

If it wasn't clear, I am interested in IPC for cases where each process may 
be running in its own vm and doesn't have access to other process's memory 
space.     

On Saturday, March 19, 2016 at 6:20:27 AM UTC-4, Jeffrey Sarnoff wrote:
>
> I have no idea.  Maybe clarifying the distinction between "have a process 
> create an anonymous backed SharedArray and dispatch work over it on other 
> processes" and "use a named non-disk (virtual file) backed SharedArray 
> from independent processes" would assist someone else in offering a 
> suggestion.
>
> On Thursday, March 17, 2016 at 2:29:57 PM UTC-4, ben e wrote:
>>
>> Hello,
>> I have been working with IPC via shared memory in a few languages, with 
>> Julia being my most recent and a very pleasant surprise. Accessing a 
>> SharedArray mapped to a disk backed file (via SharedArray(file, type, dims) 
>> ) across independent processes is very straight forward and has good 
>> performance.
>>
>> It appears that the disk-file backed SharedArray is syncing to the file 
>> on every write/update to the array - am I mistaken about this (I'm not 
>> suggesting it is a problem, just want to ensure I'm clear)?
>>
>> While there are examples of how to have a process create an anonymous 
>> backed SharedArray and dispatch work over it on other processes in the same 
>> vm session, I haven't quite sorted out how to use a named non-disk (virtual 
>> file) backed SharedArray from independent processes (so two separate 
>> programs can open it and use it for IPC, as I can with the disk-file backed 
>> version). I would like to compare the performance, as I would expect it to 
>> be even faster. 
>>
>> Is there a way to used a non disk-file backed, yet still named mmap'd 
>> file with the current SharedArray implementations exposed? If not, is this 
>> something that I can implement using the Mmap module? Any advice or pointer 
>> to where I should be looking in the docs or source would be greatly 
>> appreciated.
>>
>> Thank you for the help,
>> Ben
>>  
>>
>

Reply via email to