[ale] compiled system calls versus shell scripts
Geoffrey
esoteric at 3times25.net
Fri Oct 24 06:01:48 EDT 2003
Christopher Bergeron wrote:
<snip>
> (and make -j) will allow the commands to startup faster than just
> starting them from a single shell script (as above).
It will as the -j flag will permit you to run some of the scripts in
parallel. In your script example you're not taking advantage of
parallelism, but you could. It would require using the use of 'wait'
with the backgrounding of processes. You example of:
modprobe mousedev
X &
modprobe natsemi
ifconfig eth0 192.168.0.x up
sshd &
nfsd &
won't let the network stuff start up until after the mousedev mod is
available and the network stuff is not dependent on that module, thus
you could have some parallel effort as follows:
modprobe mousedev &
mousedevpid=$!
(wait $mousedevpid; X & ) &
Xpid=$!
modprobe natsemi &
natsemipid=$!
(wait $natsemipid; sshd & nfsd &) &
networkpid=$!
.
.
.
The above will permit 'modprobe natsemi' to begin before 'modprobe
mousedev' completes. Now this is probably a poor example as modprobe
will be pretty fast, but if you had this applied to say, 25 module
installations, you could likely see a difference.
--
Until later, Geoffrey esoteric at 3times25.net
Building secure systems inspite of Microsoft
More information about the Ale
mailing list