From f40de0116b50ce404ded6cfa836b9af6c433f5eb Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Tue, 27 Nov 2007 02:00:08 -0300 Subject: [PATCH 1/1] Initial import of miscelaneous documents for my thesis. --- d_info.txt | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++ links.txt | 5 +++ papers.txt | 76 ++++++++++++++++++++++++++++++++++++ 3 files changed, 192 insertions(+) create mode 100644 d_info.txt create mode 100644 links.txt create mode 100644 papers.txt diff --git a/d_info.txt b/d_info.txt new file mode 100644 index 0000000..f8427ab --- /dev/null +++ b/d_info.txt @@ -0,0 +1,111 @@ +Buscar a Kyle y sean_k en #d o #d.tango +======================================= + +Charla sobre GC de D: +===================== +2007-01-03: + sean_k, my name is Leandro Lucarella, I'm starting my grade + thesis on garbage collection and I'm planning to do it in the + context of D, so I was asking what's the relation between Tango + and D GC + I'm in an early stage of research, so any (basic) information + about how D is doing GC is welcome + Tango is effectively a replacement for Phobos, so it contains + language runtime code and a garbage collector, equivalent to + what's in phobos/internal and phobos/internal/gc. + Tango, however, splits the functionality out into separate + components, so you can swap in a different GC implementation at + application link-time. The defult Tango GC is a modified + version of the one in Phobos. + so the GC of D lives in phobos and it's completely implemented + in D? + yes + The D GC was written by Walter. It's a mark/sweep garbage + collector. Basically, if new called and the GC doesn't have any + memory available then it runs a collection and checkts its pool + again. If there still isn't enough memory for the operation + then it will allocate a new page from the OS via mmap (Posix) or + VirtualAlloc (Windows). + great + so there's is no support from the compiler (I mean, the GC just + uses the regular compiler features, there are no compiler + "hooks" for the GC)? + Not really, no. The only compiler "hooks" are simply the calls + that forward "new" and "delete" to internal functions. + good + Is there any good source about the D runtime? I mean, what is + done until you get to the D main()? Like who and when the GC is + started + There's no documentation for that, but in Phobos the startup code + is in internal/dmain2.d. Before D main is entered, all static + module ctors in the app will be run, and unit tests as well if + -unittest was specified at the command-line. Other than that, + the garbage collector and thread code is initialized. + The GC is initialized via a call to gc_init(), and it in turn + initializes the thread code via thread_init() (I think). + The GC is required to initialize the thread code because it relies + on the thread code for portions of its collection phase. First, + it suspends all running threads, then it scans each of their + stacks, then it resumes the threads. The thread code is + responsible for suspending and resuming threads and for telling + the GC where each stack is. + + +GCC Internals: +============== + +>Ok, I'll search the net. May I ask how did you learn how to hack gcc to +>add D support? +> +> +I started reading the internals guide +(http://gcc.gnu.org/onlinedocs/gccint/), but that was very +incomplete/misleading/out of date. My other major source was the GNU +Pascal compiler sources. Beyond that, it was mostly analyzing the GCC +source and trail-and-error. + +Quejas sobre el GC de D: +======================== +The problem with the D GC: + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=46407 + +Full Reflection Gets You Smarter GC: + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=44607 + +shootout.binarytrees when implemented with gc is 10x slower than C# on .NET 2.0: + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=43991 + +Is a moving GC really needed?: + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=42557 + +GC, the simple solution (propuesta de reference counting, son sus problemas): + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=38689 + +GC implementation (problemas de seguridad de GC conservativo): + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=35364 + +How does RTTI help gc?: + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=29291 + +thread and gc.fullCollect (bug en GC?): + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=5821 + +Transitioning to a type aware Garbage Collector: + http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=6842 + + +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=5821 + + +Programas que rompen (rompían) el GC: +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=46407 +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=6978 +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=54084 +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=56261 + +Compile-time compiler: +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=49164 + + +Más problemas de performance del GC de D (comparado con java6 en el shootout): +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=62369 diff --git a/links.txt b/links.txt new file mode 100644 index 0000000..de2d37c --- /dev/null +++ b/links.txt @@ -0,0 +1,5 @@ +Página de Jones sobre GC: +http://www.cs.kent.ac.uk/people/staff/rej/gc.html + +Modelo de tesis: +http://catarina.udlap.mx/u_dl_a/tales/documentos/lis/bonifaz_s_r/indice.html diff --git a/papers.txt b/papers.txt new file mode 100644 index 0000000..488ea11 --- /dev/null +++ b/papers.txt @@ -0,0 +1,76 @@ +GADT: +http://research.microsoft.com/users/simonpj/papers/gadt/ +http://www.cs.pdx.edu/~sheard/OmegaHaskellWkShp_files/ + +Type inference: +haskell.org -> Pople -> Mark Jones, Peyton Jones + +Gente trabajando en diseño de lenguajes: +http://www.cs.cmu.edu/~mleone/language-people.html + +Metaprogramacion: +http://en.wikipedia.org/wiki/Metaprogramming +http://en.wikipedia.org/wiki/Language_Oriented_Programming +http://www.onboard.jetbrains.com/is1/articles/04/10/lop/index.html +http://www.jetbrains.com/mps/ +http://opencxx.sourceforge.net/ +http://introspector.sourceforge.net/ + +Concept Programming (copado): +http://xlr.sourceforge.net/ + +Diapos sobre construcción de DSL usando OCaml + C: +http://www.venge.net/graydon/talks/mkc/html/index.html + +Sintaxis en distintos lenguajes: +http://merd.sourceforge.net/pixel/language-study/syntax-across-languages/ + +GC Bohem: +http://www.hpl.hp.com/techreports/2001/HPL-2001-251.html + +GC VZOOM: +http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=44880 +http://home.comcast.net/~vzoom/ +http://home.comcast.net/~vzoom/demos/pc_sample.c + +GC CBGC (Connectivity-based garbage collection): +http://portal.acm.org/citation.cfm?id=949337&coll=GUIDE&dl=ACM&CFID=6079566&CFTOKEN=11708043 +http://www.cs.colorado.edu/%7Ediwan/cbgc.pdf + +Más papers de los autores de CBGC: +http://www-cs.canisius.edu/~hertzm/ +http://www-plan.cs.colorado.edu/diwan/recentpapers.htm#Memory%20Management +http://domino.research.ibm.com/comm/research_people.nsf/pages/hirzel.index.html#papers + +Hard Real-Time Garbage Collection in the Jamaica Virtual Machine: +http://www.aicas.com/papers/rtcsa99_fsiebert.pdf +http://www.aicas.com/papers/jugs_7-Feb-2000_slides.pdf + +Hard Real-Time Reference Counting without External Fragmentation: +http://www.ritzau.se/liu/papers/etaps2001.ps + +Traditional GCs perform poorly when memory gets tight: some of the page +managed by the GC gets evicted to the disk by the Virtual memory Manager +(VM) of the OS, but when the GC does a garbage collection run, it will +swap in the evicted page which will cause the VM to evict another page, +etc. + +The Bookmarking Collector (BC) is a GC which communicates with the VM to +select the page to evict to avoid this memory trashing, it necessitates +a (small) patch to the OS so that the VM and the GC can communicate, +but the results are impressive compared to traditional GCs when there +is memory pressure: improved runtime and reduced pause (even if BC is +not a realtime GC). + +Here's the link to the video presentation (too bad, +the questions at the end are difficult to hear): +http://content.digitalwell.washington.edu/msr/external_release_talks_12_05_2005/12631/lecture.htm + +And the paper: http://www.cs.umass.edu/~emery/pubs/f034-hertz.pdf + + +BC is a moving memory GC implemented in a JVM, so the results are not +directly applicable to D, there's a non-moving variant of BC studied in +the paper it gets nearly as good runtime as BC, but the pause are not +as good. + -- 2.43.0