Record Locking Help ....
Roger Oberholtzer
roger
Tue Aug 16 01:19:55 PDT 2005
On Mon, 2005-08-15 at 23:19, Ben Duncan wrote:
> Bingo !!!! Ok, now that all makes sense. I can that do a maplock
> to insure atomicity , set the LOCKBYTE, force the flush, mapunlock
> and I am off to the races on record locking.
With mmap files, there really is no flush in the traditional sense. If a
memory page is 'dirty' (something has changed since taken from the disk)
it will be saved automatically by the paging system upon which mmap is
written. Initially it will (I think) be saved to your swap space (if
memory is full) and, when the file is closed, all dirty pages are
written. There may be a flag somewhere that tells the system to write
dirty pages based on some other criterion. The virtual memory system
takes care of all this. So, there is also no write() call...
+????????????????????????????+???????????????????????????????+
? Roger Oberholtzer ? E-mail: roger at opq.se ?
? OPQ Systems AB ? WWW: http://www.opq.se/ ?
? Kapellgr?nd 7 ? ?
? P. O. Box 4205 ? Phone: Int + 46 8 314223 ?
? 102 65 Stockholm ? Mobile: Int + 46 733 621657 ?
? Sweden ? Fax: Int + 46 8 314223 ?
+????????????????????????????+???????????????????????????????+
More information about the Linux-users
mailing list