Implementation of a Disk-based Buffer Pool A buffer pool is an area of main memory that has been allocated for the purpose of caching data blocks as they are read from disk. The main purpose of a buffer pool is to minimize disk I/O. Tasks: Implement a disk-based buffer pool application based on the below three buffer pool replacement schemes: FIFO (first in, first out), LRU (least recently used) and LFU (least frequently used) buffer pool replacement strategies. FIFO (First In, First Out): the oldest data block in the buffer pool is replaced. LRU (Least Recently Used): the least recently accessed data block in the buffer pool is replaced. LFU (Least Frequently Used): the least frequently accessed data block in the buffer pool is replaced. Initially, the buffer pool is free. Disk blocks are numbered consecutively from the beginning of the file with the first block numbered as 0. When I execute your program, First, it asks the user to input the following parameters: o a: number of blocks in the buffer pool o b: number of blocks on the disk, of course b 2a. o c: the size of each block in bytes (i.e., 1024) o l: number of disk address accesses o per: the percentage of the l accesses that are writes, in the range of [0,1]. When 0, all the accesses are reads; when 1, all the accesses are writes. Then your program generates the / address requests, each is a random number in the range of [0, b*c- 1], the entire address space of the disk. The disk and buffer pool accesses take place as follows. For each read access, it checks if the requested data block containing that address is already in the buffer pool. If yes, there is no I/O; otherwise, the data block is brought into an empty data block of the buffer pool from the disk, causing one I/O. However, if the buffer pool is full and the requested data block is not in buffer block, then one of the three block replacement algorithms (i.e., FIFO, LRU, and LFU) will be used to evict one of the existing data blocks in the buffer pool, so the requested data block can be brought into the buffer pool from the disk. For each write access, your program checks if the data block containing that address is in the buffer pool. If yes, then there is no I/O, and the block is marked dirty (which means the block is updated and needs to be written back to the disk). Otherwise, the data block is brought into an empty data block of the buffer pool from the disk, causing one I/O, and the block is then marked dirty. However, if the buffer pool is full and the newly requested data block is not in the buffer
Implementation of a Disk-based Buffer Pool A buffer pool is an area of main memory that has been allocated for the purpose of caching data blocks as they are read from disk. The main purpose of a buffer pool is to minimize disk I/O. Tasks: Implement a disk-based buffer pool application based on the below three buffer pool replacement schemes: FIFO (first in, first out), LRU (least recently used) and LFU (least frequently used) buffer pool replacement strategies. FIFO (First In, First Out): the oldest data block in the buffer pool is replaced. LRU (Least Recently Used): the least recently accessed data block in the buffer pool is replaced. LFU (Least Frequently Used): the least frequently accessed data block in the buffer pool is replaced. Initially, the buffer pool is free. Disk blocks are numbered consecutively from the beginning of the file with the first block numbered as 0. When I execute your program, First, it asks the user to input the following parameters: o a: number of blocks in the buffer pool o b: number of blocks on the disk, of course b 2a. o c: the size of each block in bytes (i.e., 1024) o l: number of disk address accesses o per: the percentage of the l accesses that are writes, in the range of [0,1]. When 0, all the accesses are reads; when 1, all the accesses are writes. Then your program generates the / address requests, each is a random number in the range of [0, b*c- 1], the entire address space of the disk. The disk and buffer pool accesses take place as follows. For each read access, it checks if the requested data block containing that address is already in the buffer pool. If yes, there is no I/O; otherwise, the data block is brought into an empty data block of the buffer pool from the disk, causing one I/O. However, if the buffer pool is full and the requested data block is not in buffer block, then one of the three block replacement algorithms (i.e., FIFO, LRU, and LFU) will be used to evict one of the existing data blocks in the buffer pool, so the requested data block can be brought into the buffer pool from the disk. For each write access, your program checks if the data block containing that address is in the buffer pool. If yes, then there is no I/O, and the block is marked dirty (which means the block is updated and needs to be written back to the disk). Otherwise, the data block is brought into an empty data block of the buffer pool from the disk, causing one I/O, and the block is then marked dirty. However, if the buffer pool is full and the newly requested data block is not in the buffer
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Please help with a solution
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY