<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Write_buffer</id>
	<title>Write buffer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Write_buffer"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Write_buffer&amp;action=history"/>
	<updated>2026-05-04T20:10:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Write_buffer&amp;diff=2678552&amp;oldid=prev</id>
		<title>imported&gt;Frap: Add UML class diagram</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Write_buffer&amp;diff=2678552&amp;oldid=prev"/>
		<updated>2025-01-27T00:48:40Z</updated>

		<summary type="html">&lt;p&gt;Add UML class diagram&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{More citations needed|date=June 2019}}&lt;br /&gt;
[[File:UML class diagram Rust stdio.svg|thumb|[[Rust (programming language)|Rust]] provides the {{Code|BufWriter}} struct]]&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;write buffer&amp;#039;&amp;#039;&amp;#039; is a type of [[data buffer]] that can be used to hold [[data]] being written from the cache to [[main memory]] or to the next cache in the [[memory hierarchy]] to improve performance and reduce [[latency (engineering)|latency]]. It is used in certain [[CPU cache]] architectures like Intel&amp;#039;s x86 and AMD64.&amp;lt;ref&amp;gt;Owens, Scott, Susmit Sarkar, and Peter Sewell. &amp;quot;A better x86 memory model: x86-TSO.&amp;quot; Theorem Proving in Higher Order Logics. Springer Berlin Heidelberg, 2009. 391-407.&amp;lt;/ref&amp;gt; In multi-core systems, write buffers destroy [[sequential consistency]]. Some software disciplines, like [[C11 (C standard revision)|C11&amp;#039;s]] data-race-freedom,&amp;lt;ref&amp;gt;Oberhauser, Jonas. &amp;quot;A Simpler Reduction Theorem for x86-TSO.&amp;quot; Verified Software: Theories, Tools, and Experiments. Springer International Publishing, 2015. 142-164&amp;lt;/ref&amp;gt; are sufficient to regain a sequentially consistent view of memory.&lt;br /&gt;
&lt;br /&gt;
A variation of [[write-through]] caching is called &amp;#039;&amp;#039;buffered write-through&amp;#039;&amp;#039;.{{Citation needed|date=January 2022}}&lt;br /&gt;
&lt;br /&gt;
Use of a write buffer in this manner frees the cache to service read requests while the write is taking place. It is especially useful for very slow main memory in that subsequent reads are able to proceed without waiting for long main memory latency.  When the write buffer is full (i.e. all buffer entries are occupied), subsequent writes still have to wait until slots are freed.  Subsequent reads could be served from the write buffer. To further mitigate this stall, one optimization called write buffer merge may be implemented.  Write buffer merge [[Write combining|combines writes]] that have consecutive destination addresses into one buffer entry.  Otherwise, they would occupy separate entries which increases the chance of pipeline stall.&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;victim buffer&amp;#039;&amp;#039;&amp;#039; is a type of write buffer that stores dirty evicted lines in [[write-back]] caches&amp;lt;ref group=note&amp;gt;[[Write-through]] caches don&amp;#039;t need write the evicted cache lines as they are written to main memory when the cache is written.&amp;lt;/ref&amp;gt; so that they get written back to main memory.  Besides reducing pipeline stall by not waiting for dirty lines to write back as a simple write buffer does, a victim buffer may also serve as a temporary backup storage when subsequent cache accesses exhibit [[Locality of reference|locality]], requesting those recently evicted lines, which are still in the victim buffer.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;store buffer&amp;#039;&amp;#039;&amp;#039; was invented by IBM during Project ACS between 1964 and 1968,&amp;lt;ref&amp;gt;{{Cite book|chapter-url=https://dl.acm.org/ft_gateway.cfm?id=1283945&amp;amp;type=pdf|doi = 10.1145/1283920.1283945|chapter = The search for performance in scientific processors|title = ACM Turing Award Lectures|year = 2007|last1 = Cocke|first1 = John|page = 1987|isbn = 978-1-4503-1049-9}}&amp;lt;/ref&amp;gt; but it was first implemented in commercial products in the 1990s.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
{{Reflist|group=note}}&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Write Buffer}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Computer memory]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Computer-stub}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Frap</name></author>
	</entry>
</feed>