Preemptive scheduling
J J
azreal1977 at hotmail.com
Tue May 1 20:51:16 UTC 2007
>From: tim Rowledge <tim at rowledge.org>
>Reply-To: The general-purpose Squeak developers
>list<squeak-dev at lists.squeakfoundation.org>
>To: The general-purpose Squeak developers
>list<squeak-dev at lists.squeakfoundation.org>
>Subject: Re: Preemptive scheduling
>Date: Tue, 1 May 2007 13:24:30 -0700
>
>>On a real OS
>
>...interesting definition of 'real' here. I can assure you there are OSs
>I've used that didn't do any such thing...
Ok fine, change the word 'real' for 'modern'. Of course there used to be
batch systems, cooperative systems, and so on, but modern server/desktop
OS'es behave this way. Better? :)
>You can easily do this in Smalltalk in a portable way; just a high
>priority process that cycles on a time interrupt to shuffle the process
>scheduler. You can manually shuffle the processes at the various
>priorities if you want to.
I'm good with a time interrupt, but how is that done in a remotely
portable/safe way? I'm not asking about process shuffling, I'm asking how a
process that consists of:
[ [ true ] whileTrue: [ true ] ] fork
can ever be taken off the processor. Unless you do either (a) instruction
count based preemption or (b) time based (i.e. what CPU's use), it can't be
done afaik.
>If you want to do some sort of count of bytecodes or prim calls instead of
>a simple timer, that is not difficult to arrange. I think John put some
>timer/counter stuff in a few years ago that would support this.
I only suggested bytecode count because I didn't realize there was a good
way to do timebased (which would actually be the prefered method if
possible).
>I'm not sure; to be honest there seems little point in trying to make
>'Smalltalk be the OS' for practical systems. What is probably much more
>sensible is to make Smalltalk do much better at integrating into the OS so
>it has more general value. In some respects Spoon is making a very good
>pass at this. The cost is that for every bit of OS integration you provide
>the cost of porting goes up enormously.
This is what I am wondering though. If integrating Smalltalk better into
the OS is taken to the extreme you end up with a Ruby with prettier syntax.
I think a lot of power is there to be had by having a mini-OS. As you
mentioned, portability is one of these benifits.
Looking at things from the point of view of writing scripts, it may seem a
bit inconvenient having a mini-OS VM. But looked at from a very large,
distributed, multi-core, multi-OS architechture point of view, I personally
see a different picture. I see Yaws (a system that doesn't seem to
integrate so well with other systems) absolutely smoking Apache (a system
that integrates with anything) at the high end.
_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
More information about the Squeak-dev
mailing list
|