[Beowulf] A start in Parallel Programming?
Robert G. Brown
rgb at phy.duke.edu
Mon Mar 19 08:28:31 PDT 2007
On Mon, 19 Mar 2007, Mitchell Wisidagamage wrote:
>> a) Learn C. No matter what you do, if you plan to be a "real coder"
>> you will sooner or later need to learn C. Sane people don't write
>> operating systems in Fortran or C++ or Lisp, and there are damn good
>> reasons for this. Also you can do amazing things with C and actually
>> understand what the computer is doing when you do them (because C has
>> been described on this very list as "a thin veneer of upper-level
>> language sensibility on top of raw assembler", a phrase that I just love
>> that is SO true even though I can't remember who actually said it. I
>> wish it were me but it wasn't:-). Who knows what LISP is actually doing
>> and how it is doing it? Not even the developers...
> I'm a c fan myself. However when I was doing the "safety-critical systems"
> module I was deeply disappointed to learn that c isn't "safe" and sometimes
> "not recommended" (by IEC 1508 when developing safety critical systems).
C for damn sure isn't "safe". Neither is assembler. Very few compilers
could be called safe in the sense that it is impossible to write buggy
code that is vulnerable to various exploits or at risk of crashing an
application, but C is arguably more dangerous than most because with
pointers and inlined assembler you can do "anything".
Total power and complete control is never safe. C is like an M-1 tank
armed with pocket nukes and with a built in levitation system and
antimatter propulsion system -- misuse it and you can blow up whole
worlds, but it can solve lots of problems very quickly. Safe is a kiddy
bike with training wheels -- not fast, not powerful, but if you pedal
long enough you can get where you want to go.
Unless you get run over by a tank, that is.
> I can understand why c is considered naughty but isn't it bad programming
> (systems development) to blame rather than the flexibility of the language?
Absolutely. With great power comes great responsibility. Neurosurgery
is not safe. Consequently Neurosurgeons require immense amounts of
training and have to work extremely carefully -- and people still die.
However, far more of them live! Putting band-aids on is safe. However,
try putting a band-aid on a brain tumor.
> I'm wondering what languages are actually used when developing critical
> systems (such as aviation and missile control systems?).
> My uni's LAN is protected but I found a similar lecture series at another uni
> on the net. See page 25 on:
> Full lecture series:
Got me. Whatever it is, it is perfectly capable of being buggy. And
whatever it is, the compiler itself was very, very likely written in --
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf