[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] fork / vfork in   init.c
From:       John Williams <jwilliams () itee ! uq ! edu ! au>
Date:       2004-10-28 1:40:26
Message-ID: 41804E0A.7020808 () itee ! uq ! edu ! au
[Download RAW message or body]

Erik Andersen wrote:

 > On Tue Oct 26, 2004 at 01:18:45AM -0600, Erik wrote:
 >
 >>There are _no_ uClinux (mmu-less) systems with a working fork.
 >>To fork, the operating system must be able to do copy-on-write
 >>(COW), and to do COW, you have to have an mmu[1].
 >
 >
 > I forgot to write my footnote....
 >
 > [1] It is theoretically possible that one could actually
 > implement fork() on an mmuless system by doing a complete copy of
 > the address space of each forked process to some other place in
 > memory when ending that processes' time slice, and then copying
 > the entire lot back to the original memory location at the
 > beginning of the forked processes' time slice.  By doing such a
 > preemptive copy-just-in-case-there-might-be-a-write, it should
 > be possible to simulate COW behavior, at the cost of terrible
 > application performance.

I don't think copy-on-write is really the issue - it's just an 
optimisation for the fork()/exec() sequence.

The scheme you describe is required because a no-mmu system can't 
possibly know which values in the process's memory space are pointers, 
so cannot relocate it to a new address in physical memory..  With MMU/VM 
this is a non-issue because every process lives in the same virtual 
address space.

John


_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic