jeffr_tech ([info]jeffr_tech) wrote,
Some further clarification;

Some people do not feel that the information being in the Rationale section makes it part of the standard. I feel that it clarifies the intent of other language in the standard. It's debatable. My point isn't really whether linux is standards compliant or not, it's just to document what atomicity guarantees there are and develop ways to maintain the current guarantees while providing greater concurrency in FreeBSD.

However, digging deeper you can realize some side-effects of the linux approach that produce even weirder results than a read seeing part of a write. For example, if two threads issue writes that cross page boundaries the results after they both complete can contain some data from both threads with the separation being the page boundary.

Usually when we deal with userspace races we try to let one or the other win. Like if two threads fnctl(.. F_SETFL, ..) simultaneously only one of them can win. But you wouldn't like the resulting flags to be some mix of both? I think you'd like it even less with file data.


Advertisement


(Read 7 comments)

Post a comment in response:

From:
(will be screened)
Help(will be screened)
Identity URL: 
Username:
Password:
Don't have an account? Create one now.
Subject:
No HTML allowed in subject
   Help
Message:
 
Notice! This user has turned on the option that logs IP addresses of anonymous posters. Help
Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…