Write barrier

In operating systems, write barrier is a mechanism for enforcing a particular ordering in a sequence of writes to a storage system in a computer system. For example, a write barrier in a file system is a mechanism (program logic) that ensures that in-memory file system state is written out to persistent storage in the correct order.[1][2][3]

## Contents

* 1 In Garbage collection
* 2 In Computer storage
* 3 See also
* 4 References
* 5 External links

## In Garbage collection

A write barrier in a garbage collector is a fragment of code emitted by the compiler immediately before every store operation to ensure that (e.g.) generational invariants are maintained.[4][5]

## In Computer storage

A write barrier in a memory system, also known as a memory barrier, is a hardware-specific compiler intrinsic that ensures that all preceding memory operations "happen before" all subsequent ones.

## See also

* Native Command Queuing

## References

1. ↑ "Chapter 16. Write Barriers". docs.fedoraproject.org. https://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/writebarr.html. Retrieved 2014-01-24.
2. ↑ Tejun Heo (2005-07-22). "I/O Barriers". kernel/git/torvalds/linux.git - Linux kernel source tree. git.kernel.org. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/block/barrier.txt?id=09d60c701b64b509f328cac72970eb894f485b9e. Retrieved 2014-01-24.
3. ↑ Jonathan Corbet (2010-08-18). "The end of block barriers". LWN.net. https://lwn.net/Articles/400541/. Retrieved 2014-01-24.
4. ↑ Zorn, Benjamin (1990). Barrier methods for Garbage Collection. Department of Computer Science, University of Colorado in Boulder: Citeseer. pp. 11–18.
5. ↑ "GC FAQ -- algorithms". https://www.iecc.com/gclist/GC-algorithms.html.

## External links

* Barriers and journaling filesystems (LWN.net, May 21, 2008)

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Write barrier. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Write_barrier&oldid=304270"