[Seaside] Concurrent requests from multiple sessions

Louis LaBrunda Lou at Keystone-Software.com
Wed Mar 11 16:02:49 UTC 2015


Hi Guys,

I know VAST pretty well but this is an area few people delve into and I
haven't looked at it for a while.  That said, I think VAST ask the OS for
an interrupt every 100 milliseconds.  At which time it readies any
processes that are no longer delayed and dispatches the highest priority
process.  As far as I can tell it does this without reordering processes of
the same priority.  So the interrupted process will resume if it is still
the highest priority process.

This is why I suggested earlier to either drop the priority of a process
when it is engaged in heavy CPU usage and/or call "Processor yield" to let
the next guy run for a while.  Priorities range from 1 to 7.  I think you
will normally be at userSchedulingPriority - 3 and can drop to
userBackgroundPriority - 2 with:

self activeProcess priority: Processor userBackgroundPriority.

and back with:

self activeProcess priority: Processor userSchedulingPriority.

The change in priority will take effect at the next interrupt.  I think you
can just put the above calls at the beginning and end of any heavy CPU
work.  The key word being "heavy", you don't want to wrap everything or
your just running it all at a lower priority.  If you can do this right you
will have a high priority for short running things and a low priority for
long running things.

You should double check what priority Seaside is running sessions at.

If you can find a convenient spot or spots that will break up the heavy
processing in the middle (one or more middles) then calling Processor yield
will give you a round robin effect.

Good luck and feel free to ask more questions.  You might also post this
question at: https://groups.google.com/forum/#!forum/va-smalltalk.

Lou


On Wed, 11 Mar 2015 14:15:39 +0000, "Nowak, Helge" <HNowak at cincom.com>
wrote:

>I don't know VAST, yet in VisualWorks you can call "Processor yield" in your process which will give way to other processes. By that you'll get a simple "parallel" execution of your processes.
>
>HTH
>Helge
>
>Von: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-bounces at lists.squeakfoundation.org] Im Auftrag von Bob Arning
>Gesendet: Mittwoch, 11. März 2015 15:04
>An: seaside at lists.squeakfoundation.org
>Betreff: Re: [Seaside] Re: Concurrent requests from multiple sessions
>
>Just to be sure that we are wasting enough time, you might want to make that
>
>    100 timesRepeat: [1000!]
>
>But assuming that makes no difference:
>
>So that's the issue. Squeak and Pharo rotate the order of processes at a given priority whenever one is interrupted by a higher priority process. VAST appears not to do that (or there are no higher priority process running...). IOW,
>
>Squeak and Pharo offer a Poor Man's Time Slicing, although with no guarantee that the slices are equal in width.
>VAST offers what seems to ensure a process will not be pre-empted by another process at the same priority (which has a certain logical appeal ;-) ).
>
>Not having access to VAST, I can't tell you if this difference is accidental or intentional. Perhaps someone know a bit more...
>On 3/11/15 9:36 AM, wilwarin wrote:
>
>What happens in VAST?
>
>
>
>I tried it in Workspace (but 10000! caused a stack overflow, so I used
>
>1000!). The result follows:
>
>
>
>(0 0 1) 14:36:43.923
>
>(0 0 2) 14:36:43.932
>
>(0 0 3) 14:36:43.940
>
>(0 0 4) 14:36:43.947
>
>(0 0 5) 14:36:43.952
>
>(0 0 6) 14:36:43.957
>
>(0 0 7) 14:36:43.962
>
>(0 0 8) 14:36:43.967
>
>(0 0 9) 14:36:43.972
>
>(0 0 10) 14:36:43.976
>
>(0 1 10) 14:36:43.980
>
>(0 2 10) 14:36:43.985
>
>(0 3 10) 14:36:43.989
>
>(0 4 10) 14:36:43.993
>
>(0 5 10) 14:36:43.997
>
>(0 6 10) 14:36:44.1
>
>(0 7 10) 14:36:44.4
>
>(0 8 10) 14:36:44.8
>
>(0 9 10) 14:36:44.12
>
>(0 10 10) 14:36:44.16
>
>(1 10 10) 14:36:44.20
>
>(2 10 10) 14:36:44.23
>
>(3 10 10) 14:36:44.27
>
>(4 10 10) 14:36:44.31
>
>(5 10 10) 14:36:44.35
>
>(6 10 10) 14:36:44.39
>
>(7 10 10) 14:36:44.42
>
>(8 10 10) 14:36:44.46
>
>(9 10 10) 14:36:44.50
>
>(10 10 10) 14:36:44.54
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com



More information about the seaside mailing list