next up previous
Next: File Organization Up: Storage Access Previous: Buffer manager

Buffer replacement policies

  1. Replacement Strategy: Goal is minimization of accesses to disk. Generally it is hard to predict which blocks will be referenced. So operating systems use the history of past references as a guide to prediction.

  2. LRU is acceptable in operating systems, however, a database system is able to predict future references more accurately.
  3. Consider processing of the relational algebra expression

    displaymath580

  4. Further, assume the strategy to process this request is given by the following pseudo-code:

     aaaaaaaaaaaa¯for each tuple b of borrower do
    

    for each tuple c of customer do

    if b[cname] = c[cname]

    then begin

    let x be a tuple defined as follows:

    x[cname]:= b[cname]

    x[loan#]:= b[loan#]

    x[street]:= c[street]

    x[city]:= c[city]

    include tuple x as part of result of borrow tex2html_wrap_inline610 customer

    end

    end

    end

  5. Assume that the two relations in this example are stored in different files.
  6. The buffer manager may also use statistical information regarding the probability that a request will reference a particular relation.

next up previous
Next: File Organization Up: Storage Access Previous: Buffer manager

Osmar Zaiane
Tue Jul 7 16:00:21 PDT 1998