Re: Making a SCHED_FIFO process monopolize the processor

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

 



Hi!

On 02:01 Sat 28 Aug     , Pablo Antonio wrote:
...
> I want to know if it's possible to create a real-time process with
> SCHED_FIFO policy that starts running and never lets any other process
> run again.

Yes, it should be. However hardware interrupts will still arrive.

> I had read that processes in SCHED_FIFO usually run until a) they block
> themselves by calling some syscall (for example, an I/O request), b)
> they are preempted by some higher priority process or c) they decide to
> yield the processor. So I thought that technically it would be possible
> to create a process that "takes over" the processor from all the other
> processes: Just create a SCHED_FIFO process that loops infinitely.
> 
> However, when I tried this it didn't work. Someone told me about
> sched_rt_runtime_us and sched_rt_period_us, which acted like a
> protection for this cases. So I tried both setting sched_rt_runtime_us
> to -1 and setting both values to the same number, but it didn't work
> either: I can switch to another terminal, execute top and see the
> process running.

This is weird. Are you sure that you have put the process in the SCHED_FIFO
queue and assigned a static priority > 0 via sched_setscheduler? If you start
top and look in the PR column you should see "RT".

> What am I doing wrong? Is there some option in the kernel I have to
> enable/disable?

I do not think that there is an option about this.

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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