TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dean Roddey
from: Jonathan de Boyne Pollard
date: 1994-10-13 05:08:16
subject: 512mb Is Ample Right Now

DR>
  > JdeBP> Buffer management has to be done for partial file mapping, which
  > JdeBP> leaves the resultant code no simpler.  Think about how access to a
  > JdeBP> record that is not currently within the "window"
must have to be
  > JdeBP> implemented at application level.
  >
  > It's at the 'application level' in the sense that it is not in
  > the operating system. However it is NOT at the application level
  > in that it is
  >     A) fully separated from the accessing code
  > and B) it would be in the database system API not in 'user' level code.
DR>

  So what ?  Partial mapping of files is still a non-solution to the
  problem at hand.  This problem is *not* one of keeping library code
  separate from user code.  We have DLLs for that.

  This problem is of efficient database access to large data files.  If
  the application (be it code in a static library, or DLL, or whatever)
  has to do buffer management, as partial file mapping *forces* it to
  do, it gains nothing, because eliminating buffer management was why it
  wanted to use file mapping in the first place.

  Scenario A, ordinary buffer management :

     Client asks for pointer to record N.
     DB library looks up N in list of in-memory buffers.
     If (not present)
        DB library reads in buffer to memory, using DosRead.
     DB library returns pointer to buffer.

     Client accesses buffer directly, using returned pointer.

  Scenario B, partial file mapping using a window :

     Client asks for pointer to record N.
     DB library checks that N is within partial mapping "window".
     if (not present) {
        DB library remaps memory to new window within file.
        Kernel has to flush all currently touched pages back to file
        using DosWrite.
     }
     DB library returns pointer to buffer.

     Client accesses buffer directly, using returned pointer (and kernel
     uses DosRead internally to fault it in on the first access).

  For a real world implementation of partial file mapping, there's also
  the headache of what to do when the client wants to access two records
  separated by a distance greater than that of the window size.

  And we won't go into how a real world system would implement
  transaction processing, including rollback, on top of a partial file
  mapping system, where the kernal is free to flush the dirty buffers
  back to the live data file at any moment, even when they are in an
  intermediate state.

  > JdeBP <
___
 X MegaMail 2.10 #0:
--- Maximus/2 2.01wb

* Origin: DoNoR/2,Woking UK (0483-725167) (2:440/4)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 440/4 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54
@PATH: 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.