[cap-talk] Dan Bernstein's qmail security lessons paper

Sandro Magi smagi at higherlogics.com
Mon Dec 17 11:38:12 EST 2007


Tony Finch wrote:
> The other problem is concurrency. Java assumes lots of cross-thread
> sharing, so the standard library tends to be rather heavily locked
> (causing lots of synchronization overhead), and the GC has to be rather
> more complicated than Erlang's per-process heaps or E's vats.

Indeed. The various escape analyses I referred to in another message do
double-duty to remove locking; if an object can be stack-allocated,
locking and unlocking is pointless after all.

Concurrent GCs as in .NET and Java are indeed more complicated as they
must synchronize with the mutator, though I wouldn't go so far as to say
that Erlang's is simple: their per-process GC is a simple copying
collector, but they use a global shared heap for exchanging messages
which is collected incrementally; generally, maintaining two different
GCs is more challenging than a single GC.

Sandro


More information about the cap-talk mailing list