Christopher Smith wrote:
So basically you are talking about a problem with C,
No, that was the example. C, C++, Java, Python, Perl, Ruby, ... Pretty
much any imperative language that tacked threads on after the fact
without modifying the semantics beyond adding programmer-controlled
locking statements.
Contrast with (say) SQL, where transactional rollback is build into
every implementation. Or LOTOS. Or Hermes. Or NIL. Or Erlang. Or even
Ada for that matter.
Take NIL for example. IBM invented it a few decades ago for writing
networking software for big SNA switches. The source code is a bunch of
independent processes, each with their own address space. Integers don't
overflow, the only non-scalar data structure is essentially a relational
data table, and the only communication between processes is sending
values over pre-opened channels. They built the entire OSI stack as
seven layers of groups of processes, and allowed customers to include
their own modules with the assurance that those modules were unable to
cause trouble with IBM's code.
Then they compiled it down to raw machine code that ran without threads
at all and without address spaces at all. The CPU it ran on didn't even
have memory mapping hardware. Much of the time, source code that passed
a value to another process over a socket translated into the receipient
process groping directly into the original value at its original
address, because the optimizer could tell what's going on.
When they wanted to port it to dual-switches-with-hot-spare-fallover,
they found they only needed to improve the compiler, not rewrite the
software defining the protocol implementations.
Now, try to take a C/Java/Perl/Smalltalk program and distribute it
across redundant hot-spare hardware in different boxes without modifying
the source code. Tell me which currently-popular languages you think
this might be able to work for. SQL? Sure, already done. What else?
--
Darren New / San Diego, CA, USA (PST)
His kernel fu is strong.
He studied at the Shao Linux Temple.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg