See 
http://en.wikipedia.org/wiki/Kill_(command)
for discussion of kill suspend/resume.

The simple case is likely the unix process scheduler sends you a suspend, later 
a resume if it chooses to wake you up, otherwise a resume and quit. 

The more complex cases are when you want to do audio, voip, or location.   In 
this case you are setting up an agreement between the app and the scheduler to 
wake you when audio needs servicing, a socket requires keep-alive & traffic in 
processing, or a change to location is made. Part of that agreement is 
restrictions on what you can do in the background, like no UI or openGL work, 
no listening sockets, etc..  Again the unix process manager here may re-nice 
you to a lower priority if you do too much, or decide you are a nuance and kill 
you. Obviously Apple may when testing decide that your app uses too much CPU as 
a background process and not approve. 

You can ask for a limited amount of time to run as a background task when you 
are shoved to the background, but that is finite. In general the idea is that 
you are waken to processes audio, location, and socket interrupts, from an 
event driven expectation and you go back to sleep once the chore is done. 


On 2010-04-10, at 10:27 AM, Stefan Marr wrote:

>> Nonsense. 
>> 
>> An hour with some unix internals book and reading a bit about 
>> suspend/resume, and reflect on what happens when you sleep your unix based 
>> laptop shows there is no magic involved, just a bit of change to how 
>> Processes are managed. 
> Ehm is it that easy? I don't know the internals of their new stuff. But when 
> I read the announcement, it sounded more like they want you to provide 'kind 
> of services', so that only part of your app needs to stay alive in the 
> background, for instance to play music, or track location data. But you 
> cannot just swap out/deschedule the whole process, at least not in a model 
> which uses threads instead of processes.
> 
> But I am just guessing...

--
===========================================================================
John M. McIntosh <[email protected]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to