How to run tasks with priority?



Hello everyone,


I want to run tasks with priority, i.e. among several simultaneous running
tasks, the task with the higher priority will have more chances to occupy
CPU time. I have the following 2 issues dealing with the implementation of
such feature.

- To define each task as a thread or as a method? How to change the
priority of each task dynamically when they are running?

- The priority feature of Java thread does not meet my requirement, since I
can not define priority precisely. For example, I want to define that a
task with priority A will occupy CPU time 3 times than a task with priority
B.

I am wondering whether I can find similar open source projects or tutorials?


Thanks in advance,
George

--
Message posted via http://www.javakb.com
.



Relevant Pages

  • Changing Program Process Priority Defaults
    ... changing the program priority. ... It was distributed to limit the CPU time that the SETI ... >My kids love playing a Disney Lama Game. ... >automatically force the default to normal priority? ...
    (microsoft.public.windowsxp.general)
  • Re: Windows service Vs Console app performance
    ... but priority is a funny thing. ... other open windows, task bar applets, mouse, etc. ... > can have as much CPU time as it wants, bar what is needed for the OS, so ... > Maybe he has another processor intensive task running at the same time? ...
    (microsoft.public.dotnet.framework)
  • Re: -mm seems significanty slower than mainline on kernbench
    ... If it does we probably have to wear the cost as ... At the most it changes the frequency at which load balancing occurs. ... priority tasks were balanced more frequently and ended up getting their own ... a kernbench is only about 1% of the total CPU time and the extra ...
    (Linux-Kernel)
  • Re: DirectShow Thread Priority
    ... > I'm not persuaded that it does run at a higher priority. ... other CPU-intensive tasks going on during video rendering, ... will take most of the CPU time anyway. ... difference in performance by the encoder. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: cooperative multitasking scheme
    ... You must first define what you want priority to mean. ... each level has certain percentage of the CPU time. ... You really need to know what you want the priority system to achive before ... you look at ways of implementing your schedular. ...
    (comp.arch.embedded)