Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uunet!iscuva!boba From: boba@iscuva.ISCS.COM (Bob Alexander) Newsgroups: comp.unix.wizards Subject: Re: UNIX Facilities for Interpreters - (nf) Message-ID: <544@iscuva.ISCS.COM> Date: Wed, 17-Jun-87 15:01:55 EDT Article-I.D.: iscuva.544 Posted: Wed Jun 17 15:01:55 1987 Date-Received: Sun, 21-Jun-87 10:11:26 EDT References: <540@iscuva.UUCP> <8300006@iaoobelix.UUCP> <680@nu3b2.UUCP> Reply-To: boba@iscuva.UUCP (Bob Alexander) Organization: ISC Systems Corporation, Spokane, WA Lines: 28 Robert, I think your reading a lot more complexity into this file mapping business than there needs to be. The key points are: Although the call looks something like a read, no data is actually transferred. This file data is just mapped in to the caller's address space. The mechanism is completely independent from the file system buffer cache. The file's data is accessed just like a memory access. Decisions about what parts of the file are read into real memory when are made by exactly the same mechanisms as regular virtual memory. Parts (i.e. pages) of the file are simply paged in as needed. No special tuning is required. No consideration need be given to whether the file is open or not (in fact, the mapped file can be accessed after it is closed -- just like a "read" buffer can be accessed after the file is closed). If a part of the file is frequently accessed, it will likely stay in real memory; if not it becomes a candidate to be swapped out. The nice thing about mapped files is that, for the most part, they are just a repackaging of existing facilities. -- Bob Alexander ISC Systems Corp. Spokane, WA (509)927-5445 UUCP: ihnp4!tektronix!reed!iscuva!boba