Electrical computers and digital processing systems: memory – Storage accessing and control – Specific memory composition
Reexamination Certificate
2001-03-01
2004-07-20
Moazzami, Nasser (Department: 2187)
Electrical computers and digital processing systems: memory
Storage accessing and control
Specific memory composition
C711S129000, C711S133000
Reexamination Certificate
active
06766413
ABSTRACT:
FIELD OF THE INVENTION
The present invention relates to implementing improved disk caching strategies in a computer. In particular, the present invention relates to a method for designating files as memory-resident, transient, or neither memory resident nor transient and appropriately caching the disk blocks associated with a designated file.
BACKGROUND OF THE INVENTION
When operating, computers typically utilize three types of memory. Persistent memories that are not based on optical or magnetic media, e.g., EEPROM or Flash ROM, store the Basic Input/Output System (BIOS), boot parameters, and other startup routines. A volatile memory such as RAMBUS dynamic RAM (RDRAM) or synchronous dynamic RAM (SDRAM) stores data and programs presently in use, e.g., the operating system. A persistent memory typically using optical or magnetic media stores data and programs that are not presently in use.
The differences between the technologies implementing the different memory types offer advantages and disadvantages. Memories based on optical or magnetic media retain information in the absence of electrical power. Volatile memories like SDRAM require electrical power to retain information, but typically offer faster access times. Persistent ROM memories offer faster access times and retain information in the absence of electrical power, but have limited storage capacity and operate mostly as read-only devices.
Recognizing the different advantages offered by different memory types, operating system designers have developed various techniques to permit software applications to achieve fast access to data while maintaining copies of the data that will survive the removal of electrical power. One family of techniques is called “disk caching.” Disk caching attempts to retain certain selected data in volatile memory while storing other data in a persistent storage device. Since volatile memory for caching is typically limited in size relative to the memory available in a persistent storage device, designers of disk caching algorithms must decide which data to cache and which data to store in slower, persistent memory.
Some prior art computer systems address this problem by implementing RAM disk functionality. Referring to
FIG. 1
, a typical prior art computer system
10
includes a microprocessor
12
, a-memory
14
, and an input/output (I/O) controller
16
connected by a system bus
18
. The system bus
18
permits one or more of these interconnected components to communicate through the exchange of data. For example, the microprocessor
12
may send read or write requests to the memory
14
or the I/O controller
16
.
The memory
14
in a prior art computer
10
itself typically includes three types of memory. RAM
20
stores data and programs presently in use. Programs can be a user application
36
, an operating system
26
, or a device driver such as a disk driver
28
. ROM
22
stores the BIOS
30
and other boot routines. The mass storage device
32
provides a persistent memory typically using optical or magnetic media.
Performance-critical applications using large amounts of data, such as database systems, store data on mass storage device
32
. However, mass storage device
32
typically has slower access times than RAM
20
. Therefore, a performance-critical application should use as much RAM
20
storage as possible. Purchasing and installing a solid-state mass storage device (not shown) will also result in a performance gain, but these devices tend to be expensive and have access times inferior to RAM
20
storage.
Typically, a performance-critical application is designed and coded to use RAM
20
storage. However, an operating system
26
using a virtual memory system to redirect memory operations from RAM
20
to mass storage
32
will redirect the read and write transactions from the application, hindering its performance. A virtual memory system can be bypassed by using a RAM disk scheme, setting aside a portion of RAM
20
for use as a virtual disk volume. User applications
36
interact with the RAM disk
34
as if it were a disk volume on a mass storage device
32
, but having significantly improved access times. Using a RAM disk scheme ensures that performance-critical applications access RAM
20
without undertaking special programming measures.
The RAM disk approach has drawbacks. For example, in some RAM disk implementations, disk blocks stored in the RAM disk
34
are duplicated in the disk cache
24
. This unnecessary duplication wastes space in RAM
20
and potentially saturates cache
24
, further hindering accesses to files in mass-storage
32
. Moreover, RAM disks have volume-level granularity: all the files on the virtual volume must be stored in RAM disk
34
. It is generally not possible to set the attributes of individual files to ensure they stay in RAM
20
, while marking other files for storage in mass storage
32
. Therefore, it is desirable to provide functionality to designate individual files to ensure that they are encached in RAM
20
or stored in mass storage
32
.
SUMMARY OF THE INVENTION
The present invention relates to the problem of disk caching for improved access to data files. One object of the invention is to provide methods for caching disk blocks on a per-file basis. Another object of the invention is to permit individual users or software applications to designate files as memory-resident or transient. Yet another object of the invention is to provide a programmed computer that can cache disk blocks on a per-file basis.
In one aspect, the present invention is a method for improved access to data files. First, a portion of volatile memory is designated for use as a cache memory. After the cache is established, files are designated as memory-resident. Data blocks and index blocks associated with memory-resident files are maintained in the cache memory. In one embodiment, a file can be designated memory-resident while it is in use by a software application. In another embodiment, the memory-resident state of the file can be set by a user or by a software application. In yet another embodiment, maintaining blocks associated with memory-resident files in cache memory includes the steps of accessing a data block or an index block associated with a memory-resident file and storing the contents of the block in the cache memory. In one embodiment, the volatile memory for the cache is random-access memory (RAM). In another embodiment, the memory-resident cache is a sub-cache of a designated cache memory. In yet another embodiment, users or software applications can modify the size of the memory-resident cache. In one embodiment, it is possible to set a maximum size for the memory-resident cache, and disk blocks are removed from the cache when the maximum size is exceeded. In another embodiment, it is possible to designate a memory-resident file as not memory-resident, and data blocks and index blocks associated with the file are subsequently subject to default caching methods, making them more likely to be removed from cache memory when demand exceeds capacity.
In another aspect, the present invention is a method for improved access to data files. First, a portion of volatile memory is designated for use as a cache memory. After the cache is established, files are designated transient. Data blocks and index blocks corresponding to transient files are maintained in cache memory for a nominal duration. In one embodiment, blocks associated with transient files are not written to mass storage until the passage of the nominal period of time, whereupon they are written and subsequently removed from cache memory. In another embodiment, a file can be designated transient while being accessed by a software application. In yet another embodiment, a user or software application can designate a file as transient. In one embodiment, the volatile memory for the cache is random-access memory (RAM). In another embodiment, it is possible to designate a transient file as not transient, and data blocks and index blocks associated with the file are subsequently subject
Moazzami Nasser
Stratus Technologies Bermuda Ltd.
Testa Hurwitz & Thibeault LLP
LandOfFree
Systems and methods for caching with file-level granularity does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Systems and methods for caching with file-level granularity, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Systems and methods for caching with file-level granularity will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3218337