lkj,
Here is a response from Elizabeth Rather on the question of the PAUSE (multitasking, context switch):
> > Hi Elizabeth, > > It appears that the PSC1000 did not do to well for a context switch. What > kind of multitasking was used? What is the PSC1000 doing?
As you may know, the PSC1000 is a stack processor, rather than a register-oriented processor. Its "operand stack" is Forth's data stack, and its "local-variable" stack is the return stack. This makes most operations extremely fast, as you can see from the posted benchmarks. However, to do a context switch requires saving all the stack registers (18 & 16, respectively) in the task's user area. There are single instructions to do this, so it's not like having to move each cell individually, but it's still more data transfers than most processors require (typically 3). Our implementation on the PSC1000 improves slightly on their published code to do this.
The multitasker model is the same one we've used for 20 years, a cooperative round-robin in which a task relinquishes the CPU whenever it does I/O, plus voluntary PAUSEs to allow "tuning" for CPU-intensive operations. Since context switches are relatively infrequent, we think the overall speed of operation of the PSC1000 more than compensates for the slower context switch.
Cheers, Elizabeth |