Re: fork ???
- From: Sri Ramkrishna <sri aracnet com>
- To: Havoc Pennington <hp redhat com>
- Cc: Magnus Wirström <asd mail bip net>,gnome-devel-list <gnome-devel-list gnome org>
- Subject: Re: fork ???
- Date: Fri, 14 Jul 2000 11:15:05 -0700 (PDT)
> Sri Ramkrishna <sri@aracnet.com> writes:
> > You probably don't want to do a full fork as it takes a lot of system
> > resources most of which you don't need. Use a vfork and then have teh
> > child execute a execve system call. The parent will suspend until you
> > issue the execve.
> >
> > Caveats are that vfork doesn't make your code very portable from what I
> > glean from the linux kernel mailing list.
> >
>
> Just use fork(), it's cheap on Linux, certainly cheap enough for most
> uses.
Well yeah. :-) Typical PC with 64M of Ram and PentiumII processor, fork
is gonna be pretty cheap. Not great though if you're using older machines
though where memory foot print is a lot less. Still you need to decide
what the application is using a fork for. If you plan on doing a lot of
forks then vfork is a lot more efficient overall. (in which case, threads
would be a better decision, but I digress) It depends on the
application.
sri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]