View Single Post
Old 04-14-2023, 04:05 PM   #16
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,431
Karma: 107078855
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by kovidgoyal View Post
No, it is mandatory. On windows, all files are locked as soon as they are opened, unless the application specially opts to use a file sharing mode. And both applications have to use the file sharing mode when opening files for sharing to work.

In contrast in POSIX file locking is advisory, opening files does not lock them unless the application asks for them to be locked and both applications have to ask for the lock for locking to work.
It maybe didn't apply to Win 3.x & Win9x etc but only NT as NT from NT 3.1 in 1993 used files as part of virtual memory to reduce usage of the swap file and improve performance, though I had assumed it was only program files, not data. But also there was a mode were instead of File I/O an NT program (not Windows on DOS boot which even ME as well as win9x is) could access a file as if it was an array in (virtual) memory.
Hence the logic of file locking on NTFS unless both (all) programs opened explicitly in shared mode.
Quoth is offline   Reply With Quote