Continuous Process creation

David N. Smith (IBM) dnsmith at watson.ibm.com
Wed Oct 6 19:05:07 UTC 1999


Process>>#forContext:priority:, the method that creates processes, 
seems to get called about 250 times per second to create a process 
which is immediately thrown away. The calls seem to be coming from 
ProcessScheduler>>#yield which creates a process to signal a new 
Semaphore. Here is the code:

yield
	"Give other Processes at the current priority a chance to run."

	| semaphore |
	semaphore _ Semaphore new.
	[semaphore signal] fork.
	semaphore wait

It looks like a cute trick, but I'm wondering what the 250 new 
processes per second (on my old PPC 9500/200) do to garbage 
collection and processor usage. The #yield messages seem to be 
constantly sent by controllers and I'm in a MVC world (because that's 
what runs on tiny processors).

Dave
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
_______________________________
Any opinions or recommendations
herein are those of the author
and not of his employer.





More information about the Squeak-dev mailing list