Can someone from the Self group provide some details on processes and process scheduling in the next realease of Self.
I'm wondering if it will be possible to have a process amongst a number of processes that is responsible for monitoring a unix socket. When there is nothing pending on the socket, this process would be suspended. When something is detected on the socket, then I'd want the process responsible to wake up and do whatever it's supposed to do.
Essentially, what is the nature of the scheduling planned for Self? I was frustrated at one time with ParcPlace Smalltalk because "processes" were indeed independent threads of execution, but the scheduler (that resided in the VM) did not actually do time slicing. In order for the currently executing process to "lose control" of the CPU, it had to explicitly surrender it. At least this is the way I _thought_ it was happening. If anyone can enlighten me I won't argue.
Shaun
Shaun M. Smith (ssmith@joplin.mpr.ca / ssmith%joplin.mpr.ca@relay.ubc.ca) MPR Teltech, 8999 Nelson Way, Burnaby, BC Canada, V5A 4B5, (604) 293-5345 and Dept. Of Computer Science, University of British Columbia
Shaun,
You're correct that the VM process scheduler in the Smalltalk-80 system doesn't do time-slicing. There are two reasons for this. The more important one is that it isn't necessary! You can easily do time-slicing entirely in Smalltalk. Just install a high-priority process that repeatedly waits on a short timer, and then shuffles the lower-priority process queues when it wakes up. This was actually done as a summer student project at Xerox PARC several years back. If the time slice is reasonably long compared to the time required for the process switching and manipulations (say, 10 ms on a SPARC), the overhead won't be significant. The advantage of this approach, of course, is that you don't wind up with unchangeable policies wired into the VM.
The other reason is that the Smalltalk-80 *system* code is not designed to be time-sliced. If we really wanted people to write general concurrent programs, we would have to program the way the DEC folks do in Modula-2+: all interesting data structures would have to be monitor-locked, etc. I don't think you'll find the situation any better in Self in this respect.
self-interest@lists.selflanguage.org