Cache system adopting an LRU system, and magnetic disk controller incorporating it
First Claim
1. A cache system employing an LRU (Least Recently Used) scheme in a replacement algorithm of cache blocks, comprising:
- a cache memory for storing a plurality of cache blocks;
a directory memory having fields storing, in respective entries corresponding to respective cache blocks of said cache memory, block designation information for blocks stored in said cache memory and having LRU counter fields indicating resident status in said cache memory of these blocks;
command issuing means for issuing a read/write command to which an arbitrary LRU setting value and designation information for a read/write target block are appended;
directory search means for searching whether the read/write target block is stored in said cache memory by comparing the stored block designation information of respective entries with the read/write designation information and for indicating a hit when the read/write target block is found to be stored in the cache memory and a cache miss hit when the read/write target block is not found to be stored in the cache memory; and
storing means for storing the arbitrary LRV setting value in the arbitrary LRU counter field of said directory memory corresponding to the cache block which has been hit when a hit occurs, and for storing the arbitrary LRU setting value in the LRU counter field in the directory memory corresponding to the cache block in which the read/write target block is stored by the storing means when a miss hit occurs.
1 Assignment
0 Petitions
Accused Products
Abstract
A cache system employing an LRU (Least Recently Used) scheme in a replacement algorithm of cache blocks and comprising a directory memory whose entires have LRU counter fields, a host system issuing a read/write command to which an arbitrary LRU setting value is appended, a directory search circuit, and a microprocessor. The directory search circuit searches the directory memory in response to the read/write command issued from the host system. The microprocessor stores the LRU setting value appended to the read/write command in the LRU counter field of the hit entry of the directory memory or of the entry corresponding to the replacement target cache block, in response to the search result of the directory search circuit.
55 Citations
15 Claims
-
1. A cache system employing an LRU (Least Recently Used) scheme in a replacement algorithm of cache blocks, comprising:
-
a cache memory for storing a plurality of cache blocks; a directory memory having fields storing, in respective entries corresponding to respective cache blocks of said cache memory, block designation information for blocks stored in said cache memory and having LRU counter fields indicating resident status in said cache memory of these blocks; command issuing means for issuing a read/write command to which an arbitrary LRU setting value and designation information for a read/write target block are appended; directory search means for searching whether the read/write target block is stored in said cache memory by comparing the stored block designation information of respective entries with the read/write designation information and for indicating a hit when the read/write target block is found to be stored in the cache memory and a cache miss hit when the read/write target block is not found to be stored in the cache memory; and storing means for storing the arbitrary LRV setting value in the arbitrary LRU counter field of said directory memory corresponding to the cache block which has been hit when a hit occurs, and for storing the arbitrary LRU setting value in the LRU counter field in the directory memory corresponding to the cache block in which the read/write target block is stored by the storing means when a miss hit occurs. - View Dependent Claims (2, 3)
-
-
4. A cache system attached to a host system, said cache system having a cache memory in a disk controller, said cache memory being adapted to store part of a copy of the data of a disk unit in a plurality of cache blocks, the cache system comprising:
-
a directory memory including, in an entry corresponding to each of the cache blocks in the cache memory, a field for storing specified data of a disk block stored in the cache memory, and a field for storing data representing incompletion of write data specified by the host system on said disk unit; directory search means for searching whether a write target disk block is stored in said cache memory by comparing the stored disk block specified data in each entry of said directory memory with the write target disk block specifying data, in response to a disk write instruction having data specifying the write target disk block from the host system and for indicating a hit when the write target disk block is determined to be stored in the cache memory and for indicating a miss hit when the write target disk block is determined to not be stored in the cache memory; and write instruction execution control means for, if a cache hit is indicated and an instructed from said host system is the specified disk write instruction, accessing said directory memory to determine if the number of entries whose incompletion of write data storing fields are set exceeds a predetermine number, and when the number of entries is smaller than the predetermined number, inhibiting writing of the write data in said disk unit, writing the write data specified by the write instruction in a corresponding block in said cache memory, and setting the incompletion of write data storing field of the entry in said directory memory. - View Dependent Claims (5, 6, 7, 8)
-
-
9. A disk cache system having a cache memory with a plurality of cache blocks in a disk controller, said cache memory being adapted to store part of a copy of the data of a disk, comprising:
-
a directory memory including, in an entry corresponding to each of the cache blocks in said cache memory, a field for storing specified data of a disk data block stored in said cache memory, a field for storing data representing incompletion of write data specified by a host system on said disk unit, and a field for storing data for inhibiting replacement of a disk data block specified by a host system; directory search means for searching whether a read target disk block is stored in said cache memory by comparing the stored disk block specified data in each entry of said directory memory with the write target disk block specifying data, in response to a disk read instruction having data specifying the read target disk block from said host system, and for indicating a hit when the read target disk block is determined to be stored in the cache memory and for indicating a miss hit when the read target disk block is determined to not be stored in the cache memory; and read instruction execution control means for, if a cache miss hit is indicated by said directory search means and an instruction from said host system is a disk read instruction, accessing said directory memory to determine an entry to be replaced among the entries whose replacement inhibiting data storing fields are reset, writing, if the incompletion of write data storing field of said entry to be replaced is set, data of the corresponding block in said cache memory in said disk unit and thereafter writing the read data in the corresponding block and transferring the read data to said host system, resetting the incompletion of write data storing field of the entry to be replaced, and setting/resetting the replacement inhibiting data storing field in response to the read instruction. - View Dependent Claims (10)
-
-
11. A disk cache system having a cache memory in a disk controller, said cache memory being adapted to store part of a copy of the disk data blocks of a disk unit in a plurality of cache blocks, comprising:
-
a directory memory including, in an entry corresponding to each of the cache blocks in said cache memory, a field for storing specified data of a disk block stored in said cache memory, a field for storing data representing incompletion of write data specified by a host system on said disk unit, and a field for storing data for inhibiting replacement of a disk data block specified by a host system; directory search means for searching whether a read/write target disk block is stored in said cache memory by comparing the stored disk data block specified data in each entry of said directory memory with the read/write target disk block specifying data, in response to a disk write instruction or a disk read instruction from said host system, and for indicating a hit when the read/write target disk block is determined to be stored in the cache memory and for indicating a miss hit when the read/write target disk block is determined to not be stored in the cache memory; and write instruction execution control means for, if the cache hit is indicated and an instruction from said host system is an instruction for specifying withholding of writing data into said disk, accessing said directory memory to determine if the number of entries whose incompletion of write data storing fields are set exceeds a predetermined number, and when the number of entries is smaller than the predetermined number, withholding writing of the write data in said disk unit, writing the write data specified by the write instruction in a corresponding block in said cache memory, and setting the incompletion of write data storing field of the entry in said directory memory; and read instruction execution control means for, if a cache miss hit is indicated by said directory search means and an instruction from said host system is a disk read instruction, accessing said directory memory to determine an entry to be replaced among the entries whose replacement inhibiting data storing fields are reset, writing, if the incompletion of write data storing field of said entry to be replaced is set, data of the corresponding block in said cache memory in said disk unit and thereafter writing the read data in the corresponding block and transferring the read data to said host system, resetting the incompletion of write data storing field, and setting/resetting the replacement inhibiting data storing field in response to the read instruction. - View Dependent Claims (12, 13, 14, 15)
-
Specification