We need opinions of embedded or real-time software designers on language features for shared resource protection.
We are improving our toolset for development of embedded and real-time (and other similar) software. Our toolset includes a graphical programming tool and a configurable real-time kernel. We are now introducing a shared resource protection mechanism to our kernel. We need to add some notation to our graphical (state diagram) language to express the use of protected resources. The choice of syntax may have a significant impact on ease of use, flexibility, clarity of expression, risk of error, and perhaps other important considerations.
There are basically two ways to express locking in programming languages. We can call them structured and unstructured locking.
In structured locking blocks of code are marked to access protected resources. These blocks must be well nested with each other and other program structures. This means that the set of locked items is defined by the position in the program, it does not depend on the path used to reach the position (excluding functions).
In unstructured locking protected resources are first locked and finally locked by execution of specific instructions. This means that the set of locked items depends on the locking and unlocking instructions along the way to the current position.
Whether we should offer the structured or the unstructured locking is a fundamental design decision we have to do. We want to choose the syntax that best serves the needs of software designers.
- What kind of experiences do you have with either or both kinds of locking syntaxes?
- What positive and negative implications do you see in these syntaxes, and how important do you think these implications are?
In addition we would like to have your opinion on:
- separate read and update locks
- compile-time checking of resource accesses without locking
Finally, what else should be considered regarding the features and needs related to resource protection and locking?
Regards,
Ari Okkonen OBP Research Oy