Re: [Freedos-user] shutdown and USB Stick ?

2024-01-30 Thread Eric Auer via Freedos-user


Hi!


Does the Shutdown- Command merely provide for those »spinning down« delays to...


The idea is that it is better for mechanical harddisks to first
spin down and park heads before you switch off the power supply.

Spinning down may take a moment. Also, this gives the disk the
chance finish writes from the internal cache of the disk, if it
has one and it is enabled. The latter also is useful for SSD.

If you do have a software cache with delayed writes, such as
SMARTDRV or NWCACHE with the respective features activated,
it may also be useful to wait a moment after triggering the
cache flush, but actually:

Could somebody who HAS those caches TELL me whether this is
necessary? It could also be the case that the caches do the
complete flush in a blocking way anyway. So when I give them
a hint that they should flush, they might block all other DOS
activities until they are done with flushing? In that case,
no additional delay would be necessary.

Regards, Eric




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] shutdown and USB Stick ?

2024-01-30 Thread Thomas Cornelius Desi via Freedos-user
Great advice. Thanks. 
(So: Does the Shutdown- Command merely provide for those »spinning down« delays 
to make sure procedures have terminated?)


> On 29.01.2024, at 21:39, Michael Brutman via Freedos-user 
>  wrote:
> 
> FAT is finicky but FAT is not the issue here.
> 
> As long as the machine has sufficient time to complete its last writes and 
> you don't have any programs running using the disk, it should always be safe 
> to shut down - DOS doesn't buffer or delay writes unless you have some sort 
> of disk caching program running and if your disk cache is doing something 
> fancy it will have its own shutdown procedure.
> 
> Hard drives also have write caches and often run with write caching enabled.  
> The solution is the same - wait a few seconds for the last writes to be 
> flushed to the media.
> 
> And the same will apply to any other storage device, USB sticks included.  
> Make sure the system is quiet for a few seconds so the device can commit it's 
> writes.  Then shut down.
> 
>   
> 
> On Mon, Jan 29, 2024 at 10:22 AM Louis Santillan via Freedos-user 
>  > wrote:
>> FAT is always a finicky filesystem, especially if you're utilizing a caching 
>> or BIOS emulation for USB HDDs.  Are you using a caching program like 
>> lbacache, cdrcache, smartdrv, etc?
>> 
>> On Mon, Jan 29, 2024 at 7:11 AM Thomas Cornelius Desi via Freedos-user 
>> > > wrote:
>>> I boot FD from a USB Stick. 
>>> Can using »shutdown« command prevent that a bootable USB Stick with FD 
>>> becomes unusable? (Happened last week.)
>>> 
>>> add: is the shutdown command also working in the previous FD version? 
>>> (Which I am normally using. I never used the »shutdown«  command before. 
>>> Just switch off the computer )
>>> 
>>> 
>>> T.
>>> 
>>> ___
>>> Freedos-user mailing list
>>> Freedos-user@lists.sourceforge.net 
>>> 
>>> https://lists.sourceforge.net/lists/listinfo/freedos-user
>> ___
>> Freedos-user mailing list
>> Freedos-user@lists.sourceforge.net 
>> 
>> https://lists.sourceforge.net/lists/listinfo/freedos-user
> ___
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user

___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] shutdown and USB Stick ?

2024-01-29 Thread Eric Auer via Freedos-user



Hi!


FAT is always a finicky filesystem, especially if you're utilizing a
caching or BIOS emulation for USB HDDs.  Are you using a caching program
like lbacache, cdrcache, smartdrv, etc?


Of those 3, only SMARTDRV can cache data before it gets written.
Even this delayed write caching is a config choice of the user.

The other 2, as well as Jack's drivers with built-in caches,
always send writes to the disk immediately. They only use the
cache to speed up reads. The don't delay writes as in collecting
them in DOS-based cache RAM and then sending them to disk later.

However, various types of harddisks and SSD have built-in caches
which can collects written data before it actually gets sent to
disk. And even without a cache, a shutdown or reboot can easily
happen at a moment where some disk contents are being sent to
disk and only some of them have arrived yet.

As a rule of thumb, it is generally safe to disconnect drives or
shutdown or reboot DOS as soon as you are back at the DOS prompt
and the disk activity light has stopped. Maybe wait an extra sec.

Longer waits or explicit flushes of write caches should only be
necessary if you have explicitly enabled such caches. SMARTDRV,
when you tell it to enable delayed write caching (DR DOS NWCACHE
also has a "write pooling" mode as a "smaller" write delay choice)
will monitor some activities to trigger flushes itself:

For example, it would flush the write cache when an app exits
(or returns to the prompt) or when you press ctrl-alt-delete
or when there were no disk accesses for some amount of time.

Regards, Eric




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] shutdown and USB Stick ?

2024-01-29 Thread Michael Brutman via Freedos-user
FAT is finicky but FAT is not the issue here.

As long as the machine has sufficient time to complete its last writes and
you don't have any programs running using the disk, it should always be
safe to shut down - DOS doesn't buffer or delay writes unless you have some
sort of disk caching program running and if your disk cache is doing
something fancy it will have its own shutdown procedure.

Hard drives also have write caches and often run with write caching
enabled.  The solution is the same - wait a few seconds for the last writes
to be flushed to the media.

And the same will apply to any other storage device, USB sticks included.
Make sure the system is quiet for a few seconds so the device can commit
it's writes.  Then shut down.



On Mon, Jan 29, 2024 at 10:22 AM Louis Santillan via Freedos-user <
freedos-user@lists.sourceforge.net> wrote:

> FAT is always a finicky filesystem, especially if you're utilizing a
> caching or BIOS emulation for USB HDDs.  Are you using a caching program
> like lbacache, cdrcache, smartdrv, etc?
>
> On Mon, Jan 29, 2024 at 7:11 AM Thomas Cornelius Desi via Freedos-user <
> freedos-user@lists.sourceforge.net> wrote:
>
>> I boot FD from a USB Stick.
>> Can using »shutdown« command prevent that a bootable USB Stick with FD
>> becomes unusable? (Happened last week.)
>>
>> add: is the shutdown command also working in the previous FD version?
>> (Which I am normally using. I never used the »shutdown«  command before.
>> Just switch off the computer )
>>
>>
>> T.
>>
>> ___
>> Freedos-user mailing list
>> Freedos-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/freedos-user
>>
> ___
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
>
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] shutdown and USB Stick ?

2024-01-29 Thread Louis Santillan via Freedos-user
FAT is always a finicky filesystem, especially if you're utilizing a
caching or BIOS emulation for USB HDDs.  Are you using a caching program
like lbacache, cdrcache, smartdrv, etc?

On Mon, Jan 29, 2024 at 7:11 AM Thomas Cornelius Desi via Freedos-user <
freedos-user@lists.sourceforge.net> wrote:

> I boot FD from a USB Stick.
> Can using »shutdown« command prevent that a bootable USB Stick with FD
> becomes unusable? (Happened last week.)
>
> add: is the shutdown command also working in the previous FD version?
> (Which I am normally using. I never used the »shutdown«  command before.
> Just switch off the computer )
>
>
> T.
>
> ___
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
>
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] shutdown and USB Stick ?

2024-01-29 Thread Thomas Cornelius Desi via Freedos-user
I boot FD from a USB Stick. 
Can using »shutdown« command prevent that a bootable USB Stick with FD becomes 
unusable? (Happened last week.)

add: is the shutdown command also working in the previous FD version? (Which I 
am normally using. I never used the »shutdown«  command before. Just switch off 
the computer )


T.

___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user