[TUHS] Interesting post about Microsoft and UNIX
Arrigo Triulzi via TUHS
tuhs at tuhs.org
Sun Dec 8 02:12:41 AEST 2024
On 7 Dec 2024, at 14:45, Henry Bent <henry.r.bent at gmail.com> wrote:
> Interesting, thank you for the explanation. How was file locking handled for DOS programs? Did it have some sort of internal call to "share" or was there a more elegant method?
Well, as the Unix filesystem was connected to MS-DOS as a “network drive” it had rudimentary opportunistic locking via the SMB protocol which I am not entirely sure actually translated to anything on the Unix side. There was often data corruption when writing from multiple MS-DOS sessions to the same file so the customer, who was particularly keen on the reading from multiple terminals more than the writing, simply decided that only one person could write into the inventory at one time. “Sneaker lock”?
Anyway, the port to native Unix was achieved in a couple of months, this was the ‘80s, code was simple and you didn’t have three rows of obscure buttons, a menu on top, another one to the side, etc. to be able to write a letter… Once we moved to Unix C-ISAM implemented proper record-level locking in the library itself and the problem went away (except for the inevitable code changes to handle C-ISAM saying “can’t access the record as it is locked, try again later”).
Arrigo
More information about the TUHS
mailing list