Hi Cordata, > All this talk about UIDE prompted me to investigate this tool. It > looks interesting. How does the caching work for disk writes? I > assume that when the cache is full the next sector read in will cause > the oldest sector to be written out?
Neither UIDE nor lbacache nor cdrcache will pool / delay writes, so writes always happen immediately unless the built-in write cache of your drive is used (many newer drives have one). You could use the DR-DOS NWCACHE for delayed / pooled writes. If you want to run some experiments about how much which NWCACHE setting helps, let me know so I can suggest some settings that I would be interested in :-). > Is there any sort of a timer which will flush the cache to the hard > drive periodically? How do you make sure that the RAM cache is > written to the disk? My personal guess is that it would be "safe" to limit the amount of "dirty" (not yet written) cache data to ca 8-128 kB, which should already give quite noticeable speed improvements and flush pending writes after 0.3 to 2.5 seconds or at program exit or at (int 19) reset or when ctrl-alt-del is pressed, whichever happens first. As you know, DOS has no "shutdown menu item" so people just assume it is fine to switch off or hard reset the computer at any time, but are unlikely to do so exactly at the moment when they write to disk and are likely to first return to the prompt before switching off. As you can see, it is still relatively complex to check for all the suggested "flush triggers" and drives have their own cache anyway, so neither UIDE nor lbacache "took the risk and effort" to supply a delayed / pooled write scheme themselves... It would be interesting to have one for slow USB flash memory but then UIDE and lbacache do only cache BIOS int13 drives by default so you would want to cache more "cdrcache style" or use special DOS USB drivers which include or invoke caching explicitly. A modern BIOS will make USB sticks etc which are already present at boot visible as int13 disks but note that you "cannot" unplug/exchange drives while DOS is running then. Regards, Eric ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user