The behaviour depends on whether you map shared or not. If for map
shared multiple users can read and write to the file simultaneously. If
you have a situation where you access he same bytes you need to use some
form of synchronization, just as you do with read and write.
You can map for exc
John,
You seem pretty knowledgable regarding MMAP. I was wondering if you could help
me with this MMAP scenario:
I'm curious as to how the OS and multple processes interact regarding file
i/o and mmap.
Process A --- Writes to a file sequentially using either pwrite or kaio.
I
MMAP just lets you avoid one or two layers of buffering and APIs. If
you were to use fopen/fread you go to function calls then open/read plus
buffering and function calls then to to the VM to actually access the
data. Going direct to the VM and getting a pointer to the VM pages is
more effici
Hi John! Thanks for the reply!
I think that makes a good point that the vm page fault is probably
faster than the overhead of copying the data to a local buffer. So, page
fault or not, I think that's the way I'm going to do it.
Again, thanks very much for your input!
On 6/12/07, John Stanton <
Mitchell Vincent wrote:
Working with some data conversion here (that will eventually go into
an SQLite database). I'm hoping you IO wizards can offer some help on
a question that I've been trying to get answered.
I'm using Solaris 10 for this.
If I mmap a large file and use madvise with MADV_SE
Working with some data conversion here (that will eventually go into
an SQLite database). I'm hoping you IO wizards can offer some help on
a question that I've been trying to get answered.
I'm using Solaris 10 for this.
If I mmap a large file and use madvise with MADV_SEQUENTIAL and
MADV_WILLNEE
6 matches
Mail list logo