Method for implementing a non-volatile caching system for networks and cd-roms

Abstract: A network and CD-ROM caching product that runs under both Windows 3.X and Windows 95, is completely transparent to end-users, and works with a wide variety of file systems running under both Windows 3.X and Windows 95 is disclosed. The approach used to fulfill these requirements has been to utilise the services provided by a virtual device driver (VxD) supplied with Windows 95 known as the Installable File System Manager (IFSMGR). Windows 95 is designed so that all file system input/output (I/O) requests may be "hooked" to the IFSMGR VxD. The disclosed caching product is effectively "layered" between the IFSMGR VxD and the generic file system of Windows 95. The disclosed caching product has been designed so that it will run under both operating systems. This has been accomplished by rewriting portions of the Windows 95 IFSMGR VxD, enabling it to run under Windows 3.X. The rewritten version is based on the IFSMGR specification provided by Microsoft Corporation.

Description: FIELD OF THE INVENTION: This invention relates to a method for implementing a caching virtual device driver as defined in claim 1 and to a computer storage medium encoding a program of instructions achieving the same, as defined in independent claim 7. Further enhancements are provided by the subclaims. DESCRIPTION OF RELATED ART: Caching has long been employed to increase performance of a relatively slow computer memory resource when a faster memory resource, which typically has a higher cost per stored bit, is available. Typically, a temporary memory block within the faster memory resource (i.e., a cache) is established for storing only a portion of the information stored within the slower memory resource. Rather than store within the faster memory resource an entire application program or an entire data file that may be resident on the slower memory resource, certain algorithms are employed to determine which portions of the program or data file are most likely to be accessed. When the system's central processing unit (CPU) calls a memory location that is not stored in the cache, the cache (if completely filled) must be at least partially overwritten with the required data from the slower memory resource. Likewise, when permanent changes are made to data, data in both the cache and the slower memory resource must be updated to reflect that change. As this is written, there are roughly 150 million computers throughout the world capable of performing general business-related tasks. When the rapid proliferation of personal computers began in the early 1980s, nearly all of them were employed as stand-alone units. However, multi-user systems were soon developed. These early multi-user systems ran software written for the CP/M disk operating system, which had been written by Gary Kildall and was marketed by his company, Digital Research, Inc. The multi-user disk operating system MP/M supplied by Digital Research, Inc. connected several "dumb" terminals to a single microprocessor and a shared disk drive, while TurboDOS--a much more sophisticated product supplied by an unrelated company--utilized a master/slave arrangement much like the Local Area Networks (LANs) in use today. Both the MP/M and the TurboDOS disk operating systems ran on computer systems based on either the Intel 8080 microprocessor or the Zilog Z-80 microprocessor. Neither of these early microprocessors could directly address more than 65,536 bytes of random-access memory. As a consequence of MP/M and TurboDOS requiring a minimum of about 50,000 bytes of random access memory, only about 15,000 bytes of addressable memory remained for application programs. As few application programs, other than simple word processors, required 15,000 bytes or less, the early multi-user systems were, for the most part, more intellectual curiosities than they were practical, general-use, multi-user data processing systems. Distributed data processing (i.e., multiple LANs interconnected via a long-distance data link) using either MP/M or TurboDOS was even more hopeless, as it would have required loading a communication program into memory, in addition to the operating system, before application software could be loaded. However, with the introduction of IBM-compatible computers based on the Intel 80286 microprocessor, which was designed to address several megabytes of random-access memory, the development of practical LANs and distributed data processing systems became feasible. Although Novell Corporation initially captured a majority share of the LAN market, the number of networks utilizing LAN software from Microsoft Corp. has been growing. Present-day LANs generally use a twisted wire pair or a coaxial cable to interconnect individual user computer systems to a server system. The interconnection of LANs is accomplished via telephone lines, special dedicated data lines, microwave, or satellite links. Acoustic links can be made using electrically-conductive or fiber-optic cables. For acoustic links, each end of the link generally requires a modem. The other links typically utilize a "bridge" and a "router" at each end. Distributed data processing networks and the LANs within those distributed networks can often benefit from caching. Typically, links between LANs of a distributed processing network are slower than the interconnections between the nodes (i.e., individual computers) of a LAN. Furthermore, though a distant memory resource (e.g. a disk drive on a distant server system) may be as fast or even faster than local memory resources, long distance interconnections over a data link can dramatically slow access time to that distant resource. Regardless of the type of link between the LANs of a distributed processing network, or between the nodes (i.e., individual systems) of a LAN, each data link has a given bandwidth which will permit only a finite amount of data to be simultaneously transferred over the link. Once the bandwidth is exceeded, as for example when more than a certain number of users are attempting to communicate over the same link (whether between LANs or within a LAN), response time over that link typically degrades as each user's request is delayed in order to evenly accommodate all competing requests. Consequently, caching of data read over a network can generally increase system performance both by reducing data link loading and by providing the end user with a cache of rapidly accessible data. Within the last several years, compact disc read-only-memory devices (CD-ROMs) have become extremely popular due to the availability of low-cost, high-capacity compact disk storage media and relatively low cost CD-ROM readers (drives). In fact, nearly all new personal computers being sold in the U.S. include an installed CD-ROM drive. Although current CD-ROM media are capable of storing approximately 450-500 megabytes of data, access to that data is considerably slower than data stored on a modern hard disk drive. For example, the current standard for a high-performance CD-ROM drive, known as a "6X" drive is capable of reading, at most, about 600 kilobytes of data per second. A modern high-speed IDE hard disk drive, on the other hand, is capable of reading about six megabytes per second--roughly ten times the speed of a 6X CD-ROM drive. Thus, CD-ROM drive performance may also be greatly enhanced through caching. Many graphical user interface (GUI) environments, such as Microsoft® Windows™ version 3.X, Microsoft Windows 95, Windows NT®, IBM Corporation's OS/2®, and Geoworks® have been developed over the years. Of the aforementioned products, only Windows NT and OS/2 are true operating systems, as Geoworks and Windows 3.x must be loaded and run under the venerable Microsoft MS-DOS operating system. Windows 95 is somewhat of a hybrid, as it also requires portions of MS-DOS for its operation. For the sake of simplicity, though, both Windows 3.X and Windows 95 are referred to hereinafter as operating systems. As this is written, Microsoft Windows ver. 3.X is far and away the most used operating system, having been bundled with nearly every personal computer sold between 1989 and mid-1995. However, from the date of its release in 1995, the Microsoft Windows 95 operating system from Microsoft Corporation has been bundled with most new, high-performance personal computers. In less than a year, it has become the operating system of choice for most business applications, and is expected to rapidly supplant Windows 3.X as the most used operating system for personal computers. The potential exists for significantly increasing the performance of both CD-ROM drives and distributed processing networks operating under Windows 3.X and Windows 95 operating systems through caching. SUMMARY OF THE INVENTION Shortly after the release of Windows 95, Sun Microsystems, Inc. (hereinafter also "Sun") set about to create a network and CD-ROM caching product that runs under both Windows 3.X and Windows 95, is completely transparent to end-users, and works with a wide variety of file systems running under both Windows 3.X and Windows 95. The approach used to fulfill these requirements has been to utilize the services provided by a software program module within Windows 95 known as the Installable File System Manager (IFSMGR). Microsoft Windows 3.x and Windows 95 operating system platforms include 32-bit components, each of which runs at Ring-0 and which is called a Virtual Device Driver or VxD, for short. The IFSMGR program module is such a virtual device driver. Windows 95 is designed so that all file system input/output (I/O) requests are "hooked" to the IFSMGR VxD. This is described, for example, in Dr. Dobbs Journal, Vol. 20, NO. 12, December 1995, pp. 60-70, 108-110, Russinovich, M. and Cogswell, B. It describes the Microsoft Windows 95 layered file system, the IFSMGR component of which manages high level I/O requests from applications by taking a call directed at a specific logical drive and passing it down the correct call down chain to other drivers and controllers in 32 reserved logical layers on the way to the actual hardware layer. At least one of the layers is reserved for a customisable "Vendor Supplied Driver" (VSD) for added functionality. A VSD layer may be used for caching, an example being given as a low level secondary disk cache, caching in flash memory for example. It is stated that virtual device drivers (VxDs) on the chain can service requests themselves and not pass them to lower levels, or they can generate requests themselves. The virtual file allocation table (VFAT) virtual device handles many requests by reading or writing to a memory cache via the VCACHE virtual device. However, this article does not teach the use of a VSD or a caching scheme at a high level which may assume control from the IFSMGR service of all I/O requests. At the same time, those skilled in the art will appreciate that the present invention may be implemented at the VSD layer on the Microsoft Windows 95 operating system. The caching product developed by Sun Microsystems, Inc. is called "Solstice PC-CacheFS" (hereinafter "PC-Cache-FS"). The PC-CacheFS caching product, which also fits the definition of a virtual device driver, is effectively "layered" between the IFSMGR VxD and the generic file system of Windows 95. Rather than create separate caching products for Windows 3.X and Windows 95, the PC-CacheFS caching product has been designed so that it will run under both operating systems. However, the Windows 3.X operating system has no IFSMGR virtual device driver. Thus, portions of the Windows 95 IFSMGR VxD have been rewritten to run under Windows 3.X. The rewrite is based on the IFSMGR specification provided by Microsoft Corporation. Thus, neither the PC-CacheFS caching product (VxD) nor the Windows operating systems, themselves, need be rewritten for the sake of compatibility. Brief Description of Drawings Fig. 1 illustrates a computing system for performing the computer implemented steps of the method in accordance with the invention; Fig. 2 is a flow chart depicting the logical operation of the caching virtual device driver. Detailed Description of Preferred Embodiments The embodiments of the invention described herein may be implemented as logical operations in a distributed processing system having client and server computing systems. The logical operations of the present invention are implemented (1) as a sequence of computer implemented steps running on the computing system and (2) as interconnected machine modules within the computing system. The implementation is a matter of choice that is dependent on the performance requirements of the computing system implementing the invention. Accordingly, the logical operations making up the embodiments of the invention described herein are referred to variously as operations, steps or modules. The operating environment in which the present invention is used encompasses the general distributed competing system, wherein general purpose computers, workstations, or personal computers (hereinafter local nodes) are connected via communication links of various types, in a client-server arrangement, wherein programs and data, many in the form of objects, are made available by various members of the system. Some of the elements of a general purpose workstation computer are shown in Figure 1, wherein a processor 1 is shown, the processor having an input/output (I/O) section, a central processing unit (CPU) 3 and a memory section 4. The I/O section 2 is connected to a keyboard 5, a display unit 6, a disk storage unit 9 and a CD-ROM drive unit 7. The CD-ROM unit 7 can read a CD-ROM medium 8 which typically contains programs 10 and data. The computer program products containing mechanisms to effectuate the apparatus and methods of the present invention may reside in the memory section 4, or on a disk storage unit 9, or on the CD-ROM 8 of such a system. Examples of such systems include SPARC systems offered by Sun MicroSystems, Inc., personal computers offered by IBM Corporation and by other manufacturers of IBM-compatible personal computers, and systems running the UNIX operating system. The preferred embodiment of the present invention provides caching for information stored on local CD-ROM drives and for information stored at non-local network resources, which may include both local and distant server system disk drives and the like. Such caching functions are provided in a single caching product which may be loaded under either Windows 3.X or Windows 95. The caching product functions such that it is completely transparent to end-users, and works with a wide variety of file systems running under both Windows 3.X and Windows 95. The heretofore enumerated functions of the preferred embodiment are provided in the form of What Microsoft corporation calls a virtual device driver, or VxD for short. This caching VxD interfaces with another virtual device driver called the Installable File System Manager (IFSMGR, for short) that is supplied with Windows 95. Windows 95 is designed so that all file systen input/output (I/O) requests are "hooked" to the IFSMGR VxD service. In a preferred embodiment of the invention, the caching VxD is layered between the IFSMGR VxD service and the generic file system of Windows 95. In a preferred embodiment of the invention, the caching product receives all file system I/O requests from the IFSMGR VxD and implements a caching scheme in accordance with set-up instructions which have been pre-programmed by the user of a local node. In other words, the user tells the caching product which network or CD-ROM drive(s) are to be cached. Rather than create separate caching products for Windows 3.X and Windows 95, the PC-CacheFS caching product has been designed so that it will run under both operating systems. However, as the Windows 3.X operating system has neither an IFSMGR virtual device driver service nor a functional equivalent, a special IFSMGR virtual device driver has been incorporated in the caching VxD. Thus, when the preferred embodiment of the caching product is loaded under Windows 3.X, this special IFSMGR VxD is called whenever a system I/O request is issued by the system CPU to provide IFSMGR service. The special IFSMGR VxD, which is largely based on the Windows 95 IFSMGR specification provided by Microsoft Corporation, includes modifications which permit it to operate under Windows 3.X. By using this approach, neither the caching VxD nor the Windows operating systems, themselves, need be rewritten for the sake of compatibility. The interface of the caching VxD with the IFSMGR VxD service is implemented by the following exemplary, pseudo-code routine: 1. Is this Windows boot-time initialization? Yes: Goto Step 2. No: Goto Step 3. 2. "Hook" the IFSMGR VxD service by calling the IFSMgr_InstallFileSystemApiBook routine, specifying CacheHook as the callback name for the Hook to the caching product. 3. The IFSMGR service calls CacheHook with a file I/O request. 4. Does this request involve a network drive or CD-ROM drive that has been configured for caching? Yes: Goto Step 6. No: Go to Step 5, as the request is of no further interest. 5. Control returned to the IFSMGR VxD service and the file I/O request is chained to the next IFSMGR hook, or to the IFSMGR itself. 6. Does the local hard disk cache have valid data in it to satisfy this request? Yes: Goto Step 9. No: Goto Step 7. 7. Call down to the network or CD-ROM file system and retrieve at least enough data to satisfy the request, retaining control from the IFSMGR service. 8. Cache the retrieved data by saving it either in random-access memory or on the local hard disk for subsequent retrieval. 9. Provide data from the cache which resolves the I/O request, and go to Step 5. In order to further clarify the operational flow of the caching VxD, the foregoing pseudo-code routine has been formatted in the flow chart of Figure 2. Any virtual device driver may monitor all systen file I/O requests by establishing a hook to the IFSMGR VxD service. This is accomplished by calling a routine within the IFSMGR VxD called "IFSMgr_InstallFileSystemApiHook" and providing it with a unique callback name. In this case, the name "CacheHook" has been arbitrarily chosen as the callback name for the caching VxD. The IFSMGR VxD retains a table of all hook requests made by various virtual device drivers. For example, in addition to the caching VxD, a virus scanning VxD may also have a hook to the IFSMGR VxD. Such a virus scanning VxD may be responsible for scanning all executable files for viruses as they are being read. All IFSMGR hooks are chained together. In order to initiate the chaining sequence, the IFSMGR VxD passes an incoming file I/O request to the first hook along with information which sequentially identifies all other requesting hooks. Each hook analyzes the incoming file I/O request and decides, on the basis of the type of request, whether or not to take action. When each hook finishes with the incoming file I/O request, it passes ("chains") the request to the next hook in the sequence. The final hook in the sequence returns control of the file I/O request to the IFSMGR VxD. The cache may be established in either the local systems random access memory or on the local hard-disk drive. Alternatively, a two-tier caching system may be implemented such that a large block of non-volatile cached data resides on the local hard-disk drive, while a smaller block of volatile cached data resides within a portion of the random access memory. Such caching schemes are already well known in the art and will not be discusses herein in greater detail. While the invention has been particularly shown and described with reference to a preferred embodiment thereof, it will be understood by those skilled in the art that various other changes in the form and details may be made therein without departing from the scope of the invention.

Claims: A method for implementing a caching virtual device driver (VxD) responsive to all file input/output (I/O) requests within a computer operating system, said operating system or said caching virtual device driver (VxD) being provided with a Microsoft Windows (T.M.) Installable File System manager (IFSMGR) virtual device driver service, or its functional equivalent, (IFSMGR VxD), said method being implemented on a data processing system having a local central processing unit (CPU) (3), a local random access memory (4), a local data bus, and a local mass storage device (9), and said data processing system being coupled to at least one local read-only memory device (7) from which data may be cached, or at least one non-local mass storage device that contains data that may be required in order to satisfy a file I/O request from said local CPU, said method comprising the steps of: providing for pre-progamming the caching virtual device driver (VxD) by the user of said data processing system with set up instructions as to which local read only memory device (7) or non-local mass storage device are to be cached, establishing a cache within said local random access memory (4) and/or said local mass storage device (9), establishing a hook (120) to said caching virtual device driver (VxD) from said IFSMGR service (IFSMGR VxD) at boot time initialization of said orating system, receiving a file I/O request (130) from said local CPU whenever the operating system processes a file I/O request, in response to said file I/O request, generating (130) a call to said caching virtual device driver (VxD) from said IFSMGR service (IFSMGR VxD), assuming control (130) of said file I/O request by said caching virtual device driver (VxD), determining (140) whether or not said file I/O request involves data on a device that has been configured by the user for caching, when said file I/O request does not involve said data, returning control (150) of said I/O request to said IFSMGR service (IFSMGR VxD), when said file I/O request does involve said data, determining (160) whether or not data that satisfies said file I/O request resides within said cache, when data that satisfies said file I/O request does reside within said cache, supplying (190) said data that satisfies said file I/O request to said data bus, and returning control (150) to said IFSMGR service (IFSMGR VxD), when data that satisfies said file I/O request does not reside within said cache, retrieving (170) data that satisfies said file I/O request from said local read-only memory device (7) or said non-local mass storage device that have been configured by the user for caching, storing (180) said retrieved data in said cache, supplying (190) said retrieved data to said data bus, and returning control (150) to said IFSMGR service (IFSMGR VxD). The method of claim 1, wherein said computer operating system is a windows-based operating system. The method of claim 2, wherein said computer operating system is a Microsoft Windows (T.M.) operating system, version 3 X or Windows 95. The method of any of Claims 1 to 3, wherein the local read-only memory device is a CD-ROM drive (7). The method of any of Claims 1 to 3, wherein the non-local mass storage device is located on a server computer in a client server computer system to which the data processing system is coupled via a network link. The method of Claim 5, wherein said caching virtual device driver (VxD) is interposed between a file handling system and said file system manager routine (IFSMGR VxD), said file handling system being a component of the operating system when running on a local node of the client server computer system, said file system manager routine (IFSMGR VxD) providing other virtual device drivers to temporarily access and control input/output (I/O) requests on demand. A computer program storage medium encoding a program of instructions for a process for implementing a caching virtual device driver (VxD) responsive to all file input/output (I/O) requests within a computer operating system, said operating system or said caching virtual device driver (VxD) being provided with a Microsoft Windows (T.M.) Installable File System manager (IFSMGR) virtual device driver service, or its functional equivalent, (IFSMGR VxD), said method being implemented on a data processing system having a local central processing unit (CPU) (3), a local random access memory (4), a local data bus, and a local mass storage device (9), and said data processing system being coupled to at least one local read-only memory device (7) from which data may be cached, or at least one non-local mass storage device that contains data that may be required in order to satisfy a file I/O request from said local CPU, said process comprising the steps of: providing for pre-programming the caching virtual device driver (VxD) by the user of said data processing system with set up instructions as to which local read only memory device (7) or non-local mass storage device are to be cached, establishing a cache within said local random access memory (4) and/or said local mass storage device (9), establishing a hook (120) to said caching virtual device driver (VxD) from said IFSMGR service (IFSMGR VxD) at boot time initialization of said operating system, receiving a file I/O request (130) from said local CPU whenever the operating system processes a file I/O request, in response to said file I/O request, generating (130) a call to said caching virtual device driver (VxD) from said IFSMGR service (IFSMGR VxD), assuming control (130) of said file I/O request by said caching virtual device driver (VxD), determining (140) whether or not said file I/O request involves data on a device that has been configured by the user for caching, when said file I/O request does not involve said data, returning control (150) of said I/O request to said IFSMGR service (IFSMGR VxD), when said file I/O request does involve said data, determining (160) whether or not data that satisfies said file I/O request resides within said cache, when data that satisfies said file I/O request does reside within said cache, supplying (190) said data that satisfies said file I/O request to said data bus, and returning control (150) to said IFSMGR service (IFSMGR VxD), when data that satisfies said file I/O request does not reside within said cache, retrieving (170) data that satisfies said file I/O request from said local read-only memory device (7) or said non-local mass storage device that have been configured by the user for caching, storing (180) said retrieved data in said cache, supplying (190) said retrieved data to said data bus, and returning control (150) to said IFSMGR service (IFSMGR VxD).

Inventors: BERLINER BRIAN, BERLINER, BRIAN
Applicants: SUN MICROSYSTEMS INC, SUN MICROSYSTEMS, INC.
Application year: 1997
Main classification: G06F12
IPC codes: G06F12, G06F17