Adding Java and C++ to the MQTT benchmarks or: How I Learned to Stop Worrying and Love the Garbage Collector
Paulo Pinto
pjmlp at progtools.org
Fri Jan 10 01:24:14 PST 2014
On Thursday, 9 January 2014 at 23:02:57 UTC, Joseph Rushton
Wakeling wrote:
> On 08/01/14 21:22, Paulo Pinto wrote:
>> As I shared a few times here, it was Oberon which opened my
>> eyes
>> to GC enabled systems programming languages, around 1996,
>> maybe.
>
> What was the GC design for Oberon, and how does that relate to
> what's in D (and what's in other GC'd languages)?
The original Oberon was a simple mark and sweep collector.
Initially implemented in Assembly. In later versions it was coded
in Oberon itself.
Original 1992/2005 edition
http://www.inf.ethz.ch/personal/wirth/ProjectOberon1992.pdf
2013 edition with images of the workstations were Oberon ran
http://www.inf.ethz.ch/personal/wirth/ProjectOberon/PO.System.pdf
EthOS used a mark and sweep GC with support for weak pointers and
finalization. Running when the system was idle or when not enough
memory was available.
http://research.microsoft.com/en-us/um/people/cszypers/books/insight-ethos.pdf
Active Oberon implementation used a mark and sweep with
finalization support.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.85.5753&rep=rep1&type=pdf
Modula-3 used a compacting GC initially, with an optional
background one.
https://modula3.elegosoft.com/cm3/doc/help/bib.html
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.36.6890
Cedar used a concurrent reference-counting collector, coupled
with a mark and sweep one for cycle removals, with finalization
support
http://www.textfiles.com/bitsavers/pdf/xerox/parc/techReports/CSL-84-7_On_Adding_Garbage_Collection_and_Runtime_Types_to_a_Strongly-Typed_Statically-Checked_Concurrent_Language.pdf
The features are quite similar to D:
- GC
- Allocation of data structures statically in global memory and
stack
- Escape hatches to allocate memory manually when needed
I cannot say if they also allow for interior pointers like D does.
However the main point about Oberon and other languages wasn't
only technical, but human. Funny enough that is also Andrew
Koening's latest post
http://www.drdobbs.com/cpp/social-processes-and-the-design-of-progr/240165221
The people designing such systems believed that it was possible
to write from the ground up a workstation operating system in a
GC enabled systems programming language, with minimal Assembly.
They did succeed and built workstations that were usable for
normal office work, which were then used at ETHZ, Xerox and
Olivetti for some time.
For games, some more effort would be required I do acknowledge
that.
However the world at large, ignored these efforts. As Andrew
nicely puts on his article, many times the social barrier is
higher than the technical one.
For many developers hearing the GC word, safe coding, bounds
checking is enough to make them run away as fast as they can.
--
Paulo
More information about the Digitalmars-d
mailing list