Re: FreeBSD vs. OSX

From: jpd (read_the_sig_at_do.not.spam.it)
Date: 12/24/03


Date: Wed, 24 Dec 2003 16:06:43 +0000 (UTC)

In article <86llp2wcmy.fsf@t39bsdems.interne.kisoft-services.com>,
Eric Masson wrote:
> You're right, some oses solve this issue by placing drivers in userland
> and just keeping basic functions in kernel.

Some things you _have_ to run at quite high privileges. But you really
want to move things to where they can't break other things as much as
possible.

> Drivers (hardware, filesystems, protocols) can then be debugged with
> userland tools and won't crash the whole system if they fail.
>
> Take a look at the hurd or Mach for further information, FreeBSD has
> available patches that help running the ip stack in userland, iirc Dfly
> will investigate in this area for filesystems.

For example, FreeBSD ppp handles the control stuff --the most brittle
stuff, but not much of it, fortunately-- in userland, but has the much
simpler bulk of data transport handled by netgraph, in kernel space.

Running the entirety of the IP stack in userland is an interesting
excercise but I doubt it'll see much practical use: it just adds two
more context switches to the send and receive chains. I wonder what
mechanisms are available to circumvent that overhead.

-- 
  j p d (at) d s b (dot) t u d e l f t (dot) n l .


Relevant Pages

  • Re: Why is GForth-ITC fast?
    ... The kernel and the application code (so-called "userland") do not run ... That jump entails a "stack switch", ... kernel code obtains its own stack (the stack pointer register value is ...
    (comp.lang.forth)
  • Re: Attempted summary of "RT patch acceptance" thread
    ... tries to keep the userland API as close as possible to the non-RT one, ... by increasing the kernel complexity with relative slowdown. ... RTAI quickly becomes useless (ok it can run nanosleep with fusion fine, ... RTAI/rtlinux as the only hard-RT with guaranteed deadline. ...
    (Linux-Kernel)
  • Re: [RFC] Splitting kernel headers and deprecating __KERNEL__
    ... >> two parties on an ABI doesn't imply that one party gets to define it ... imposition, kernel developers won't care. ... because there's a contract with userland that they don't want to ... change in the copy/extract/whatever of kernel headers that userland is ...
    (Linux-Kernel)
  • Re: "Enhanced" MD code avaible for review
    ... be required to make this work correctly using a userland approach. ... > kernel, and having to try harder to crash the kernel. ... protected *sooner* if the system crashes. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Why is GForth-ITC fast?
    ... The kernel and the application code (so-called "userland") do not run ... That jump entails a "stack switch", ... the only thing is I guess if you want to do syscalls ...
    (comp.lang.forth)