Messages in this thread | | | Date | Sat, 05 Dec 1998 00:24:10 -0500 | From | David Feuer <> | Subject | atomicity |
| |
Is there a way for a program to make a section of code atomic? I think 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
If this feature does not exist, I am guessing that writing it will make 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.
defragmenter enters protected block defragger moves a disk block defragger modifies inode to reflect change defragger tells FS about change defragger exits protected block
(note: some changes would be needed for safety: maybe tell FS about change, then implement, then tell FS complete..., have various dirtiness flags......)
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.
--
______________________________ / David Feuer \ | dfeuer@binx.mbhs.edu | | feuer@his.com | \ david@feuer.his.com / -----------------------------
- 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/
| |