On Dienstag, 10. Februar 2004 23:01, Jon S Berndt wrote: > Is anyone aware of a RAM disk utility or feature under Unix > (specifically, IRIX)? When running a simulation on IRIX we are > finding that the disk access is taking too much time at various phase > boundaries. It is thought that the use of a RAM disk might help. Don't know irix well enough. With Linux you can have ramdisks. You can create them a runtime or at boottime and desroy them whenever you like. Also there is the ramfs filesystem which is a kind of better ramdisk. It is a ramdisk which is not based on real disk images held in ram but it is pure dynamic. This means that it takes not more ram from main memory then required for storing the files in the ramdisk plus some small metadata. A more flexible version of the ramfs is called tmpfs. This is a ramfs where the memory pages containing the data could be paged out into the swap partition. Not a good idea to avoid disk latency, but such a tmpfs is equivalent to the ramfs stuff if there is no swap. And If you have such a big machine where you think about placing some data into a ramdisk you can propably live without swap. And much more important, I believe that such a tmpfs also exists in IRIX. I am shure Solaris and *Bsd have such a tmpfs.
Other than that. there is a UNIX system call mlock (I believe provided by some POSIX standard, and I expect that it is available on IRIX) which is able to prevent paging for a given area of the address space. Also there is a possibility to map a file or parts of them into virtual memory of your process via the mmap call. This way you can access the content of the file by simply reading from memory through a pointer. And you can mlock this area. The mlock call then guarantees that the data in question is in main memory when it returns. So this is also a kind of prefetch algorithm with the advance that you can prevent throwing away important cached data by disk caching code when caching other less important files later. Hope this helps Greetings -- Mathias Fröhlich, email: [EMAIL PROTECTED] _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel