U.S. patent application number 11/198177 was filed with the patent office on 2006-10-12 for hard disk drive with optional cache memory.
This patent application is currently assigned to M-SYSTEMS FLASH DISK PIONEERS, LTD.. Invention is credited to Avraham Meir, Yoram Zylberberg.
Application Number | 20060230226 11/198177 |
Document ID | / |
Family ID | 37084393 |
Filed Date | 2006-10-12 |
United States Patent
Application |
20060230226 |
Kind Code |
A1 |
Meir; Avraham ; et
al. |
October 12, 2006 |
Hard disk drive with optional cache memory
Abstract
A computer system includes a hard disk drive and an interface
for optionally operationally connecting a cache memory for the hard
disk drive, via a mechanism such as a system bus that is separate
from the hard disk drive or directly to a controller of the hard
disk drive. A hard disk drive of the present invention includes a
nonvolatile medium for storing data, a controller for reading and
writing the data and an interface for optionally operationally
connecting to the controller a cache memory for the nonvolatile
medium. Whether data are cached depends on whether the cache memory
is present. Computer systems of the present invention are
configured with or without cache memories, depending on customer
requirements.
Inventors: |
Meir; Avraham; (Rishon
Lesion, IL) ; Zylberberg; Yoram; (Tel Aviv,
IL) |
Correspondence
Address: |
DR. MARK FRIEDMAN LTD.;c/o Bill Polkinghorn
9003 Florin Way
Upper Marlboro
MD
20772
US
|
Assignee: |
M-SYSTEMS FLASH DISK PIONEERS,
LTD.
|
Family ID: |
37084393 |
Appl. No.: |
11/198177 |
Filed: |
August 8, 2005 |
Related U.S. Patent Documents
|
|
|
|
|
|
Application
Number |
Filing Date |
Patent Number |
|
|
60670594 |
Apr 12, 2005 |
|
|
|
Current U.S.
Class: |
711/113 ;
711/E12.019 |
Current CPC
Class: |
G06F 2212/601 20130101;
G06F 12/0873 20130101 |
Class at
Publication: |
711/113 |
International
Class: |
G06F 13/00 20060101
G06F013/00 |
Claims
1. A computer system comprising: (a) a hard disk drive; and (b) an
interface for optionally operationally connecting, to the computer
system, a cache memory for said hard disk drive.
2. The computer system of claim 1, wherein said interface is for
reversibly operationally connecting said cache memory to the
computer system.
3. The computer system of claim 1, wherein said cache memory is a
volatile memory.
4. The computer system of claim 1, wherein said cache memory is a
non-volatile memory.
5. The computer system of claim 4, wherein said cache memory is a
flash memory.
6. The computer system of claim 1, further comprising: (c) a
mechanism, separate from said hard disk drive, for operationally
connecting said hard disk drive to said interface.
7. The computer system of claim 6, wherein said mechanism includes
a system bus.
8. The computer system of claim 6, further comprising: (d) an
operating system for using said cache memory to cache data that are
to be written to said hard disk drive.
9. The computer system of claim 8, wherein said operating system
uses said cache memory only to cache said data.
10. The computer system of claim 1, wherein said hard disk drive
includes a controller, and wherein said interface is directly
operationally connected to said controller.
11. A hard disk drive comprising: (a) a nonvolatile medium for
storing data; (b) a controller for writing said data to said
nonvolatile medium and for reading said data from said nonvolatile
medium; and (c) an interface for optionally operationally
connecting, to said controller, a cache memory for said nonvolatile
medium.
12. The hard disk drive of claim 11, wherein said nonvolatile
medium is a magnetic medium.
13. The hard disk drive of claim 12, further comprising: (d) an
electromechanical mechanism that is used by said controller for
writing said data to said magnetic medium and for reading said data
from said magnetic medium.
14. The hard disk drive of claim 13, wherein said electromagnetic
mechanism provides said controller random access to said magnetic
medium.
15. The hard disk drive of claim 11, wherein said nonvolatile
medium is an optical medium.
16. The hard disk drive of claim 11, wherein said interface is for
reversibly operationally connecting said cache memory to said
controller.
17. The hard disk drive of claim 11, wherein said cache memory is a
volatile memory.
18. The hard disk drive of claim 11, wherein said cache memory is a
non-volatile memory.
19. The hard disk drive of claim 18, wherein said cache memory is a
flash memory.
20. A method of operating a hard disk drive that includes a
nonvolatile data storage medium, comprising the steps of: (a)
providing an interface for optionally operationally associating a
cache memory with the hard disk drive; and (b) in exchanging data
with the hard disk drive, determining whether said cache memory is
operationally associated with the hard disk drive.
21. The method of claim 20, further comprising the step of: (c) in
writing said data to the hard disk drive, if said cache memory is
operationally associated with the hard disk drive: (i) if said
cache memory is full: (A) copying contents of said cache memory to
the nonvolatile data storage medium, and (B) writing said data to
the nonvolatile data storage medium; and (ii) otherwise: writing
said data to said cache memory.
22. The method of claim 20, further comprising the step of: (c) in
reading data from the hard disk drive, if said cache memory is
operationally associated with the hard disk drive: (i) determining
whether said data reside in said cache memory, (ii) if said data
reside in said cache memory: reading said data from said cache
memory, and (iii) otherwise: reading said data from the nonvolatile
data storage medium.
23. A method of producing computer systems, comprising the steps
of: (a) providing each computer system with a respective hard disk
drive; (b) providing each computer system with a respective
interface for optionally operationally connecting, to said each
computer system, a cache memory for said respective hard disk drive
of said each computer system; and (c) in configuring each computer
system for delivery to a respective customer, deciding whether to
operationally connect said cache memory to said each computer
system at said respective interface of said each computer
system.
24. The method of claim 23, further comprising the step of: (d)
providing each computer system with a respective mechanism,
separate from said respective hard disk drive, for operationally
connecting said respective hard disk drive to said respective
interface.
25. The method of claim 23, wherein each said hard disk drive
includes a controller, and wherein, in each computer system, said
respective interface of said each computer system is directly
operationally connected to said controller of said respective hard
disk drive of said each computer system.
26. The method of claim 23, wherein said cache memories are
volatile memories.
27. The method of claim 23, wherein said cache memories are
non-volatile memories.
28. The method of claim 27, wherein said cache memories are flash
memories.
29. A computer-readable storage medium having computer-readable
code embodied on said computer-readable storage medium, the
computer-readable code for exchanging data with a hard disk drive
in a computer system that includes an interface for optionally
operationally connecting, to the computer system, a cache memory
for the hard disk drive, the hard disk drive including a
nonvolatile data storage medium, the computer-readable code
comprising: (a) program code for determining whether the cache
memory is operationally connected to the computer system; and (b)
program code for, if the cache memory is operationally connected to
the computer system, then, in writing the data to the hard disk
drive: (i) if the cache memory is full: (A) copying contents of the
cache memory to the nonvolatile data storage medium, and (B)
writing the data to the nonvolatile data storage medium, and (ii)
otherwise, writing the data to the cache memory.
30. The computer-readable storage medium of claim 29, further
comprising: (c) program code for, if the cache memory is
operationally connected to the computer system, then, in reading
the data from the hard disk drive: (i) determining whether the data
reside in the cache memory; (ii) if the data reside in the cache
memory: reading the data from the cache memory; (iii) otherwise,
reading the data from the nonvolatile data storage medium.
Description
This patent application claims the benefit of U.S. Provisional
Patent Application No. 60/670,594, filed Apr. 12, 2005
FIELD AND BACKGROUND OF THE INVENTION
[0001] The present invention relates to data storage devices and,
more particularly, to a hard disk drive with an optional cache
memory.
[0002] Almost every modern electronic system needs a storage
device. One of the most popular storage devices is the hard disk
drive. Hard disk drives typically are used as mass storage devices
in systems such as personal computers, media players, set-top boxes
and many other systems.
[0003] The main advantage of hard disk drives over other
non-volatile data storage devices such as flash memories is their
cost efficiency per bit of stored data. One of the limitations of
hard disk drives, particularly with regard to their use in portable
devices, is their relatively high power consumption. Among the
portable devices that usually include hard disk drives are laptop
computers, portable media players and GPS receivers. Such devices
typically are powered by rechargeable batteries. A major constraint
on such devices is the time that they can operate on a single
battery charge. It therefore is important to design components of
these systems, notably the hard disk drives of these systems, that
are major consumers of power, to be economical in their use of
power.
[0004] One of the known methods for minimizing the power
consumption of a hard disk drive is the inclusion in the hard disk
drive of an auxiliary memory such as a flash memory that is used as
a data cache. FIG. 1 is a high-level schematic block diagram of a
prior art hard disk drive (HDD) 10 that uses a flash memory 12 as a
cache memory. The data recording medium of HDD 10 is a magnetic
recording medium 14 on a disk-like platter 16. A controller 18
writes to magnetic medium 14 and reads from magnetic medium 14
using an electromechanical mechanism that includes a motor 20 for
spinning platter 16, a read-write head 24 for reading and writing
data bits at arbitrarily selected locations on platter 16 and an
arm 22 for moving read-write head 24 to those locations. Cache
memory 12 is used to limit the number of accesses to HDD 10 by its
host device in which motor 20 is powered up. Limiting these
accesses reduces the power consumption of HDD 10 and also increases
the reliability of the overall system, for two reasons. First,
read-write head 24 is parked for a larger portion of the time and
so is the likelihood of platter 16 being damaged as a consequence
of rough handling is decreased. Second, flash memory 12, having no
moving parts, typically is more reliable than magnetic medium 14 as
a data storage medium, reducing the chance of data loss in case of
system failure.
[0005] The degrees of freedom available to the designer of a system
that includes HDD 10 include:
[0006] 1. Physical location: whether cache memory 12 is physically
part of HDD 10 or is elsewhere in the host system, for example on
the motherboard of the host system.
[0007] 2. Cache management responsibility: whether caching is
managed by the host's operating system or by controller 18.
[0008] 3. Caching medium: volatile (e.g., DRAM) vs. non-volatile
(e.g. flash)
[0009] A typical method of HDD cache management is as follows: When
HDD 10 receives data to store as a consequence of a write operation
by the host of HDD 10, controller 18 writes the data to cache
memory 12. When cache memory 12 is full, controller 18 transfers
the data to magnetic medium 14 of platter 16. This method of
operating HDD 10 saves substantially in power consumption. How much
power is saved, vs. always writing to platter 16, is a function of
the number of write accesses and the size of cache memory 12.
Calculations for typical laptop computers (HDD capacity around 60
GB, flash memory capacity around 64-128 MB) show that the amount of
data written per hour to cache memory 12 is a tiny fraction of the
capacity of a typical platter 16. Using a relatively small cache
memory 12 can give a 20%-30% reduction in power consumption in a
typical consumer device.
[0010] The trade-off in such caching is between the additional cost
of cache memory 12 vs. the power saved. This is an important
limitation, as hard disk drives have become a standard commodity
that is used in a wide variety of applications. However, in some
applications, low cost is a more important constraint than low
power consumption; in other applications, low power consumption is
a more important constraint than low cost; and in yet other
applications, both constraints are important. The exact fine tuning
between cost and power thus varies from one application to another,
and can even vary from one user to another.
[0011] There is thus a widely recognized need for, and it would be
highly advantageous to have, a commodity hard disk drive that can
be adapted easily to the cost and power constraints of a wide
variety of applications.
SUMMARY OF THE INVENTION
[0012] According to the present invention there is provided a
computer system including: (a) a hard disk drive; and (b) an
interface for optionally operationally connecting, to the computer
system, a cache memory for the hard disk drive.
[0013] According to the present invention there is provided a hard
disk drive including: (a) a nonvolatile medium for storing data;
(b) a controller for writing the data to the nonvolatile medium and
for reading the data from the nonvolatile medium; and (c) an
interface for optionally operationally connecting, to the
controller, a cache memory for the nonvolatile medium.
[0014] According to the present invention there is provided a
method of operating a hard disk drive that includes a nonvolatile
data storage medium, including the steps of: (a) providing an
interface for optionally operationally associating a cache memory
with the hard disk drive; and (b) in exchanging data with the hard
disk drive, determining whether the cache memory is operationally
associated with the hard disk drive.
[0015] According to the present invention there is provided a
method of producing computer systems, including the steps of: (a)
providing each computer system with a respective hard disk drive;
(b) providing each computer system with a respective interface for
optionally operationally connecting, to the each computer system, a
cache memory for the respective hard disk drive of the each
computer system; and (c) in configuring each computer system for
delivery to a respective customer, deciding whether to
operationally connect the cache memory to the each computer system
at the respective interface of the each computer system.
[0016] According to the present invention there is provided a
computer-readable storage medium having computer-readable code
embodied on the computer-readable storage medium, the
computer-readable code for exchanging data with a hard disk drive
in a computer system that includes an interface for optionally
operationally connecting, to the computer system, a cache memory
for the hard disk drive, the hard disk drive including a
nonvolatile data storage medium, the computer-readable code
including: (a) program code for determining whether the cache
memory is operationally connected to the computer system; and (b)
program code for, if the cache memory is operationally connected to
the computer system, then, in writing the data to the hard disk
drive: (i) if the cache memory is full: (A) copying contents of the
cache memory to the nonvolatile data storage medium, and (B)
writing the data to the nonvolatile data storage medium, and (ii)
otherwise, writing the data to the cache memory.
[0017] A computer system of the present invention includes a hard
disk drive and an interface for optionally operationally
connecting, to the computer system, a cache memory for the hard
drive. That the connection of the cache memory to the computer
system is "optional" means that the computer system is fully
operational even without the cache memory. The cache memory, if
present, merely enhances the operation of the computer system, for
example by conserving power.
[0018] Preferably, the interface is for reversibly operationally
connecting the cache memory to the computer system.
[0019] In one variant of the computer system of the present
invention, the computer system includes a mechanism, such as a
system bus, that is separate from the hard disk drive and that is
for operationally connecting the hard disk drive to the interface.
Preferably, such a computer system also includes an operating
system for using the cache memory to cache data that are to be
written to the hard disk drive. Most preferably, such caching is
the only purpose for which the operating system uses the cache
memory. Note that using the cache memory "only" for caching data to
be written to the hard disk drive does not preclude reading, from
the cache memory, data that are waiting to be transferred to the
hard disk drive.
[0020] In another variant of the computer system, the hard disk
drive includes a controller, and the interface is directly
operationally connected to the controller.
[0021] A hard disk drive of the present invention includes a
nonvolatile (e.g., magnetic or optical) medium for storing data, a
controller for writing the data to the nonvolatile medium and for
reading the data from the nonvolatile medium, and an interface for
optionally operationally connecting, to the controller, a cache
memory for the nonvolatile medium. That the connection of the cache
memory to the controller is "optional" means that the hard disk
drive is fully operational even without the cache memory. The cache
memory, if present, merely enhances the operation of the hard disk
drive, for example by conserving power.
[0022] Preferably, if the nonvolatile medium is a magnetic medium,
then the hard disk drive includes an electromechanical mechanism
that the controller uses to write the data to the magnetic medium
and to read the data from the magnetic medium. Most preferably, the
electromechanical mechanism provides the controller with random
access to the magnetic medium.
[0023] Although the scope of the present invention, in the case of
both the computer system and the hard disk drive, includes volatile
cache memories, it is preferred that the cache memory be
non-volatile, for example a flash memory.
[0024] The scope of the present invention also includes a method of
operating a hard disk drive that includes a nonvolatile data
storage medium. An interface is provided for optionally
operationally associating a cache memory with the hard disk drive.
That the association is "optional" means that the hard disk drive
is fully operational even in the absence of the cache memory. The
cache memory, if present, merely enhances the operation of the hard
disk drive, for example by conserving power. In exchanging data
with the hard disk drive, i.e., in writing data to the hard disk
drive or in reading data from the hard disk drive, it first is
determined whether the cache memory is in fact operationally
associated with the hard disk drive. If the cache memory is in fact
operationally associated with the hard disk drive,
[0025] then:
[0026] In writing new data (i.e., data not yet cached) to the hard
disk drive, if the cache memory is full, meaning that there is no
room in the cache memory to write the new data, the contents of the
cache memory are copied to the nonvolatile data storage medium and
the new data are written to the nonvolatile data storage medium. If
the cache memory is not full, then the data are written to the
cache memory.
[0027] or:
[0028] In reading data from the hard disk drive, it first is
determined whether the data reside in the cache memory. If the data
reside in the cache memory, then the data are read from the cache
memory. If the data do not reside in the cache memory, then the
data are read from the nonvolatile data storage medium.
[0029] The scope of the present invention also includes a method of
producing computer systems. Each computer system is provided with a
respective hard disk drive and with a respective interface for
optionally operationally connecting, to the computer system, a
cache memory for the computer system's hard disk drive. That the
connection of the cache memory to the computer system is "optional"
means that the computer system is fully operational even without
the cache memory. The cache memory, if present, merely enhances the
operation of the computer system, for example by conserving power.
Finally, in configuring each computer system for delivery to a
customer thereof, it is decided whether to actually operationally
connect a cache memory for the computer system's hard disk drive to
the computer system's interface. Whether the computer system is
delivered to the customer with or without a cache memory for the
hard disk drive operationally connected to the computer system
depends on the customer's requirements.
[0030] Preferably, each computer system is provided with its own
mechanism, separate from its hard disk drive, for operationally
connecting the hard disk drive to the interface. Alternatively,
each hard disk drive includes a controller, and each computer
system's interface is directly operationally connected to the
controller of that computer system's hard disk drive.
[0031] The cache memories could be volatile memories or, preferably
and alternatively, non-volatile memories such as flash
memories.
[0032] The scope of the present invention also includes a
computer-readable storage medium having embodied thereon
computer-readable code for implementing the method of the present
invention for operating a hard disk drive.
[0033] The present invention provides many advantages over the
prior art. Among these advantages are the following:
[0034] A consumer or an original equipment manufacturer can select
how much cache to attach to his/her/its hard disk drive. It is up
to the consumer or to the original equipment manufacturer, rather
than the manufacturer of the hard disk drive, to bear the cost of
cache memory. Omitting the cache memory for a user who does not
need one bears only a small penalty in cost, the cost of the
interface.
[0035] Having to keep on hand only one kind of hard disk drive or
only one kind of computer system simplifies the inventory tasks of
a vendor of hard disk drives and computer systems of the present
invention.
[0036] By purchasing a hard disk drive or a computer system of the
present invention without a cache memory, a customer saves money up
front. The customer is free at any time to invest in an upgrade to
a hard disk drive or a computer system with caching. The customer
is free to exercise this option when prices of cache memories are
low.
[0037] A vendor of a hard disk or computer system of the present
invention adds value to its product at minimal cost and minimal
operational overhead. A vendor can target products of the same
product line separately to customers who need caching and to
customers who do not need caching.
BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The invention is herein described, by way of example only,
with reference to the accompanying drawings, wherein:
[0039] FIG. 1 is a high-level schematic block diagram of a prior
art hard disk drive;
[0040] FIG. 2 is a high-level schematic block diagram of a hard
disk drive of the present invention;
[0041] FIG. 3 is a partial high-level schematic block diagram of a
computer system of the present invention;
[0042] FIG. 4 is a flow chart of writing to a hard disk drive
according to the present invention;
[0043] FIG. 5 is a flow chart of reading from a hard disk drive
according to the present invention.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0044] The present invention is of a hard disk drive and a related
computer system that can be configured easily, per application, to
optimize cost vs. power consumption.
[0045] The principles and operation of a hard disk drive according
to the present invention may be better understood with reference to
the drawings and the accompanying description.
[0046] Although the scope of the present invention extends to hard
disk drives that use any kind of nonvolatile data storage media,
for example optical storage media, the description herein of the
preferred embodiments of the present invention is in terms of a
hard disk drive whose nonvolatile data storage medium is a magnetic
medium such as magnetic medium 14. It will be clear to those
skilled in the art how to apply the principles of the present
invention to other nonvolatile data storage media.
[0047] Referring again to the drawings, FIG. 2 illustrates a hard
disk drive 30 of the present invention. Hard disk drive 30 shares
most of its components with hard disk drive 10. The principal
difference between hard disk drive 10 and hard disk drive 30 is
that instead of a hard-wired cache memory 12, hard disk drive 30
includes an interface 32 for an optional cache memory 34. Interface
32 is a standard interface for reversibly connecting a memory such
as a flash memory to controller 18. For example, in some versions
of HDD 30, interface 32 is a standard USB interface; in other
versions of HDD 30, interface 32 is a slot such as commonly is used
in appliances such as digital cameras and MP3 players for inserting
a flash memory card. Although in principle cache memory 34 need not
be a non-volatile memory, in the overwhelming majority of cases
cache memory 34 is a non-volatile memory such as a flash memory.
Usually, the reversibility of the operational connection between
interface 32 and cache memory 34 is preserved, to allow a user of a
system that includes HDD 30 to swap cache memories 34 (e.g. to
upgrade to a larger cache memory 34) on a per-application basis.
Optionally, cache memory 34 is sealed permanently to interface 32.
For example, an original equipment manufacturer may seal cache
memory 34 permanently to interface 32 of a HDD 30 that the original
equipment manufacturer purchases from a manufacturer of hard disk
drives.
[0048] Interface 32 is adapted to allow controller 18 to sense the
presence and size of cache memory 34. For example, if interface 32
is a USB interface, then when cache memory 34 is connected to
interface 32, or when HDD 30 is powered up, controller 18 conducts
an enumeration process according to the USB standard to determine
whether cache memory 34 is present in interface 32 and, if cache
memory 34 is present in interface 32, what the size of cache memory
34 is. In the absence of cache memory 34, controller 18 always
writes incoming data directly to magnetic medium 14 of platter 16.
If cache memory 34 is present, controller 18 caches incoming data
in cache memory 34, as described above, until cache memory 34 is
full, at which time controller 34 transfers the contents of cache
memory 34 to magnetic medium 14 of platter 16 and erases cache
memory 34.
[0049] HDD 30 of FIG. 2 is a hardware/firmware implementation of
the present invention. FIG. 3 illustrates a software implementation
of the present invention. Specifically, FIG. 3 is a partial
high-level schematic block diagram of a computer system 40 of the
present invention. System 40 includes a processor 42; a RAM 44;
input and output devices such as a keyboard and a display screen,
represented collectively by an I/O block 46; a hard disk drive 56
that is similar to prior art hard disk drive 10 except for lacking
a cache memory; and an interface 48 for optionally reversibly
connecting to system 40 a cache memory 50 that is used for caching
writes to HDD 10. Components 42, 44, 46, 48 and 56 communicate with
each other via a common system bus 52. Among the data stored on HDD
56 is the code of an operating system 54. When system 40 is powered
up, processor 42 downloads the code of operating system 54 to RAM
44 and then executes the code of operating system 54 from RAM 44 to
manage the operation of system 40. HDD 56 thus is an example of a
computer-readable storage medium in which is embedded
computer-readable code for implementing the method of the present
invention. Note that actions described herein as being performed
"by operating system 54" actually are operations that are performed
by processor 42 by executing code of operating system 54.
[0050] Like interface 32, interface 48 is a standard interface for
reversibly connecting a memory such as a flash memory to system 40.
For example, in some versions of system 40, interface 48 is a
standard USB interface; in other versions of system 40, interface
48 is a slot such as commonly is used in appliances such as digital
cameras and MP3 players for inserting a flash memory card. Although
cache memory 50, like cache memory 34, need not be a non-volatile
memory, in the overwhelming majority of cases cache memory 50 is a
non-volatile memory such as a flash memory. As in the case of the
connection between interface 32 and cache memory 34, the
operational connection between interface 48 and cache memory 50
usually is kept reversible.
[0051] Also like interface 32, interface 48 is adapted to allow
processor 42, under the control of operating system 54, to sense
the presence and size of cache memory 50. The code of operating
system 54 includes code for sensing the presence and size of cache
memory 50 when system 40 is powered up. A flag that indicates the
presence or absence of cache memory 50 then is set in a register in
processor 42 or else in RAM 44. If cache memory 50 is present, then
the size of cache memory 50 is recorded in another register in
processor 42 or alternatively in RAM 44. Subsequently, operating
system 54 tests the presence and size of cache memory 50 by
inspecting the flag and the recorded size, rather than by
interrogating interface 48. The code of operating system 54 also
includes code for using cache memory 50 as a cache for HDD 56 if
cache memory 50 is present. In the absence of cache memory 50, when
operating system 54 receives an instruction from an application
program to write data to HDD 56, operating system 54 writes those
data directly to HDD 56. If cache memory 50 is present, then when
operating system 54 receives an instruction from an application
program to write data to HDD 56, operating system 54 instead first
attempts to write the data to cache memory 50. If cache memory 50
is full, then operating system 54 writes the data to HDD 56, copies
the contents of cache memory 50 to HDD 56, and erases cache memory
50.
[0052] Although in principle cache memory 50 is available to
operating system 54 for any purpose for which operating system 54
needs a memory, it is preferable to restrict the use of cache
memory 50 by operating system 54 to the caching of data to be
written to hard disk 56.
[0053] FIG. 4 is a flow chart of writing to HDD 30 or 56. In block
60, controller 18 of HDD 30 receives an instruction from the host
of HDD 30 to write data to platter 16, or operating system 54
receives an instruction from an application program to write data
to HDD 56. In block 62, controller 18 or operating system 54
determines whether cache memory 34 or 50 is present. If cache
memory 34 or 50 is absent, then in block 64, controller 18 writes
the data directly to magnetic medium 14 of platter 16, or operating
system 54 writes the data directly to HDD 56. If cache memory 34 or
50 is present, then in block 66, controller 18 or operating system
54 determines whether cache memory 34 or 50 is full. If cache
memory 34 or 50 is not full, then in block 68 controller 18 or
operating system 54 writes the data to cache memory 34 or 50. If
cache memory 34 or 50 is full, then in block 70 controller 18
writes the data directly to magnetic medium 14 of platter 16, or
operating system 54 writes the data directly to HDD 56. Then, in
block 72, controller 18 copies the contents of cache memory 34 to
magnetic medium 14 of platter 16, or operating system 54 copies the
contents of cache memory 50 to HDD 56. Finally, in block 74,
controller 18 or operating system 54 erases cache memory 34 or
50.
[0054] FIG. 5 is a flow chart of reading from HDD 30 or 56. In
block 80, controller 18 of HDD 30 receives an instruction from the
host of HDD 30 to read data from platter 16, or operating system 54
receives an instruction from an application program to read data
from HDD 56. In block 82, controller 18 or operating system 54
determines whether cache memory 34 or 50 is present. If cache
memory 34 or 50 is absent, then in block 84, controller 18 reads
the data directly from magnetic medium 14 of platter 16, or
operating system 54 reads the data directly from HDD 56. If cache
memory 34 or 50 is present, then data that were written recently to
HDD 30 or 56 may still be in cache memory 34 or 50, making it
unnecessary to expend the time and power needed to read the data
from platter 16 or from HDD 56. Therefore, in block 86, controller
18 or operating system 54 determines whether the requested data are
present in cache memory 34 or 50. If the requested data are present
in cache memory 34 or 50, then in block 88 controller 18 or
operating system 54 reads the data from cache memory 34 or 50.
Otherwise, in block 84, controller 18 reads the data directly from
magnetic medium 14 of platter 16, or operating system 54 reads the
data directly from HDD 56.
[0055] The present invention, as described above, supports an
innovative method of producing computer systems. The computer
systems are manufactured with hard disk drives and with interfaces
for cache memories as described above. The interfaces could be
integral to the hard disk drives, if the hard disk drives are
configured like HDD 30; or alternatively the interfaces could be
coupled to the hard disk drives via a system bus as in computer
system 40. As orders for computer systems are received, the
producer decides whether to fill each order with a computer system
that includes a cache memory 34 or 50 operationally connected to
that computer system's interface 32 or 48 or, alternatively, to
deliver the computer system without cache memory 34 or 50,
depending on the customer's requirements.
[0056] While the invention has been described with respect to a
limited number of embodiments, it will be appreciated that many
variations, modifications and other applications of the invention
may be made.
* * * * *