Is task->priority for time slice ?

Is task->priority for time slice ?

Post by Soohyung Le » Fri, 28 May 1999 04:00:00

There is the following stuff in the sched.c

/* move an exhausted RR process to be last.. */

if (!prev->counter && prev->policy == SCHED_RR) {
        prev->counter = prev->priority;


Does " prev->counter = prev->priority " means that
priority is used for time slice ?

Thanks in advance .

- Lee -


1. task scheduler time slicing - how often?


I have an app working with real-time external devices, getting data from
the device and sending it over the network to another host.

Before I go into RealTime scheduling (which is potentially dangerous)
I'd like to try usual setup, with two threads - one reading the data and
putting it to a buffer, the other thread sending the data from the
buffer to the remote host.

The question is: how often does the linux scheduler change the running
threads/jobs? I have between 20 and 40 milliseconds before the FIFO
getting data gets overflown. So, if the data-reading thread were off the
CPU for more than this time, it'll fail.

thanks for any hints,

regards, Michal.


  Warsaw University Observatory, Warszawa, POLAND

2. gnome-ppp error

3. Giving up the remaing time of a time slice !

4. Atomic increment/decrement and POSIX thread

5. Gurus...Unix serial-port, time-slice and timing help

6. Context Handling

7. How to set priority of a running task

8. graphics card with DVI connector, which one?

9. Task Priorities

10. Tasks and Priorities

11. Priority que's and task switching

12. ?Setting task priority

13. <<NEED HELP FAST, I am a newbie>>