Information Technology Reference
In-Depth Information
If the server does not receive from client c any response to the callback
request within a preset time limit, client c is regarded as crashed. In this case all
information about pages cached at c is deleted from the cached-page table. This
means discarding the current versions of all pages cached for writing at c,evenif
they survive at c. For such a page, the next older version, namely, the server version,
is now the current version, as it is, by definition, for any page cached for reading at
the client. Any further attempts by the client to ship updated pages or log records to
the server are turned down.
Algorithm 14.3 Procedure callback-page .p;m;c/
send the request callback-page .p; m/ to c
if c does not respond within a preset time limit then
regard client c as crashed
delete from the cached-page table all information about pages cached at c
else if client c responded to the callback request with a copy of p,R EC -LSN.p/ and log records
L then
replace the contents of p in the server buffer by the copy received
append the log records in L to the server log buffer
update the LSN-to-address mapping
mark p as modified in the buffer control block
acknowledge the receipt of the page and log records
if m D “write then
record p as no longer cached at c
else
record p as cached for reading at c
end if
else {client c responded, page p was cached for reading at c,andm D “write”}
record p as no longer cached at c
end if
Algorithm 14.4 Procedure respond-to-callback .p; m/
fix-and-write-latch .p/
if page p is cached for writing then
L all not-yet-shipped log records with LSNs up to P AGE -LSN.p/
respond with a copy of p,R EC -LSN.p/ and L
wait for an acknowledgement
remember that log records up to P AGE -LSN.p/ have been shipped
if m D “read” then
record p as cached for reading
else {m D “write”}
purge p from the cache
end if
else {page p is cached for reading}
purge p from the cache
respond that the client no longer caches p
end if
unlatch-and-unfix .p/
 
Search WWH ::




Custom Search