OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 05, 2024 1:22 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re:Digital Mars C / D compiler
PostPosted: 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....


Top
  
 
 Post subject: Re:Digital Mars C / D compiler
PostPosted: Fri Feb 03, 2006 8:39 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
Pype.Clicker wrote:
that's okay enough for userspace. in kernel space, we usually have slabs and the like providing similar "constant-time" allocation out of pre-sliced chunks. I have network processing in mind: you need a new buffer for each packet you receive, and you usually release that buffer everytime the packet has been fully processed.

Letting the GC do its business here might require a too high priority when network gets more busy ... At least, if i was in charge, i'd be using my own pool of buffer here even in a language that supports garbage collection ...


These may be among the reasons that Singularity implements all its drivers in separate processes (I can't really say "user mode", because the entire system actually runs in ring 0, but the processes are isolated via type safety and separate GCs).

<edit>
Doh, didn't see Rob's reply. :-[

@Rob:
Yes, I'm really interested in Singularity. I read their technical report and watched the interviews on Channel 9. It's so different than other OSes I've studied -- that's what makes it fascinating.

I actually am working on my own OS, but not lately, as work has become extremely busy.

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot], Bing [Bot], Google [Bot] and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group