OS system's help
Francois-Rene Rideau
Francois-Rene Rideau <fare@tunes.org>
Wed, 6 Mar 2002 16:28:50 +0100
On Wed, Mar 06, 2002 at 05:27:06AM -0800, dee m. wrote:
> [...]
Yours sound a lot like a homework problem.
It's considered very bad taste to ask for help with homework
without making it explicit.
> ? (a) Is this protocol safe? (That is, only one
> process can be inside the critical section at once.)
Well, it depends on whether assignment is atomic in your
pseudo-programming language, etc. [see question (c).]
The fact that such explanations come afterwards show how
the problem is not formalized satisfactorily.
Actual computer architectures come with documented ways
to achieve efficient mutexes with special hardware support,
which includes bus locking and cache coherency enforcement.
Complex protocols such as the one you propose have strictly
no practical interest at all for software developers.
They are but academic exercises to test your understanding
of the underlying concepts.
Mutex protocols are important for hardware developers,
but then you'll be thinking in terms of electronic circuits,
not in terms of shared memory,
and timing latency will be very important.
PS: shameless self-plug. For a framework to specify concurrent
implementations of concurrent systems, see my paper
http://fare.tunes.org/tmp/implement1/
Or the first part of my thesis, that extends and generalizes it.
Sorry if it doesn't help.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
[ TUNES project for a Free Reflective Computing System | http://tunes.org ]
A patriot must always be ready to defend his country against his government.
-- Edward Abbey