[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Init : someone could comment this ?

Kevin Kofler wrote:
Casey Dahlin <cjdahlin <at> ncsu.edu> writes:
What about busybox? What if we ran all the init scripts under busybox? Its a shell-type environment, its world-famous for being incredibly tiny, it could meet everything.

AFAIK, busybox still forks whereever a regular POSIX shell forks, so if the amount of forks is the problem, AFAICT busybox will resolve absolutely nothing.

A shell which emulates POSIX process handling in-process and uses direct builtin function calls for commands like sed rather than forking a new process (even a new process of itself as busybox appears to be doing) could work, but would that be maintainable? And what about parallelism: threads? Pipes and the like would also have to be emulated by special-case code to become as efficient as a real programming language, which would drive maintainability even further down (imagine having to implement memory-to-memory, memory-to-file, file-to-memory and file-to-file versions of all tools like sed, grep etc.).

        Kevin Kofler

I'm not certain that the fork is the issue so much as the subsequent execve. Its disk IO we're looking to reduce, and having all the commands in one process image that is loaded at script start helps a lot.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]