Jump to content

Write barrier

From Wikipedia, the free encyclopedia

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]

In garbage collection

[edit]

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

[edit]

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

[edit]

References

[edit]
  1. ↑ "Chapter 16. Write Barriers". docs.fedoraproject.org. Archived from the original on June 8, 2022. Retrieved January 24, 2014.
  2. ↑ Heo, Tejun (July 22, 2005). "I/O Barriers". kernel/git/torvalds/linux.git - Linux kernel source tree. git.kernel.org. Retrieved January 24, 2014.
  3. ↑ Corbet, Jonathan (August 18, 2010). "The end of block barriers". LWN.net. Retrieved January 24, 2014.
  4. ↑ Zorn, Benjamin (November 1990). Barrier methods for Garbage Collection (Report). Technical Report. Vol. CU-CS-494-90. Department of Computer Science, University of Colorado in Boulder. pp. 11–18.
  5. ↑ "GC FAQ -- algorithms". iecc.com. Retrieved June 30, 2020.

Further reading

[edit]