Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!decwrl!berenson@regal.DEC From: berenson@regal.DEC (Hal Berenson DTN 381 2694) Newsgroups: net.arch Subject: Re: Why not virtual files? Message-ID: <7660@decwrl.UUCP> Date: Fri, 4-May-84 10:42:33 EDT Article-I.D.: decwrl.7660 Posted: Fri May 4 10:42:33 1984 Date-Received: Sat, 5-May-84 07:31:13 EDT Organization: DEC Engineering Network Lines: 42 > Traditional, disk based, filesystems have several important > advantages over memory-mapped filesystems in the event > of a crash. > > Since traditional filesystems force the process to wait for > the actual disk access, they are kept more up to date (on disk) > than a memory-mapped filesystem would be (unless you force > a disk write after each file write, in which case you lose > some of the performance of a memory-mapped filesystem). > More importantly, your process must have a way to know > when data it has written is safely non-volitile. Most commercial operating systems have added cacheing to their "traditional" filesystems in order to improve performance. However, most of these implementations seem to be write-through so that the odds of losing any data are minimal. The real problems show up in that these same o/s's which provide write-through for data use a write-back scheme for file-system data structures. The result is bad eof pointers and lost or multiple-allocated sectors. TOPS-20 is a memory mapped system which simulates traditional i/o for programmers who so desire. You do take some risks however: It's a write-back scheme. Depending on the resource situation, data pages can end up in the page file, instead of the data file, for seconds, minutes, or hours unless the file is closed. If the system crashes, bye bye data. If you use TOPS-20's memory mapping correctly, you can avoid write-back problems AND obtain some major benefits. If one process has read a page off of disk into memory, other processes just map to it, avoiding any actual i/o. There is a system service to force pages back to the data file. There is also the capability to say "DON'T write any pages back to the data file unless I explicitly force them back" and "Reset the pointer to this page to point back to the copy on disk" (i.e., forget about those updates I just made). DBMS-20 uses memory-mapped I/O quite effectively to provide true dbms data integrity with high performance, particularly in the simultaneous access environment. Hal Berenson Digital Equipment Corporation ...decvax!decwrl!rhea!regal!berenson