Re:Ask HN: Why don't file systems and OS's provide file syst...
by chrismorgan on Saturday July 23, 2022 @03:22AM
(#32201181)
It feels to me rather like the difference between cooperative versus preemptive scheduling. Some mainstream operating systems used to use cooperative scheduling. All have long shifted to preemptive scheduling. File system transactions would be global in the same way kernel-space cooperative scheduling is—and one malicious or even buggy process can now bring down the whole system.
In a fully controlled environment you could do it, just like you can do cooperative scheduling, but outside of such an environment you just can’t do it in any way sanely.
Re:Ask HN: Why don't file systems and OS's provide file syst...
by charcircuit on Saturday July 23, 2022 @03:12AM
(#32201130)
A filesystem is a database.
Transactional operations bring the chance of deadlocks. Deadlocks cause performance and denial of service implications. Deadlocks are far more easier to detect vs prevent vs avoid. Detected deadlocks are resolved by killing one of the requests, which must be handled by the cooperating and highly coupled processes.
The filesystem is an abstraction of convenience and very loose rules. Instead of all the structure and rigor a database brings a program just gives a string to the os and gets bytes back. The cost of this ease of use is that you must keep your program's demands and expectations low.