Re: atomicity

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 5 Dec 1998 19:22:38 +0000 (GMT)


> Is there a way for a program to make a section of code atomic? I think

No

> it would be useful to allow root programs (or, for added security, root
> programs with special permissions or listed in a certain file) to
> protect a certain section of their code so thoroughly that while in that
> section
> a) the scheduler will not interrupt them
> b) they cannot receive _any_ signals, including SIGKILL

No

> it more possible to write such things as background defragmenters,
> though additional kernel interfaces would probably be needed to keep the
> FS from confusing itself..... e.g.

Think about it this way. SIGKILL and a power failure are identical. Your
program must be able to handle both

> So the defragmenter flipped around parts of the disk without anybody
> else caring. With the defragger running as an idle-process only when
> the system load is low, it can effectively keep the disk at near-zero
> fragmentation without serious slow-down.

With ext2fs you should never need a defragmenter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/