using the executable itself for swapping



Hello there, =)

Sorry if this has been discussed before. I searched the
Internet for information about it, but I couldn't find
anything useful.

So, here comes my question: Is there anybody working on making
Linux (optionally) use executables for swapping (i.e. swap
them out to themselves)? As you might know, Windows does this
- with the effect being this: OpenOffice2 executed on an old
P100 with 24 MB RAM starts up faster than it does on a Linux
P300 with 128 MB RAM, which of course isn't surprising - and
(if you stick to the basics;-) it's even usable with only
24 MB RAM.

Another example where swapping on executables would be great
is the segment of embedded systems. Here the systems usually
haven only little RAM (say 32 MB for a PPC4xx system). The
root filesystem (and the rest) is commonly located in flash.
If you use many servers like samba or printing daemons, then
the memory is easily eaten up and the need for swap-space
arises (which is then again located on flash, usually - which
is bad news for the flash). If Linux were able to use the
executables for swapping, then this wouldn't be a problem and
one could do without the (additional) swap-space.

The last examples are high-end and future systems. Using flash
memory for read only partitions (usually where the programs
are located) can speed up application startup (and compilation
- headers, libraries) significantly. You can get an instant
200 MB/s and random access from flash memory, which makes it
seem as if the applications were already in the cache. In the
future, this will enter the normal market as well. For example
notebooks will last longer and be faster with a flash-cache
(for the programs). Whereas the swapping is currently
ordinarily faster than normal program startup (i.e. loading an
application from swap is faster than starting it from hard-
disk normally), it will be the contrary in the future (and it
already is on some high-end and most embedded systems).
Loading the application from flash will be (is) a lot faster
than hunting it down on the hard-drive. Thus using the
executable itself (in flash) for swapping (only as an option;-)
would be of enormous advantage (especially to embedded
systems). Also starting an application before it has been
completely loaded can help in starting large applications
faster (again, optionally - maybe by flag/attribute).

Nosy as I am I would like to know if nobody has ever been
interested in this so far or whether there is a problem with
file locking (could still be done on read only partitions),
self modifying code (could be protected by flag) or if the ELF
format is posing a problem?


Best regards,
LC (myLC@xxxxxx)

.



Relevant Pages

  • Re: Performance and Flash Pipelining on TI 28F12 DSPs
    ... > of "critical code" we could move to RAM. ... > from internal flash? ... Since the external RAM is as big as the internal flash, ... the timers and all other interrupts are shut off, ...
    (comp.dsp)
  • Re: [ANNOUNCE] Ramback: faster than a speeding bullet
    ... The fact is, enterprise scale ramdisks are here now, while ... enterprise scale flash is not. ... does not approach the write performance of RAM, ... My goal is not to replace RAM with flash, but disk with flash. ...
    (Linux-Kernel)
  • Re: Relocate from nor to ddr CE 5.0
    ... programmed into flash. ... but the image info says it belongs to ram. ... Your bootloader needs to have code that recognizes if the image is ... blt CODEINRAM ...
    (microsoft.public.windowsce.platbuilder)
  • XIP vs RAM
    ... Maybe the system can even get away with the next small size RAM ... Does anyone know if/what the premimum of the "K" Strata FLASH is? ... Also what are the steps needed to transition to a XIP OS? ... >>> My bootloader create a BINFS partition and an EXTENDED partition on ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Is there anyone use Spansion Nor flash?
    ... executables for this folder that prevent formatting the folder? ... It sounds like code is trying to execute from the flash when FMD_Init is ... My register about this Nor flash is in my first post, ...
    (microsoft.public.windowsce.embedded)

Loading