smart compilers

Herb Chong, Computing Services herbie at watdcsu.UUCP
Tue Dec 25 23:45:03 AEST 1984


> Another goody from IBM, this time from the PL/I Programmer's
> Guide:
> 
> 	The use of bit strings in a multiprocessing environment may,
> 	occasionally, lead to incorrect results.

Taken out of context, this statement is indeed very silly.  You have to
read the paragraphs before and after this to understand that the PL/I
program can be easily communicating with another process sharing the
same address space and possibly written in another language.  No matter
what the compiler does, the silliness of the other program can wipe out
the best code generation.

The other thing is that the 370 architecture does not allow bit
addressing.  If you want to examine or modify a bit, you have to fetch
at least 1 byte and store at least one byte.  That byte you are
interested in may easily contain other bits that are being used by
other processes.  The PL/I language requires that if you are modifying
a bit string shared between two processes (and therefore in the same
address space), you must provide your own synchronization although it
doesn't really come out and say so in one place.

I might also mention (although this is nitpicking) that if you were to
refering to the PL/I Checkout or Optimizing compilers, the manual is the
PL/I Language Reference where this is explained in detail.

Herb Chong...

I'm user-friendly -- I don't byte, I nybble....



More information about the Comp.unix.wizards mailing list