Process priority and portable OS threads

Stephen Pair spair at advantive.com
Wed Jun 2 11:06:32 UTC 1999


--- portable OS threads ---

Last night, I got an OS threaded call-out mechanism working.  I've created
three pluggable primitives

     primitiveCallOut
     primitiveThreadedCallOut
     primitiveThreadedCallOutResult

I've abstracted the machine code necessary to actually do the call out to
ensure portability.  This abstraction and the machine code reside in the
image (in instances of ExternalByteArray).  These primitives simply call the
machine code for the desired calling mechanism.

Thus, these primitives are highly portable, except where the native threads
come in to the picture.  My first cut is using tthreads
  http://www.upl.cs.wisc.edu/~stanis/tthread.html ; thanks to Greg A. for the
pointer), a C++ abstraction that provides portability between pthreads
(POSIX) and win32 threads.

Does the Mac support pthreads?  I'm trying to determine what level of
portability I actually have here.

--- process priority ---

In Squeak (under Windows), when I fork a process at user background
priority, it seems to never run (or at least it takes a very long time).  Is
there a way to have user background priority processes to run in a more
timely fashion.  I was creating about 100 processes to test the threaded
call out, and everything worked great, except when I use the user level
priority, the UI (MVC) seems to slow down.  I'd like to be able to make
threaded call outs, leaving plenty of processing to handle the UI, but also
having the call-out execute in a more timely manner.

Can anyone shed some light on how to do this?  Also, I was planning to
default to user interrupt priority to handle call-ins to Squeak, does that
sound reasonable?

Thanks,
Stephen

Content-Type: application/octet-stream;
	name="Stephen Pair.vcf"
Content-Disposition: attachment;
	filename="Stephen Pair.vcf"

Attachment converted: Anon:Stephen Pair.vcf 6 (????/----) (0000A921)





More information about the Squeak-dev mailing list