SMARTDrive 4.0 Design OverviewLast reviewed: November 21, 1994Article ID: Q82203 |
The information in this article applies to:
SUMMARYSMARTDrive version 4.0 is a utility included with Microsoft Windows and Microsoft Windows for Workgroups. SMARTDrive 4.0 is designed as block-oriented disk cache. It hooks into the system at the MS-DOS device driver level, rather than at the ROM BIOS INT13 level. Each block device driver on the MS-DOS device driver chain is "front- ended" by SMARTDrive 4.0, which provides the caching. SMARTDrive version 4.0 does not cache a temporary or permanent swapfile. Although SMARTDrive 4.0 is designed as a block-oriented disk cache and hooks into the system at the MS-DOS device driver level, SMARTDrive includes code which determines whether what is being cached is part of the swapfile. If SMARTDrive determines that disk access was made to access the swapfile, SMARTDrive. does not cache that data.
MORE INFORMATIONSMARTDrive 4.0 calls the MS-DOS level device driver to perform any needed physical disk I/O. This design yields the following benefits:
Testing the Performance of SMARTDrive 4.0
Double Buffering and Bus MastersCertain disk controllers support a concept called bus mastering. This is where the actual disk controller takes over the bus in order to transfer data to or from system RAM. Some SCSI controllers have this feature. A problem occurs when running in the virtual 8086 mode that Windows 3.0 and 3.1 virtual machines provide. Memory managers such as QEMM and EMM386.EXE also use virtual 8086 mode. The read or write address that is passed to MS-DOS is often not the same as the actual physical memory address. This can cause data to be read from the wrong location or cause data to be written to the wrong address, which in turn can cause erratic system behavior, general protection faults, and the system to stop responding (hang). Microsoft created a standard called Virtual DMA Services, which provides an interface that allows these bus-master controllers to get the correct address and avoid the problems mentioned above. However, some older bus- master controller cards do not support this standard. To allow SMARTDrive to work with these older bus mastering cards, a feature has been added to SMARTDrive that provides a memory buffer that has the same physical and virtual addresses. This avoids the system instability problem at the cost of 2.5K of conventional memory and a small amount of performance (the cost of moving the data to and from the buffer.) To use this feature, place the following line in the CONFIG.SYS file:
DEVICE=SMARTDRV.EXE /DOUBLE_BUFFER+NOTE: This line does not install the cache, only the double-buffer driver; the cache must be installed in the AUTOEXEC.BAT file. Most disk controllers do not need double buffering. This includes all MFM, RLL, and IDE controllers as well as many ESDI and SCSI devices. The Windows 3.1 Setup program will not install the double buffer driver in most cases. In the cases where Setup is unable to determine if double buffering is needed or not, it will install the driver based on the reasoning that it is better to error on the side of safety. A feature has been added to SMARTDrive to help determine if double buffering is unneeded and allow removal of the driver. Once the system is running with SMARTDrive loaded, type "SMARTDRV" (without quotation marks) at the MS-DOS command prompt. The following will appear:
Copyright 1991,1992 Microsoft Corp. Cache size: 1,048,576 bytes Cache size while running Windows: 1,048,576 bytes Disk Caching Status drive read cache write cache buffering -------------------------------------------- A: yes no no B: yes no no C: yes yes yes D: yes yes - Microsoft SMARTDrive Disk Cache version 4.00 For help, type "Smartdrv /?".NOTE: The double buffer driver must be loaded for SMARTDrive to determine if there is a need for buffering. If the double buffer driver is not loaded, all entries in the buffering column read "no." To determine if double buffering is required, look at the column labeled buffering. For each drive that is being cached, it can have one of three values: yes, no, or -. "Yes" indicates that double buffering is needed and being performed; "no" indicates that buffering is not needed. "-" indicates that SMARTDrive has not yet determined the necessity of double buffering.If the buffering column has all "no" entries in it, the double buffer driver is unneeded and can be safely removed from the CONFIG.SYS file.
|
KBCategory: kbusage kbenv
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |