📄 tvcache.htm
字号:
<td colspan="3" valign="top"><span class='include'>Last
updated July 9, 1997</span>
<hr>
</td>
</tr>
<tr>
<td colspan="3" height="40" valign="middle"><span class='sectionheader'>Introduction</span></td>
</tr>
<tr>
<td valign="TOP" colspan="3" align="left"><i>TVCACHE
</i>is a replacement for VCACHE that implements
compression on cached blocks in an attempt to improve
performance (our benchmarks show that it doesn't
fare too great). In any case, we are posting the
complete source for <i>TVCACHE </i>because the VCACHE
interface is undocumented. The source presented
here is the only complete specification for the
VCACHE interface that we are aware of. Note that
the source is presented solely for educational purposes
and is not licensed for commercial use.</td>
</tr>
<tr>
<td colspan="3" height="40" valign="middle"><span class='sectionheader'>How
it Works</span></td>
</tr>
<tr>
<td valign="TOP" colspan="3"> In yet another brilliant
design move, the current implementation of Windows
95 does not provide any official way to replace
the default VCACHE with an alternate VxD. However,
TVCACHE overcomes this limitation by replacing the
function pointers in the VCACHE service table with
pointers to its own routines before VCACHE is activated
for the first time. Thus, using VCACHE's Device
Declaration Block, TVCACHE subsumes VCACHE's role
as the cache manager for Windows.
<p>Once active, TVCACHE actually does much more
work than VCACHE needs to do. This extra work
involves fragmented memory management and compressed
buffer management. VCACHE only has to deal with
page sized (4K) chunks, whereas TVCACHE must deal
with almost arbitrary sized chunks of data (in
128 byte increments). TVCACHE mimics VCACHE's
exact policy of cache growing and shrinking and
our benchmarks show VCACHE and TVCACHE (with compression
disabled) have identical performance characteristics.
</p>
<p>Whether you are writing your own Windows 95 file
system driver, just curious about how VCACHE works,
or want to experiment with VCACHE grow/shrink
policies, TVCACHE serves as the only source of
precise and accurate information on how VCACHE
actually functions internally.
</td>
</tr>
<tr>
<td colspan="3" height="40" valign="middle"><span class='sectionheader'>Building
TVCache </span></td>
</tr>
<tr>
<td valign="TOP" colspan="3"> TVCACHE is a Windows
95 VxD that is written in C, and it requires VtoolsD
Version 2.0 or greater to build. Defining the TESTING
flag has the build produce a stand-alone Windows
console program that stress tests the TVCACHE code
by simulating multi-threaded cache accesses. Setting
COMPRESSON to 0 disables compression so that TVCACHE
functions in a manner similar to VCACHE.</td>
</tr>
<tr>
<td colspan="3" height="40" valign="middle"><span class='sectionheader'>Installing
TVCache </span></td>
</tr>
<tr>
<td valign="TOP" colspan="3"> To install TVCACHE,
add the following line to the [386enh] section of
system.ini:
<ul>
</ul>
<p>device=<path>\tvcache.vxd </p>
<p>where <path> is the directory in which
tvache.vxd is located. You must reboot your machine
for TVCACHE to start.
</td>
</tr>
<tr>
<td colspan="3" height="40" valign="middle"><span class='sectionheader'>More
Information </span></td>
</tr>
<tr>
<td valign="TOP" colspan="3"> The VCACHE interface
is only partially documented in the Windows 95 DDK,
and there are no guidelines for using it. While
we're not taking the time to write up a document
on the VCACHE interface specification, the source
to TVCACHE indirectly documents everything you need
to know. In its stress testing of TVCACHE code,
the main() test function at the bottom of vcache.c
serves as an example of how the VCACHE interface
is used.
<p>Let us know if you find TVCACHE useful.
</td>
</tr>
<tr>
<td colspan="3" height="40" valign="middle" align="center">
<p> </p>
<p> </p>
<p><b><a href="../../files/tvcache.zip">Download TVCACHE
(72KB)</a></b><br>
<br>
<a href="#top"><b>Back to Top</b></a> </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<!-- #EndEditable --></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<!-- #EndTemplate --></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -