l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Dec 06 16:41

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Exclusive access (was Re: [vox-tech] Tar, MySQL, and cron-ed backups)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exclusive access (was Re: [vox-tech] Tar, MySQL, and cron-ed backups)

On Fri, 5 Dec 2003, Mark K. Kim wrote:

> On Fri, 5 Dec 2003, Mitch Patenaude wrote:
> > > * some combination of these?
> >
> > yes. if it was half-way through reading the file.. then the first half
> > is the old file, and the second half is the new files.  If more than
> > one change was made, then more than one file is there.
> Hooooooooold on...  are you *sure*?  As I recall, once a file is opened,
> it is guaranteed to stay in that form until you close it.

Presumably, you mean _open for read_, because otherwise you could never
write to the file.

As it is, shared access to files is presumed in Unix, as is the privilege
of processes with write permission to change those files.  File locking
strategies are a fundamental subject in Unix programming, and are
non-trivial. [1]

A transaction-based filesystem that guaranteed both the ability to see a
consistent file content and still allow writes is probably some computer
scientist's holy grail.

Apple programmers apparently had to take a step "backwards" when OSX was
introduced, having to give up automatic exclusive write access to be
consistent with BSD semantics. [2]

[1] http://www.erlenstar.demon.co.uk/unix/faq_3.html#SEC35
[2] http://developer.apple.com/technotes/tn/tn2037.html

Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.