0% found this document useful (0 votes)
269 views2 pages

Lecture - 11: Draw The Local Recovery Management - Architecture and Mention The Function of A Database Buffer Manager

The document discusses the function of a database buffer manager. The buffer manager keeps recently accessed database pages in main memory buffers to improve access performance. It divides the buffer into pages of the same size as stable database pages. The buffer manager executes transactions on the volatile in-memory database and later writes changes back to the stable database. It checks if requested pages are already buffered and fetches them from stable storage if not. There are algorithms for replacing pages in the buffer. The buffer manager also writes buffered pages back to stable storage via a flush command.

Uploaded by

Pritam Saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views2 pages

Lecture - 11: Draw The Local Recovery Management - Architecture and Mention The Function of A Database Buffer Manager

The document discusses the function of a database buffer manager. The buffer manager keeps recently accessed database pages in main memory buffers to improve access performance. It divides the buffer into pages of the same size as stable database pages. The buffer manager executes transactions on the volatile in-memory database and later writes changes back to the stable database. It checks if requested pages are already buffered and fetches them from stable storage if not. There are algorithms for replacing pages in the buffer. The buffer manager also writes buffered pages back to stable storage via a flush command.

Uploaded by

Pritam Saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lecture -11

Draw the Local Recovery Management Architecture and mention the function of a database buffer manager

Volatile storage
o Consists of the main memory of the computer system (RAM).
Stable storage
o Resilient to failures and loses its contents only in the presence of media failures (e.g., head
crashes on disks).

Implemented via a combination of hardware (non-volatile storage) and software (stable-write, stableread, clean-up) components

The database buffer manager keeps some of the recently accessed data in main
memory buffers. This is done to enhance access performance.
Typically, the buffer is divided into pages that are of the same size as the stable
database pages.
The part of the database that is in the database buffer is called the volatile database.
It is important to note that the LRM executes the operations on behalf of a
transaction only on the volatile database, which, at a later time, is written back to
the stable database.

When the LRM wants to read a page of data on behalf of some operation of a
transactionit issues a fetch command, indicating the page that it wants to read.

The buffer manager checks to see if that page is already in the buffer and if so,
makes it available for that transaction; if not, it reads the page from the stable
database into an empty database buffer.

There are a number of different algorithms by which the buffer manager may choose
the buffer page to be replaced

The buffer manager also provides the interface by which the LRM can actually force
it to write back some of the buffer pages. This can be accomplished by means of the
flush command, which specifies the buffer pages that the LRM wants to be written
back.

Lecture -08
Concurrency Control

1. Block diagram of Transaction State and describe the


Transaction State.

Transaction State

Active, the initial state; the transaction stays in this


state while it is executing
Partially committed, after the final statement has
been executed.
Failed, after the discovery that normal execution can
no longer proceed.
Aborted, after the transaction has been rolled back
and the database restored to its state prior to the start of the transaction. Two options after it has
been aborted:
o restart the transaction only if no internal logical error
o kill the transaction
Committed, after successful completion.

2. The system must detect and break deadlocks, how?

The system must detect and break deadlocks by:

Choosing one trans as a victim and rolling it back.


Timing out the trans and returning an error.
automatically restarting the transaction hoping not to get deadlock again.
Return an error code back to the victim and leaving it up to program to handle situation.

You might also like