Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rtp47.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!think!mit-eddie!genrad!decvax!mcnc!rti-sel!rtp47!wood From: wood@rtp47.UUCP (Tom Wood) Newsgroups: net.unix Subject: Re: UNIX 4.2 file system query Message-ID: <29@rtp47.UUCP> Date: Wed, 24-Apr-85 09:27:15 EST Article-I.D.: rtp47.29 Posted: Wed Apr 24 09:27:15 1985 Date-Received: Sat, 27-Apr-85 01:29:35 EST References: <239@sbcs.UUCP> Distribution: net Organization: Data General, RTP, NC Lines: 23 > UNIX 4.2 allows files to be opened in append mode. I would > like to know if this is "Atomic Append". > > For example, if two programs open the same file in append mode, > and append few blocks to the file then is it true that the blocks > will be appended in order (that is first all the blocks of first > program followed by the blocks of the second program, or vice-versa). > > Also, if this is true then is the granularity of atomicity is at > block level or is arbitrary. > divy Having a file open in append mode (O_APPEND in BSD 4.2 and FAPPEND in Sys V) causes the file pointer to be set to the current file size at each write operation. Since write operations to the same file do not overlap in time, each process will append data to the file at the time the write system call is invoked. The data written to the file in a given write operation will appear as a contiguous sequence within the file. If the processes do not cooperate, the sequences of write operations by each process can be arbitrarily interspersed. -- Tom Wood Data General, Research Triangle Park, NC {the known world}!mcnc!rti-sel!rtp47!wood