Disk Design Considerations

Several design issues are of interest. Disk should bethe stack. It is not necessary to move these blocks
designed according to the memory and performancearound in main memory.
requirements.Another possibility is the least frequently associated
First, when an I/O request is satisfied from the diskused (LFU) algorithm, in which that block in the cache
cache, the data in the disk cache must be delivered tothat has experienced the fewest references is
the requesting process. Delivery can be made eitherreplaced. LFU could be implemented by associating a
by transferring the block of data within main memorycounter with each block. When a block is brought in, it
from the disk cache to memory assigned to the useris assigned a count of 1 and subsequently it is
process, or simply by using a shared memoryincremented by 1. When replacement is required, the
capability and passing a pointer to the appropriate slotblock with the smallest count is selected. Intuitively, it
in the disk cache. The latter approach saves the timemight seem the LFU is more appropriate than LRU
of a memory to memory transfer and also allowsbecause 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 replacementQuick Note: Taking the Nonsense out of looking for the
strategy. When a new sector is brought into the diskright spyware remover
cache, one of the existing blocks must be replaced. AIf you really want to take the work out of looking for
number of algorithms have been tried. The mostthat 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, inSearch and Destroy
which the block that has been in the cache longestDownload, In order to prevent your vital information
with no reference to it is replaced. Logically, the cachefrom being ripped from your computer get your
consists of a stack of blocks, with the most recentlySpybot Remover Today.
referenced block being on the top of the stack. WhenA simple LFU algorithm has the following problem. It
a block in the cache is referenced, it is moved from itsmay 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 secondarythere are short intervals of repeated re-references
memory, the block that is on the bottom of the stackdue to locality, thus building up high reference counts in
is removed, pushing the incoming block onto the top ofan interval.