Browse Prior Art Database

Shared Folders Efficient Caching Algorithm

IP.com Disclosure Number: IPCOM000122104D
Original Publication Date: 1991-Nov-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 3 page(s) / 126K

Publishing Venue

IBM

Related People

Weber, JE: AUTHOR

Abstract

A method for searching the tree structure of a PC network drive is disclosed. Specifically, the method provides a way to find all files checked out to a user on an AS/400* shared folders' drive.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 48% of the total text.

Shared Folders Efficient Caching Algorithm

      A method for searching the tree structure of a PC network
drive is disclosed.  Specifically, the method provides a way to find
all files checked out to a user on an AS/400* shared folders' drive.

      The method described below, to search for files checked out on
an AS/400 shared folders' drive, consists of a few key elements.
Some elements are applicable to general tree searches of remote PC
drives.  Others pertain specifically to searching an AS/400 drive or
to searching for checked out files.  One key element is two new
application program interfaces (APIs) which are integrated into the
shared folders function.  Another key is the use of a cache for
subdirectory names.  An algorithm which ties the APIs and the
subdirectory cache together is another important component of the
searching method.

      Two new APIs are integrated into the shared folders function.
The first API is a signal to shared folders that a following search
request is for directories only.  For both DOS and OS/2*, a user can
search just for files or for both files and directories but, there is
no way to ask for directories only.  The second API is a signal to
shared folders that a following search request is only for files
checked out to a specific user.

      Both of these APIs are implemented through an IOCTL
(DOS)/DOSFSCTL (OS/2) call.  A parameter area, containing information
to identify the desired search request and the specified user (for
the second API), is passed on the call. Since these requests restrict
the search criteria, fewer matches are found and the amount of data
flowing over the communications line is minimized.  Both of the APIs
are documented to external users.

      The subdirectory caching algorithm is based on the following
ideas.  First of all, the algorithm takes advantage of the fact that
the AS/400 sends back all matching directory entries on a wildcard
search when the first one is requested.  Secondly, the algorithm is
based on the assumption that most users do not nest their
subdirectories more than a couple of levels deep.  Also, it is
assumed that as the nesting level increases, the number of
subdirectories at that level decreases for an average user.

      Each entry in the cache consists of a subdirectory name and the
length of that name.  For the algorithm to work properly, the cache
needs to have the number of cache entries equal to a power of two.
When implementing the tree search for files checked out to a specific
user, a cache with 128 entries was chosen for two reasons.  To begin
with, the implementation needs to run in the DOS environment.
Therefore, the cache needs to be kept to a reasonable size. Secondly,
a 128-entry cache means that up to six levels of subdirectory names
could be cached and it was assumed that this is a reasonable maximum.

      The first half of the cache is used to store subdirectory names
at the root level of...