• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Forking and drop-outs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forking and drop-outs


  • Subject: Re: Forking and drop-outs
  • From: Herbie Robinson <email@hidden>
  • Date: Thu, 01 Nov 2007 22:40:37 -0400

At 7:43 PM +0000 11/1/07, Ian Kemmish wrote:
I've just checked the man pages to refresh my memory, and it appears that vfork() suspends the parent process while the child is using its resources (i.e. until it exits or execs). Thus, this appears to be one of the few cases where fork() is preferable to vfork() and would certainly have caught me out if I was doing what you're doing:-)

Fork is going to have to do that, too. In order to provide POSIX semantics, one needs to block the parent until the child has run long enough to pick up all the open files, because the first thing the parent is likely to do is close half of them and many kinds of files cease to exist when the last process closes them. On a real Unix system, taking a reference count or dup'ing all the files might happen in the parent, but implementations that layer POSIX on top of another OS (or micro kernel) might well have to do some operations on the files in the child process before continuing the parent. There might be similar issues with shared memory mapping and initializing threads, too.


It would seem to me that fork should be on the "Doctor it hurts" list for real-time apps. If you go look at the POSIX spec for fork, there is a list of about 10 things it needs to do and any of them could involve some sort of priority inversion. It could, of course, be made to work, but I think it's pretty likely you are hitting something the kernel would need to fix. Time might be better spent re-architecting rather than tracking down what the problem is.
--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Re: Forking and drop-outs (From: Ian Kemmish <email@hidden>)

  • Prev by Date: Re: Filter algorithims
  • Next by Date: Re: Filter algorithims
  • Previous by thread: Re: Forking and drop-outs
  • Next by thread: Re: What is the meaning of kAudioUnitParameterFlag_IsHighResolution ?
  • Index(es):
    • Date
    • Thread