Method for memory allocation in a disk drive employing a chunk array and identifying a first available element for write caching
AssigneeWestern Digital Corporation
InventorsDaniel John Sokolov, Jeffrey L. Williams
Life of this patent
Estimating the term…
Abstract
The disk drive provides a method of adaptively managing a cache segment divided into chunks by defining an unavailable data type to be stored in an element of a chunk array which indicates that the chunk is not available, and defining an available data type to be stored in an element of the chunk array that indicates the chunk is available and that indicates the number of consecutive chunks that are available. The disk drive also computes a number of chunks needed to fit the request length and scans the chunk array to find a first available element whose available data type meets a predetermined criteria for the number of chunks needed to fit the request length.
Claims15
In a disk drive having a buffer memory and means for connecting to a host computer, wherein the buffer memory is logically divided into a plurality of segments, and wherein the disk drive has a data structure means for indicating that a segment is chunked and for indicating that a segment is unchunked, wherein a segment that is designated to be chunked is logically divided into N chunks where N is an integer, and the disk drive further having a chunk array having N elements where each element is associated with a respective one of the chunks of the segment designated to be chunked, a method of allocating portions of the buffer memory, the method comprising the steps of:
- a) defining an unavailable data type to be stored in an element of the chunk array which indicates that the chunk is not available;
- b) defining an available data type to be stored in an element of the chunk array that indicates the chunk is available and that indicates the number of consecutive that are available;
- c) receiving a data transfer request with a request length;
- and
- d) determining if the request length is less than a predetermined amount;
- computing a number of chunks needed to fit the request length;
- scanning the chunk array to find a first available element whose available data type is equal to or greater than the number of chunks needed to fit the request length;
- and, starting from the first available element, writing the unavailable data type to a consecutive number of chunk array elements needed to fit the request length.
Dependencies are inferred from the claim text.