Re:Digital Mars C / D compiler
Posted: Fri Feb 03, 2006 6:51 am
To get back to Singularity (remember, this is a micro kernel) and their GC'ed world, here is how they do it:
- the kernel has a garbage collector, but it is different one that processes have
- exchange of data goes over/through an exchange heap where an object can only have one owner. So a network packet is on that, not in kernel memory. This is definitely not garbage collected, I think it was reference counted (which in their case is easy to do since an object can only have one owner [pointer, kinda])
- since processes (including drivers) can only be written in a safe (normally interpreted, but in this case dynamic compiled) language there is no use of ring 3 or other hardware safeties. I would think that this gives them a lot of extra speed which minimizes the impact of garbage collectors (which speed tests seem to confirm)
Their idea and project setup was that running just a safe language with GC was probably not going to work. They did a lot of things different than (most) "standard/other" kernels do it.
So if anyone ever wants to do a GC'ed OS themselves it's probably a wise idea to look at the big picture....
- the kernel has a garbage collector, but it is different one that processes have
- exchange of data goes over/through an exchange heap where an object can only have one owner. So a network packet is on that, not in kernel memory. This is definitely not garbage collected, I think it was reference counted (which in their case is easy to do since an object can only have one owner [pointer, kinda])
- since processes (including drivers) can only be written in a safe (normally interpreted, but in this case dynamic compiled) language there is no use of ring 3 or other hardware safeties. I would think that this gives them a lot of extra speed which minimizes the impact of garbage collectors (which speed tests seem to confirm)
Their idea and project setup was that running just a safe language with GC was probably not going to work. They did a lot of things different than (most) "standard/other" kernels do it.
So if anyone ever wants to do a GC'ed OS themselves it's probably a wise idea to look at the big picture....