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