How about update locks?
How about update locks?
Posted Jun 16, 2017 21:47 UTC (Fri) by Wol (subscriber, #4433)In reply to: How about update locks? by saffroy
Parent article: Range reader/writer locks for the kernel
When I wrote an accounts system, the OS allowed you to specify "many readers or one writer", "many readers and one writer", or "many readers and many writers". So all the accounts files were spec'd as "many readers and one writer".
So when the user updated the system, the program ran in read-only mode until they hit "confirm", at which point it opened the ledger master files followed by the individual ledger files in read-write mode, and replayed the update for real. (It does help if you have a coherent overall design when you need to do locking :-)
Range locks would be very useful for certain systems, though - relational databases spring to mind.
Cheers,
Wol
