Feedback needed on BOOTING, CACHING and some HELPER TOOL
Eric Auer <[email protected]> Wed, 6 Nov 2002 22:34:14 +0100 (MET)
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, in reply to: Re: MetaKern / ... suggestions revisited (from Bart), I have some questions. Bart writes that the BIOS only calls the boot sector or MBR with DL set to either 0 or 0x80 (A: or C:). I wonder what happens with modern BIOSes that allow booting from D: ? Do they change the order of drives, so that 0x80 and 0x81 get swapped? Bart also writes that autoexec.bat is only read from A: or C: when boot drive is "any floppy" or "any harddisk" (at least for hard- disks, this is very useful, because one cannot know which drive letter the "currently active partition of drive 0x81" and so on corresponds to normally, especially when boot managers are involved). Also, he writes that the MBR may set the drive number to an arbitrary value before starting the boot sector. I think for FreeDOS this means you can load the KERNEL from any drive, but the autoexec.bat / config.sys issue remains (you know, config.sys can point to autoexec.bat at arbitrary position using /P=x:\foo\bar.bat or so). Bart also reminded me that FreeDOS -does- have a "prompt for path to the command.com" which gets active when the shell is not found or exits un- expectedly. I was accidentally requesting the feature again :-). MS DOS has this as well. You can enter any program that can stand not having a parent process as your new shell at that kernel prompt, I would say. Finally, if some of you still have SMARTDRV: Yes, I know, most of the performance comes from the ability to pool/delay writes. But could you please benchmark two other things for me? - smartdrv defaults to an element size of 8k (1..8k possible), even though this increases the resident size. I am planning to change the element size of LBAcache from 2k to 4k, which will actually DECREASE the amount of DOS memory used :-). The problem is that an element size which is smaller than the cluster size could decrease performance, I believe. The reason is that all sectors in a cache element must be from the same region of the disk, so the cache gets less flexible in chosing which sectors to cache with bigger element sizes. Please tell me what happens with different element sizes for SMARTDRV (please disable write caching with the /X option) for your favourite benchmark application. - Smartdrv allows the use of a read-ahead buffer. SMARTDRV reads by default 16k more when you do large reads, in anticipation of successive reads. You can give other sizes with the /B:size option (must be a multiple of element size), for example 0. Adding read-ahead to LBAcache would mean - like with SMARTDRV - an extra buffer in DOS memory to be required. In SMARTDRV, the buffer is as big as the read-ahead, but with LBAcache, it could be as small as 1/2k. Please tell me if read-ahead is worth the effort after doing tests with your favourite benchmark application (yet again with /X. Try e.g. values of /B:0, the default 16k and /B:64k - not sure about the "64k" syntax here but you get my point). Finally, I would need some special extra for batch file processing: something like "dir > @foo" which would store the output of dir in the environment variable FOO would be nice. However, I currently only need one SIMILAR tool: thingy x:\foo\bar\baz.com would set %DRV% to X (preferably not X:), %DIR% to \foo\bar (or \foo\bar\) and %NAME% to baz and %EXT% to com (preferably not .com). cd | thingy would set %DRV% and %DIR% (would need to detect that "bar" is a directory and not a file, because "cd" does not print the trailing "\"). echo x:\%DEST%\file%NUMBER%.com | thingy would set %DRV% and %DIR% and %NAME% and %EXT% in a way which you already guess by now :-). A bonus option could allow: echo x:\%DEST%\file*.com | thingy /new which would fill the "*" area in a way that makes the resulting file name the name of a not yet existing file, for example by filling in a number. Do you know such a tool? Or do you feel like writing one? I think it would not be too hard. Thanks for your efforts! Feel free to virtually kick me to force me writing that tool myself... Cheers, Eric PS: Bart usually uses Dosemu to compare kernels. Anybody else that could need a "prompt for KERNEL name" feature in MetaKern? Anybody that could use some "boot from B:" or "D:" menu entries there (see discussion above)? I think the only useful addition to the current version would be a "boot from A:" menu entry. Comments? PPS: SMARTDRV is part of MS DOS and incompatible to most of our memory drivers, so please test it with MS DOS. At your option, use the DR-DOS cache to do similar tests as the suggested ones above. All other mentioned software like LBAcache and the MetaKern boot menu can be found either at http://www.coli.uni-sb.de/~eric/stuff/soft/ somewhere or at some other place in the FreeDOS universe :-). The "thingy" cannot be found anywhere yet.