Subj : Re: How to detect RAM disks (Was: how to detect cdrom?) To : Matthias Paul From : Steve Date : Thu Feb 14 2002 11:02 pm From: Steve@f3.n342.z1.cereal.mv.com (Steve) Subject: Re: How to detect RAM disks (Was: how to detect cdrom?) From: "E. S. (Steve) Fabian" Steve Fabian wrote: SF> I think that a better test would be to ensure that the drive SF> is not cached, Matthias Paul wrote: MP> Good idea - putting the actual burden to properly detect a RAM disk MP> on the implementation of a disk cache... ;-) No - what I meant is to disable all caching during the test, or the drive which is being examined. In SMARTDRV this could be done with (assuming the driveletter is in TSTDRV: smartdrv %tstdrv%- and similar methods in other cache programs. SF> and measure the drive access time to the first and last cluster. SF> If the times are the same and are in the submillisecond range, SF> comparable to access times of blocks of internal storage, one could SF> reasonably assume that it is a virtual disk, implemented in internal SF> storage (RAM). MP> Yes, this is also a good idea, but very difficult to do in practise, MP> not only because of the large differences in speed between the MP> machines from the earliest 4.77 Mhz PC to todays 2 Ghz number MP> crunchers, but also those in the RAM disks themselves. MP> Different memory areas may significantly differ in access speed, MP> in particular on older machines, or when EMM386 or similar is involved, MP> or when using conventional, UMB, or EMS memory. Another problem is MP> that it is very difficult to do accurate high resolutions timings MP> in the PC architecture, and in the few cases, where the hardware MP> offers special high-res timers, it is at least very hardware- MP> dependent and invasive... If caching has been disabled, and you time 10,000 executions of a loop which alternately reads the first and last cluster of the drive, and the total time does not permit seek and rotational delays, you have a high probability that you are dealing with a virtual disk, not a physical disk. Seek times are in the millisecond range; rotational delays at 7 200 r/min average 4.17 ms. There may be a problem if a real disk drive has its own cache. I posed the question to a technical representative of PowerQuest, the publisher of Partition Magic. Their software detect hard drives and partitions (primary, extended, logical), and the type of file system. I'll psot the answer when I get it. -- E. S. "Steve" Fabian ESFabian@BellAtlantic.net POB 1540, Cherry Hill, NJ 08034 Telephone: 856-354-1752 EMPIRE Consultants, Inc. Director, Software Development ------------------------------------------------------------------- -- |Fidonet: Steve 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .