LINUX: Is there any way to handle thread priorities in a correct way ?!?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, September 4, 2002 07:40 AM

Refering to many articles, one question arises: Is there any way to ensure thread priorities to take effect running on a linux platform ? As I know, Windows accepts your priority suggest, but with linux I got the following: By running an application using 2 threads (both threads are running an endless loop and the 1st for example sleeps 100ms after each cyle and the second sleeps 10000ms after each cycle) one problem arises: Regardless to the priorities given to both threads, I can not ensure a cycle-time of 100ms for the first thread if the second one has to work for more than 100ms. By running the same application on Windows I only have to run the 100ms thread on a higher priority than the other thread and everything does well. (which means that the high prior thread   More>>

Refering to many articles, one question arises: Is there any way to ensure thread priorities to take effect running on a linux platform ? As I know, Windows accepts your priority suggest, but with linux I got the following: By running an application using 2 threads (both threads are running an endless loop and the 1st for example sleeps 100ms after each cyle and the second sleeps 10000ms after each cycle) one problem arises: Regardless to the priorities given to both threads, I can not ensure a cycle-time of 100ms for the first thread if the second one has to work for more than 100ms. By running the same application on Windows I only have to run the 100ms thread on a higher priority than the other thread and everything does well. (which means that the high prior thread is enabled to interrupt the execution of the low prior thread and therefore permanently executes its own statements every 100ms). Is there any way to ensure correct handling of thread priorities running on a linux system or are there any linux distributions, JDKs ... being able to act this way ?

   <<Less
About | Sitemap | Contact