Re: Realtime processes with sched_setscheduler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






Subject: Re: Realtime processes with sched_setscheduler
Date: Fri, 20 Dec 2002 19:06:01 -0500
From: anton wilson <anton.wilson@camotion.com>
To: Michael Svetlik <m.svetlik@ssi-schaefer-peem.com>

On Monday 16 December 2002 04:36 am, you wrote:
> On a common x86 PC, there' s a simple process, that lets the realtime
> clock chip wake it up, each 500/2^n milliseconds.
> Depending on a command line switch, it may incease its priority at
> startup, using the well-known
>
>     schp.sched_priority = prio;
>     err = sched_setscheduler( 0, policy, &schp);
>
> calls.
> When the process is being run with the above priority control
> (policy==SCHED_FIFO,prio==99), it shows  timing deviations up to 40 ms,
> compared to the predetermined desired value - I have one,or more, bad
> processes running on my RedHat distro, that periodically think a lot ;-).
> If being run with a simple 'nice --20', the jitter maximum is ONE
> millisecond.
>
> The actual GNU libc manual says, that the POSIX-conform scheduler call
>  is just a fine-tuning of a process priority -  the nice value is the
> major parameter here. Does the kernel agree with that ?
>
> Michael

Not sure what that question means.
SCHED_FIFO, SCHED_OTHER, and SCHED_ROBIN processes are significantly
different from each other in how the processor schedules them.
You may want to read up on how the kernel scheduling policies work.

I can't speak much for the niceness levels.
But you probably should use
sched_get_priority_max() to get the maximum priority. Maybe it's not setting
it as high as you think. or you can use sched_getscheduler to see the
difference in priority between using setscheduler and nice.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux