[Coco] Using that 16/32/64 MB RamDrive.

Robert Gault robert.gault at worldnet.att.net
Fri Feb 6 04:06:20 EST 2004


Paul T. Barton wrote:
> Robert,
> 
> I get $03E000 good sectors for a full
> ~62mb ramdisk. For a size of
> ($3E000 * 256) 65,011,712 bytes.
> 
> Also, I noticed that there's no "busy"
> bit anywhere so it may be disastrous if
> I go to a second window and do a dir /r0
> while the first window is writing to /r0.
> What about V.BUSY can this be
> used effectively?
> 
> I have screen pix and repack pix
> but I don't know where to put them?
> Dennis?
> 
> Thanks again,
> Paul

Interesting question. My guess is that it would not matter if read/write 
is done at the same time. There could be cause for worry if write/write 
were done at the same time, however.

Before rammer does either a read or write, the interrupts are disengaged 
so that the MMU block can be safely changed. This would prevent two 
simultaneous r0 operations from happening. It should also prevent rbf 
from allocating the same same sectors of the ram disk for different 
files. As a point of reference, I don't see any V.BUSY code in the 
current rammer that I used as a model. Keep in mind that a ram disk is 
not an external drive which could be busy but the OS has no way of 
checking short of polling or using V.BUSY.

Paul, would you try to test this proposition on your hardware? Pick some 
large file (or directory) and try to copy it (or dsave it) to the ram 
disk simultaneously from more than one window. Let me know if there is 
data corruption. If you can show that it occurs, a busy indicator can be 
added to the rammer code.




More information about the Coco mailing list