Documenting and enforcing locking requirements
Posted Jul 19, 2002 18:58 UTC (Fri) by
Lorenzo (guest, #260)
Parent article:
Documenting and enforcing locking requirements
In the topic: Documenting and enforcing locking requirements
... the paragraph:
As was discussed last week, one problem with an increasingly fine-grained
kernel is that it becomes difficult to know which locks, out of thousands,must be held at any given point. Some functions include documentation on their locking requirements (and sometimes it's even current), but many others don't. And there is no way for the code to actually enforce those requirements.
... just sends shivers down my spine at the complete misunderstanding by the author of fundamental principles of locking. To wit: "Some functions include documentation on their locking requirements ...".
The whole concept of "locking code" is broken as designed. One should lock data, not code. It is the data that is vulnerable to concurrent access and update, not the code. Once an engineer/programmer grasps that fundamental concept, the problem becomes more manageable.
Thanks. I feel much better now.
(
Log in to post comments)