Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1047203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:15:53+00:00 2026-05-16T16:15:53+00:00

I want to have a real-time process take over my computer. :) I’ve been

  • 0

I want to have a real-time process take over my computer. 🙂

I’ve been playing a bit with this. I created a process which is essentially a while (1) (never blocks nor yields the processor) and used schedtool to run it with SCHED_FIFO policy (also tried chrt). However, the process was letting other processes run as well.

Then someone told me about sched_rt_runtime_us and sched_rt_period_us. So I set the runtime to -1 in order to make the real-time process take over the processor (and also tried making both values the same), but it didn’t work either.

I’m on Linux 2.6.27-16-server, in a virtual machine with just one CPU. What am I doing wrong?

Thanks,

EDIT: I don’t want a fork bomb. I just want one process to run forever, without letting other processes run.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:15:54+00:00Added an answer on May 16, 2026 at 4:15 pm

    There’s another protection I didn’t know about.

    If you have just one processor and want a SCHED_FIFO process like this (one that never blocks nor yields the processor voluntarily) to monopolize it, besides giving it a high priority (not really necessary in most cases, but doesn’t hurt) you have to:

    1. Set sched_rt_runtime_us to -1 or to the value in sched_rt_period_us
    2. If you have group scheduling configured, set /cgroup/cpu.rt_runtime_us to -1 (in case
      you mount the cgroup filesystem on /cgroup)

    Apparently, I had group scheduling configured and wasn’t bypassing that last protection.

    If you have N processors, and want your N processes to monopolize the processor, you just do the same but launch all of them from your shell (the shell shouldn’t get stuck until you launch the last one, since it will have processors to run on). If you want to be really sure each process will go to a different processor, set its CPU affinity accordingly.

    Thanks to everyone for the replies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a currently running PHP application that I want to add real-time feed
Idea: I want to make smth like real time electronic blackboard. Many users have
I have a free web site that streams real-time stock-options data. I want to
I want to make an app which shows cardio graph in real time. That
I have a simple, real life problem I want to solve using an OO
I want to have a class which implements an interface, which specifies the specific
I have been programming for a couple of years and am now studying computer-science
I have soft real-time .NET application run on W2008R2. I just realised that I
I have executed a process using CreateProcess, but I want to fetch or dump
Plant data is real time data from plant process, such as, press, temperature, gas

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.