Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] GSOC 2008
  • From: Randall R Schulz <rschulz@xxxxxxxxx>
  • Date: Thu, 20 Mar 2008 14:23:12 -0700
  • Message-id: <200803201423.12885.rschulz@xxxxxxxxx>
On Thursday 20 March 2008 14:12, debayan wrote:
Randall, i meant does the OS fork off new processes/threads for each
IP to be scanned? I know the shell forks off new processes. I am just
asking about the working of the ping command, especially the
broadcast part .... infact i will go through the source code just to
be sure.

I don't believe the standard ping command can operate on multiple
destination IPs at once.

Nonetheless, if I were to write such a thing, I might use threads, but
it would depend on how many concurrent pings I needed to support. If it
were less than, say 20, I'd probably just use fork under the covers (of
the CLI interface it specifies). But beyond that, it would be onerous
to make the OS schedule so many full processes.

But it's important to keep in mind that in modern operating systems the
use of shared libraries makes the overhead of running many instances of
a single program much less than it would be without such techniques.
And in the case of a program with so little data to manage as a
multi-address ping command, that would let you get away with just
forking up to a moderate number of concurrently ping-ed addresses.
Nonetheless, they're called "lightweight" (as Anders noted) for a
reason. There's far less per-thread overhead than there is per-process.

Even a guru may be wrong!!

I used to be a guru. Now I can't even spell it.


Debayan Banerjee

Randall Schulz
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups