1
CS 3303 Discussion Unit 7
Section 1
Question 1
FIFO is the heuristic used, which is observed when the algorithm first pushed out the elements in the
pool longer with new elements being placed into the buffer pool. A queue system orders the buffer
values. Novel information stored by the front buffer is pushed to the end with the buffer with the
most extended stay being substituted (Shaffer, 2011).
Question 2
Frequently accessed elements form the setting that makes the heuristic less effective. Conversely,
the heuristic condition increases in efficiency when file processing occurs sequentially. Considering
the provided information, the heuristic is ineffective since value 5 has been utilized frequently, with
polling data sequential proving not to be the suitable method.
Question 3
A setting that makes the heuristic efficient is where there is no repetition of pages; the passed page
is permanent. A second setting would be utilizing read-ahead capability. Here, page information is
analyzed ahead prior to buffer pool loading. The effect of this is that frequent information is
rearranged, followed by processing at the same period reducing the need for buffer pool page
swapping
Section 2
Question 1
LRU forms the heuristic used with instructions not executed for the most extended period replaced.
Confusion arises between FIFO and LRU. However, the cache least used recently has its basis on the
object least recently used, whereas FIFO has its basis on the caching time of an object.
2
Question 2
Looking at the heuristic from the example, it can be concluded that it is not efficient since the value
5 is eliminated from the buffer pool despite it being the element frequently utilized. In the final case,
5 formed the element that was not recently used and discarded. 2,3,2,3,12 would be the page size
making the heuristic efficient. The frequently used value is 2, with the usage cycle interval being 1,
enabling the algorithm not to swap 2 into memory from the buffer pool of having it discarded.
Section 3
Question 1
LFU is the heuristic used. It has been observed that a counter racks the buffer pool use frequency
and the potential of replacing the buffer pool with the lowest count buffer pool being selected.
Question 2
The first element in the buffer pool is used in solving the problem in such a case. To sum it up, it uses
the LRU approach, with the least recently used element being replaced. Thus, it can be said to
behave similarly to the LRU heuristic.
Question 3
A count of 1 is raised every time the repeating value is encountered and still existing in the buffer
pool for each repeat. The value that stays the longest in the buffer pool is the one with the highest
count.
3
References
Shaffer, C. A. (2011). Data structures & algorithm analysis in Java. Courier Corporation.