(Execution) Termination bit, Alternation bit.

Chris Angelico rosuav at gmail.com
Tue Dec 22 10:56:51 EST 2015


On Wed, Dec 23, 2015 at 2:46 AM, Skybuck Flying <skybuck2000 at hotmail.com> wrote:
> One idea which immediatly comes to mind to fix this problem is to offer a
> "PushTerminationFlag" onto stack and then a "ClearTerminationFlag"
> instruction.
>
> Then a code section can be executed without breaking or terminating.
>
> Once that's done the code would then call "PopTerminationFlag".
>
> At least this offers some protection against arbitrarely breaking code
> sections.

Congratulations! You've just rediscovered 'critical sections'. So...
what happens if there's a programming bug that means you fail to pop
the termination flag? Wouldn't it be so nice if you could use...
exception handling?

Here on python-list/comp.lang.python, we have all those high level
facilities. We don't need new CPU-level features to make this work.
Are you massively cross-posting? Either way, this is pretty off-topic
for here. Read up a bit on what's already been done (most of what
you're talking about was already solved back in the 1990s when I was
programming on OS/2, and I'm pretty sure the solutions were all lifted
directly from mainframe research in previous decades), or just use
high level languages and save yourself a boatload of trouble.

ChrisA



More information about the Python-list mailing list