CS 257 Database Systems Principles Assignment 2 Instructor: Student: Dr. T. Y. Lin Rajan Vyas (119)
Buffer Management
Introduction Buffer Manager manages the required memory for the process with minimum delay. Read/Write Buffers Request Buffer Manager
Buffer Management Architecture
Two types of architecture: Buffer Manager controls main memory directly Buffer Manager allocates buffer in Virtual Memory In Each method, the Buffer Manager should limit the number of buffers in use which fit in the available main memory. When Buffer Manager controls the main memory directly, it selects the buffer to empty by returning its content to disk. If it fails, it may simply be erased from main memory. If all the buffers are really in use then very little useful works gets done.
Buffer Management Strategies
LRU (Least Recent Used) It makes buffer free from the block that has not been read or write for the longest time. FIFO(First In First Out) It makes buffer free that has been occupied the longest and assigned to new request. The “Clock” Algorithm
The Relationship Between Physical Operator Selection and Buffer Management
The query optimizer will eventually select a set of physical operators that will be used to execute a given query. the buffer manager may not be able to guarantee the availability of the buffers when the query is executed.
Thank You