[Info-vax] Databases versus RMS

Johnny Billquist bqt at softjar.se
Wed Apr 18 19:55:36 EDT 2012


On 2012-04-19 00:26, glen herrmannsfeldt wrote:
> Johnny Billquist<bqt at softjar.se>  wrote:
>
> (snip, I wrote)
>>> More specifically, the difference between write-through and write-back.
>>> A write-back cache always writes to the underlying (RAM or disk)
>>> storage system, though the data is also available for later read.
>
>> The data can be available for later read in both write-back and
>> write-through. The difference is wether your write will actually pass
>> straight through (write-through), or if your write will only go to the
>> cache (write-back). In the case of write-back, the cache system itself
>> will then at some later point initiate a write of the data to the
>> backing store.
>
> I believe that there is also write-around, where the data isn't
> written to the cache at all. Presumably rarely used, though.

Depends...  It's more or less a case of write-through. If the data you 
write are not in the cache to begin with, you can either just write it, 
and not touch the cache, or also populate the cache. If it isn't written 
to cache, then write-back is already excluded.

A PDP-11/70 do this for the RH70 massbus controllers when data comes 
from the disk and is written to memory, as an example of a real life 
implementation. The idea being that the data already in the cache is 
more important, and so, data from the disk should not fill up the cache. 
However, if the data the from the disk hits the same address as already 
in the cache, the cache is invalidated. But it is still not populated.

>> That has nothing to do with wether you will be able to read the data
>> back from the cache. In a write-back cache, the data must be allowed to
>> live in the cache after a write. With a write-through you can either
>> invalidate the cache on a write, which is silly and hurts performance,
>> but works, you can update the cache (the sensible thing to do), or leave
>> the cache alone, which cause cache inconsistency and a broken system.
>
> There might be some cases where you know that the data will never
> be needed again, and it is better not to write it to the cache.
> More often that not, though, you write to the cache.

True. But it's hard to predict the future. :-)
You can always fail. However, suboptimal performance in that case is 
acceptable. Cache inconsistencies are not.

	Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt at softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol



More information about the Info-vax mailing list