Re: New Thread Manager Simplified

new topic     » goto parent     » topic index » view thread      » older message » newer message

Alexander Toresson wrote:
> 
> On 8/12/05, Al Getz <guest at rapideuphoria.com> wrote:
> > Can anyone think of an application that would benefit from having
> > a more truer type of task allocation (where each task gets say 100ms
> > of computer time before it moves on to the next task in line) ?
> >
> 
> Easy. Any GUI program that needs to do advanced processing in the
> background. And yes, I'm back.
> 
> Regards, Alexander Toresson
> 
> 

Hi there Alex,

What i meant by that question is if anyone could think of an app that
would benefit from the execution order of a more standard multitasker,
over the way it is in ThreadManager01.
Right now, ThreadManager01 allocates time slices in a very strange
way, but winds up being still very effective in simulating threads.
For example, using TM01 if you started three threads that each ran for
the same total amount of time (say three time slices) the order of execution
would look like this:
  1,2,3,3,3,2,2,1,1
while using a true time sharing scheduler (as ThreadManager02 does)
the order would look like this:
  1,2,3,1,2,3,1,2,3

Now while each method allows tasks to be automatically 'stacked',
the execution order for completion of all threads is different for the
two methods.  TM01 allows the last thread started to 'hog' the processor
time, while TM02 allocates time slices in a more 'normal' way.  They
both achieve some of the same goals, but the timing is different.

What i was asking was, can anyone think of an app when the true time
sharing scheduler would be more useful than the 'hogging' scheduler?

Right now i use the 'hogging' scheduler for my Scientific Calculator,
and to the user it looks like any long calculations that get stacked
are running simultaneously, except maybe for the fact that the last
calculation that's started always finishes first, which is how i started
calling that method LIFE (Last Invoked First Ended).

The newer method which will end up being TaskManager02 doesnt need a 
new name i guess, because it's just simply a time sharing multitasker,
where the total processor time is divided up among the threads according
to whatever their time slice is.


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu