Efficient Buffer Management in Operating Systems for Data Processing
This document discusses buffer management techniques for effective data processing in operating systems. It explains the concept of buffers as temporary memory for transferring data chunks, addressing the intricacies of page replacement policies, such as Least Recently Used (LRU) and Most Recently Used (MRU). The text outlines how buffers manage read and write access requests based on data presence in main memory or disk, ensuring optimized system performance. Also included are strategies like pinned blocks and toss-immediate strategies that enhance resource management.
Efficient Buffer Management in Operating Systems for Data Processing
E N D
Presentation Transcript
File Processing : Buffer 2011, Spring Pusan National University Ki-Joune Li
Buffer • Buffer • Temporary memory to transfer a chunk of data • 1 buffer : multiple blocks • Page • A piece of buffer (main memory) corresponding with block • Page Replacement when buffer is full
Get Data Load on main memoryand Replacement Access to Disk Buffer Management : Read Get Data Access Request Read Request If in main memory MainMemory If not in main memory Disk
Write Data Write Data on Disk Write Data Load on main memoryand Replacement Access to Disk Buffer Management : Write Access Request Write Request If in main memory MainMemory If not in main memory Disk
Buffer Manager : Replacement Policy • LRU • Replace the block least recently used • Most operating system and buffer management • Idea behind LRU – use past pattern of block references as a predictor of future references • Prediction of future reference • Queries have well-defined access patterns (such as sequential scans), and a database system can use the information in a user’s query to predict future references
Buffer Manager : Replacement Policy • Pinned block : • memory block that is not allowed to be written back to disk. • Toss-immediate strategy : • frees the space occupied by a block as soon as the final tuple of that block has been processed • Most recently used (MRU) strategy : • system must pin the block currently being processed. After the final tuple of that block has been processed, the block is unpinned, and it becomes the most recently used block.