Mach and faulting in the file (Re: GNU Emacs, memory usage, releasing)

Peter da Silva peter at ficc.uu.net
Mon Jan 8 07:05:37 AEST 1990


Note: faulting in the file is equivalent to RED's technique of only reading
in the part of the file being used...

> 	      Given an appropriate system architecture, such as Mach, you could
>    even fault your blocks in from the file!

> Mach doesn't do object (structure) paging to my knowledge.

What I mean here is that you can allocate your block poimters, then call
map_fd to map the file into memory. Now you point your block pointers into
the file, but don't actually touch the memory.

Now when you need a block, you just touch it, and it'll get faulted in from
the file. I'm sure there are editors on friendlier VM systems than UNIX (such
as Multics or VMS) that already do something like this.

> 3> Allow the program to change the page mapping (think of it as mmap
>    to your own addess space).  Then when you open a gap, you always
>    copy at most one page; you just split the page on which the gap
>    apears into two and translate the pages above or below by one.

THAT is the thing to do to "fix" buffer gap. If you can do that you can also
call map_fd to get the initial buffer. The problem with this is that now
the program (or its custom external pager) is having to do much of the work
of a block-splitting algorithm.

Are there any major systems that give this capability? Mach could, but I
hear external pagers aren't working very well yet.

> You've already got paging hardware; why not use it to your advantage?

Likewise. Buffer gap dirties a lot of memory, over & over again.
-- 
 _--_|\  Peter da Silva. +1 713 274 5180. <peter at ficc.uu.net>.
/      \ Also <peter at ficc.lonestar.org> or <peter at sugar.lonestar.org>
\_.--._/
      v  "Have you hugged your wolf today?" `-_-'



More information about the Comp.unix.wizards mailing list