-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Erich Titl wrote: | Natanael Copa wrote: |> Erich Titl wrote: |> | .. |> |> I dont have time for reading about memory management in Linux right now, |> but AFAIK the executables and libraries are mmap'ed. | | This would mean, that an executable would onle be mapped to memory, but | copied as soon as the memory page it resides on is written to by anyone. | This could produce some interrupts. | ... | I don't know if I should/can consider a RAMdisk simply RAM. It needs to | behave like a disk in the sense of logical I/O. | | ... |> |> It would really not make any sense to copy a mmap'ed executable from RAM |> to another place in RAM, | | That would be true if RAMdisk does just mapping. | | but as I said, I'm not 100% sure about that and |> currently I dont have time to investigate it (so, strictly I should |> have kept my muth shut, but now its to late anyway...:) | | Same for me, still it is an interesting object. Maybe someone with | deeper insight into RAMdisks on Linux could tell.
The data in a tmpfs filesystem resides entirely in the page cache (and/or the swap file, if it exists). This is the same status code would have if it was loaded from (for example) an ext2 formatted partition on a HDD or some other 'conventional' filesystem (ie: cramfs, iso9660, FAT, etc.). Upon loading, each instance of an application will get it's own private memory area for stacks and variables, but the executable code is only loaded into memory once. The MMU is used to make the memory visible to more than one process at once (ie: you can have 50 apache process running at once, but they're all executing out of the same chunk of physical memory containing the code, although each process will also have it's own private memory area for state information). So...if you have a program in tmpfs, it can be run "in-place", as the "files" are already in the page-cache. The special handling of tmpfs is due to the fact that there is *NO* filesystem as such on the tmpfs device...instead the virtual memory manager itself takes care of the "filesystem" details (hence, no formatting is required!). With pretty much any other filesystem, this is *NOT* the case, and you'll have two copies of any data (the copy on the filesystem and the copy in the page cache). This is because tmpfs is the only filesystem that's handled directly by the virtual memory manager, without using a filesystem driver. - -- Charles Steinkuehler [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDDJXLLywbqEHdNFwRAsWEAJ926QQ2T6whnJYexsfZWcaZhD591gCgnjMC 8Ri6P6yOHL1Kx2gzk6VUWFg= =GEyf -----END PGP SIGNATURE----- ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel