[ale] compiled system calls versus shell scripts

Pete Hardie pete.hardie at sciatl.com
Wed Oct 22 16:40:26 EDT 2003


Christopher Bergeron wrote:
> Does anyone know if I would get a speed increase in my startup scripts
> by converting them to a binary?  Essentially, I'm trying to reduce my
> boot time by running my startup commands in parallel.  I stripped my
> startup scripts down to 1 file and I've appended the & on most of the
> commands (modprobes, ifconfig eth0 up, etc) in an attempt to speed
> things up.  But what I'm wondering is if I create a simple C program
> that just does:
> void main() {
>  system("modprobe whatever &");
>  system("ifconfig eth0 192.168.0.4 &");
> }
> 
> Would this give me a faster boot during this phase?  I'm thinking about
> doing this and replacing my /sbin/init altogether.
> 
> I know there are already packages out there that do this, but I'm doing
> it myself as more of a learning excercise.  I've also heard of using a
> Makefile to control startup, but that's a bit beyond me at this point.
> 
> Anyone have any suggestions?

system() invokes a shell, so you probably aren't gaining anything.

Did you see the /. article a few weeks back about using make for booting - it 
showed that it works to run things in parallel, if you know the dependency 
ordering of stuff.



-- 
Pete Hardie                   |   Goalie, DVSG Dart Team
     posting from, but not     |
     speaking for:             |
Scientific Atlanta, Digital Video Services Group



     - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.



More information about the Ale mailing list