Running processes at startup vs startUpList, which one first?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running processes at startup vs startUpList, which one first?

Mariano Martinez Peck
Hi,

I have a funny question. Let's say I did:

[
something

] fork. 

and `something` never finishes and does not get GC. And I have a class that I registered in startup list. 

Which gets done first? the resume of the above process of the processing of the startup list? 

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Running processes at startup vs startUpList, which one first?

Eliot Miranda-2


On Sat, Jan 16, 2016 at 6:43 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi,

I have a funny question. Let's say I did:

[
something

] fork. 

and `something` never finishes and does not get GC. And I have a class that I registered in startup list. 

Which gets done first? the resume of the above process of the processing of the startup list? 

It depends on two things:

a) is the process at a higher, the same or lower priority than the process running the start-up code?  Only if it has the same priority is there an issue.  If it is higher it will run first.  If it is lower it will run last.  But if the process had a higher priority and was runnable then it would have prevented the process attempting to snapshot from snapshotting in the first lace.

b) if it is the same it will not run until the start up code does a wait or a Processor yield.

Snapshot writes the current system state to a file.  That includes runnable processes.  No magic happens here.  The current process *must* have been the process that did the snapshot.  The current process *must* have been the highest priority runnable process not waiting to run when the snapshot occurred.  Snapshot is *not* equivalent to Processor yield.




--
_,,,^..^,,,_
best, Eliot