tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

GSoC project idea: posix_spawn

Hi all,
from a discuss with Matt Thomas, here is a last minute GSoC project
idea. A few years ago NetBSD got a real vfork(2) implementation and it
was shown at the time, that this offers a measurable performance benefit
for fork intensive work loads like release. vfork avoids the
overhead of marking the process as copy on write. Fast forward to the
current time. A lot of services are now implemented by multithreaded
programs. vfork(2) and multithreading don't play well with each other.
Additionally, SMP systems are the norm now and creating and shortly
after killing an address space is not cheap. Processes have also grown a
lot and a plain fork() is quite expensive from a 8GB JVM.

POSIX added an interface that for this purpose: posix_spawn. This is
a combined fork+exec and can be used to implement popen and more
advanced things. FreeBSD and some other systems have a userspace
implementation, which works, but can't reap the benefits mentioned above.

Implementing a real posix_spawn system calls could do that. Measuring
the impact for different work loads makes a nice research paper as side
effect. This includes both estimate the temporary memory used and the
performance implications.

Difficulty: medium-hard


Home | Main Index | Thread Index | Old Index