I am not an expert on VAS and page swapping but I don't think the OS
knows how the memory block is split up by the application to make the
array or how it is being processed/accessed.

Roughly (imprecisely) what I am thinking of is E.g., if you have an
array of bytes called d such that (X, Y, Z) -: $ d where X Y Z are the
size of the array, and the machine has an amount of free RAM R1 where
X*Y*Z > R1 >: 2*Y*Z then to do the calculation (|. d) + d it would be
most efficient grab 2*Y*Z bytes of RAM and then to break the array
into X pages or "swap files"?

On the other hand, if the machine only has free RAM R2 <: Y*Z then it
would be better to arrange for X*Y pages of the smaller size Z.

If the machine has a lot of free RAM R3 <: X*Y*Z then you don't need
to use pages on the disk at all and the calculation proceeds as
normal.

I do not think that the OS can be given enough information about the
calculation to do that kind of paging efficiently, although writing a
program to do it would be difficult since the program would have to
know about the details of the function being applied. The current
paging in J is left to the OS, varies from OS to OS, and might be
breaking arrays in unnatural ways leading to inefficiencies in
processing huge data sets that require swap usage.


On Mon, Apr 6, 2009 at 3:58 PM, Raul Miller <[email protected]> wrote:
> On Mon, Apr 6, 2009 at 9:09 AM, Matthew Brand <[email protected]> 
> wrote:
>> Perhaps J could resort to seamlessly using and managing its own
>> on-disk "RAM" area and arrange for the pages to line up efficiently
>> for whatever calculation is happening, rather than passing
>> responsibility to the OS swap mechanism. Sounds like a lot of work
>> though.
>
> This also sounds like work which belongs in the OS (or in the OSes,
> when you are using more than one (or perhaps in VMware, when it
> is involved)).
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
http://www.ixquick.com/

Ixquick Protects Your Privacy!
The only search engine that does not record your IP address.

http://www.vivapalestina.org/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to