| Several design issues are of interest. Disk should be | | | | the stack. It is not necessary to move these blocks |
| designed according to the memory and performance | | | | around in main memory. |
| requirements. | | | | Another possibility is the least frequently associated |
| First, when an I/O request is satisfied from the disk | | | | used (LFU) algorithm, in which that block in the cache |
| cache, the data in the disk cache must be delivered to | | | | that has experienced the fewest references is |
| the requesting process. Delivery can be made either | | | | replaced. LFU could be implemented by associating a |
| by transferring the block of data within main memory | | | | counter with each block. When a block is brought in, it |
| from the disk cache to memory assigned to the user | | | | is assigned a count of 1 and subsequently it is |
| process, or simply by using a shared memory | | | | incremented by 1. When replacement is required, the |
| capability and passing a pointer to the appropriate slot | | | | block with the smallest count is selected. Intuitively, it |
| in the disk cache. The latter approach saves the time | | | | might seem the LFU is more appropriate than LRU |
| of a memory to memory transfer and also allows | | | | because more information about each block is used in |
| shared access by other processes. | | | | the selection process. |
| A second design issue has to do with the replacement | | | | Quick Note: Taking the Nonsense out of looking for the |
| strategy. When a new sector is brought into the disk | | | | right spyware remover |
| cache, one of the existing blocks must be replaced. A | | | | If you really want to take the work out of looking for |
| number of algorithms have been tried. The most | | | | that right Spyware Protection from a Spybot go to the |
| commonly used algorithm is the recently used (LRU) | | | | Internet and get a Free Spybot or a Free Spybot |
| algorithm, in which the commonly used algorithm, in | | | | Search and Destroy |
| which the block that has been in the cache longest | | | | Download, In order to prevent your vital information |
| with no reference to it is replaced. Logically, the cache | | | | from being ripped from your computer get your |
| consists of a stack of blocks, with the most recently | | | | Spybot Remover Today. |
| referenced block being on the top of the stack. When | | | | A simple LFU algorithm has the following problem. It |
| a block in the cache is referenced, it is moved from its | | | | may be that certain blocks are referenced relatively |
| existing position on the stack to the top of the stack. | | | | infrequently overall, but when they are referenced |
| When a block is brought in from the secondary | | | | there are short intervals of repeated re-references |
| memory, the block that is on the bottom of the stack | | | | due to locality, thus building up high reference counts in |
| is removed, pushing the incoming block onto the top of | | | | an interval. |