WebFetchPgImp(page_id): 根据 page_id 从磁盘中拉取页并放入缓存池中。 UnpinPgImp(page_id, is_dirty): 将指定页的 pin_count 减 1,如果 pin_count 等于 0 了就调用 Unpin 函数将这个帧放入 Replacer 中。 FlushPgImp(page_id): 将对应的页刷入磁盘中。 NewPgImp(page_id): 创建一个新的页。 WebProject 2 最后一篇,讲解 B+ 树并发控制的实现。说实话一开始博主以为这块内容不会很难(毕竟有 Project 1 一把大锁摆烂秒过的历史x),但实现起来才发现不用一把大锁真的极其痛苦,折腾了一周多才弄完。
CMU 15-445 Fall2024 Project1 满分通关 - 知乎 - 知乎专栏
WebFetchPgImp中,在读取磁盘到物理页前,记得将原页面写回磁盘。 NewPgImp中,若页面在内存中,每次返回时记得给pin_count_加1. UnpinPgImp中,每次将page的pin_count_减1后, 仅有减为0时 ,将页面编号unpin到replacer。 FlushPgImp中, 记得is_dirty为true时才修改page的is_dirty_ ,可能有一种情况是若原page的is_dirty_为true,函数的is_dirty … WebSep 26, 2024 · FetchPgImp (page_id) Fetch the requested page from the buffer pool. UnpinPgImp (page_id, is_dirty) Unpin the target page from the buffer pool. FlushPgImp (page_id) Flushes the target page to disk. NewPgImp (page_id) Creates a new page in the buffer pool. DeletePgImp (page_id) Deletes a page from the buffer pool. chess characters names
GNU Image Manipulation Program 2.8 Quick Start Guide
WebFetchPgImp中,无论是成功搜索到frame还是获取一个新frame,都需要Pin()以及pin count+1。 调用UnpinPgImp时,需要把frame的pin count-1。UnpinPgImp不能删 … WebMany Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create CMU-15-445-Database-Systems-2024/src/include/buffer/buffer_pool_manager.h Go to file Go to fileT Go to lineL Copy path Copy permalink Web对于 FetchPgImp ,如果空闲列表中没有可用的Page,且其他所有的Page都处于”pinned“状态,你需要返回NULL。 对于 FlushPgImp ,无论Page处于什么状态(“pinned” 或 "unpinned"),都会被刷新到磁盘。 对于 UnpinPgImp ,is_dirty参数会告知Page有没有被修改。 注意 : Pin 和 Unpin 在LRUReplacer和BufferPoolManagerInstance有不同的含义 … good morning chiang mai tropical inn