Re: execute a user process in the kernel

From: Dag-Erling Smørgrav (des_at_des.no)
Date: 09/25/04

  • Next message: jromero_at_save-ferris.com: "SMP on quad xeons"
    To: Mike Meyer <mwm@mired.org>
    Date: Sat, 25 Sep 2004 16:35:06 +0200
    
    

    Bruce M Simpson <bms@spc.org> writes:
    > On Sat, Sep 25, 2004 at 01:35:07PM +0200, Dag-Erling Smørgrav wrote:
    > > > If we were to implement POSIX spawn(), we'd need something like this.
    > > Uh, no. posix_spawn(3) can be implemented entirely in userland and
    > > does not require any special kernel support.
    > Discussions with peter@ and others on IRC have been ongoing regarding doing
    > it in kernel space, so as to avoid unnecessarily expensive VM fork operations
    > when 'spawning' a process.
    >
    > I'd be interested to hear more about your proposal for doing this in userland.

    posix_spawn(3) can be implemented in terms of fork(2) / execve(2), and
    if you're worried about VM overhead you can always use vfork(2) (which
    has the additional benefit of allowing you to pass an error code back
    to the parent process, since the child can write to the parent's
    address space until it calls execve(2)).

    DES

    -- 
    Dag-Erling Smørgrav - des@des.no
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: jromero_at_save-ferris.com: "SMP on quad xeons"