[comp.unix.wizards] Non-writes to /tmp

andrew@frip.gwd.tek.com (Andrew Klossner) (12/12/87)

[]

	"As you know, UNIX does writes when it feels like it, and uses
	any available in core blocks to read from. So if a program
	started and finished between /etc/update's sync's, the only
	disk overhead would be that of creating and deleting a
	directory entry which is done synchronously."

On my system, the major use of /tmp files is for one phase of a
compiler to pass information to the next.  The close in the first
(writing) phase seems to force the blocks to disk.  Or does it?

	"If you declare /tmp as a disk, you will be keeping two copies
	of the most recently used blocks in core."

You'll only have two copies (one in the virtual /tmp) if you would
otherwise have written a copy to disk (to the real /tmp).  Sounds like
a win to me.

  -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
                        (andrew%tekecs.tek.com@relay.cs.net)   [ARPA]

levy@ttrdc.UUCP (Daniel R. Levy) (12/13/87)

In article <9513@tekecs.TEK.COM>, andrew@frip.gwd.tek.com (Andrew Klossner) writes:
>On my system, the major use of /tmp files is for one phase of a
>compiler to pass information to the next.  The close in the first
>(writing) phase seems to force the blocks to disk.  Or does it?

No, the blocks haven't necessarily gone to disk yet even on close.
The blocks will go to disk in a short time thereafter, though, the
time depending on the system and how it was set up.  Some systems depend
upon an /etc/update (or similar) daemon, which invokes the sync() system call
on a periodic basis to cause buffered blocks to be written to disk.  Others
(like System V) have this periodic update functionality built into the kernel.
-- 
|------------Dan Levy------------|  Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
|         an Engihacker @        |  	<most AT&T machines>}!ttrdc!ttrda!levy
| AT&T Computer Systems Division |  Disclaimer?  Huh?  What disclaimer???
|--------Skokie, Illinois--------|