-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
We currently use an LRU Replacer in our buffer pool implementation. This issue proposes the addition of a CLOCK Replacer, modelled after the BusTub project's CLOCK replacement policy.
The CLOCK policy offers a lower-overhead, more memory-efficient alternative to LRU while approximating similar eviction behavior. This task is ideal for contributors interested in memory management and replacement policies.
The ClockReplacer struct must implement the following interface:
type FrameID int
// keeps track of unused occupied frames.
type Replacer interface {
// victim selects a frame to evict based on the replacement policy.
victim() FrameID
// insert adds a frame to the replacer, marking it as a candidate for eviction.
insert(frameId FrameID)
// remove eliminates a frame from the replacer, typically when the frame is pinned.
remove(frameId FrameID)
// size returns the current number of frames managed by the replacer.
size() int
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers