linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tabris <tabris@tabris.net>
To: eric@cisu.net, linux-newbie@vger.kernel.org,
	linux-c-programming@vger.kernel.org
Cc: rei_0000@arklinux.org
Subject: Re: Multithreaded /sbin.init? Is it possible?
Date: Mon, 15 Sep 2003 12:49:27 -0400	[thread overview]
Message-ID: <200309151249.29525.tabris@tabris.net> (raw)
In-Reply-To: <200309141240.55800.eric@cisu.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 14 September 2003 01:40 pm, Eric wrote:
> Hello,
> 	I have an interesting theory. I have beginning programming expereice
> and would like the input of those that have more expereince than me.
> Please don't flame if this is a waste of time. Rather I would like an
> open discussion on the why's and why nots of this.
> 	Wouldn't the Linux Boot process be speeded up if the init program was
> multithreaded? I know a little about threads.. and I think there might
> be some complication of PPID assignment coming from the threads which
> would probably terminate instead of having a PPID of 1 which is init
> and will never terminate. (i think?). Should init scripts have a parent
> PID of 1? Does this even matter?
> 	If I am correct, whenever a programs parent dies, its parent becomes
> init anyways. So when the thread finishes execution of the script, then
> its parent would become init just as if it had started sequentially and
> directly from init.
> 	The script links in /etc/rc.d/x.d/ would be grouped according to their
> S and K numbers. That is, if you have 5 scripts that are S5, each would
> be given to a thread to execute and there would be 5 threads. The init
> process would wait for each thread to clean up before proceeding to the
> next group. I know this would happen in an undefined order, but if you
> want, for example, DHCPD to start after network then you would assing
> S5network and S6dhcpd. There would still be a defined order for
> differently numbered scripts, just the bootup process wouldnt have to
> wait for each script to terminate sequentially. Each group would only
> take as long and the slowest script instead of the sum of the execution
> time of the scripts. The init would start with the S1 scripts and maybe
> fork 3 times, wait for each to finish...., then fork maybe twice for
> the S2 group if there are two scripts, wait for them to
> finish...etc....
> 	Is this even possible?
> ----------------------
> Eric Bambach
> Eric (at) CISU (dot) net
> ----------------------
Fwiw, there is a project ongoing with this very concept in arklinux, and 
it HAS shown some improvements in boot speed. I don't know exactly how 
much, but the goal is to boot (get to a login screen) in under 30 seconds 
on a desktop type system.

cc:d to the current project maintainer.

- --
tabris
- -- 
Space tells matter how to move and matter tells space how to curve.
		-- Wheeler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Ze2YtTgrITXtL+8RAiKdAJ9+3AnkmMdbRiWIwUIP6EYxzAymVACbBAkQ
KWUtU3Gu9+cjcc5jg668pAs=
=gRe5
-----END PGP SIGNATURE-----


  parent reply	other threads:[~2003-09-15 16:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-14 17:40 Multithreaded /sbin.init? Is it possible? Eric
2003-09-14 18:25 ` Jan-Benedict Glaw
2003-09-14 18:59   ` Eric
2003-09-14 19:37     ` Jan-Benedict Glaw
2003-09-14 18:59   ` Eric
2003-09-14 19:45     ` Jan-Benedict Glaw
2003-09-15 10:29 ` szonyi calin
2003-09-15 16:49 ` Tabris [this message]
2003-09-23  6:12   ` Nico Schottelius
2003-09-15 18:13 ` [resend] " Tabris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200309151249.29525.tabris@tabris.net \
    --to=tabris@tabris.net \
    --cc=eric@cisu.net \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=linux-newbie@vger.kernel.org \
    --cc=rei_0000@arklinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).