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 7947119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:20:28+00:00 2026-06-04T01:20:28+00:00

I am experimenting with SCHED_FIFO and I am seeing some unexpected behaviour. The server

  • 0

I am experimenting with SCHED_FIFO and I am seeing some unexpected behaviour. The server I am using has 12 cores with hyper-threading disabled. All configurable interrupts have been set to run on CPU 0.

My program starts creates a thread for lower priority tasks using the pthreads library without changing the scheduling policy with CPU affinity set to core 0. The parent thread then sets its CPU affinity to core 3 and its own scheduling policy to SCHED_FIFO using sched_setscheduler() with pid zero and priority 1 and then starts running a non-blocking loop.

The program itself runs well. However, if I attempt to log into the server for a second time while the program is running the terminal is unresponsive until I stop my program. It is like the scheduler is trying to run other processes on the same core as the real time process.

  1. What am I missing?
  2. Will the scheduler still attempt to run other processes on a core running a real time process? If so, is there a way to prevent this?
  3. Will setting the scheduling policy with sched_setscheduler() in the parent change the behaviour of the child that was created before?

Thanks in advance.

  • 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-06-04T01:20:31+00:00Added an answer on June 4, 2026 at 1:20 am

    sched_setscheduler sets the scheduler of the process, not the thread. See:

    http://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_setscheduler.html

    If you want to set the scheduler for a thread, you need to use the pthread_attr_setschedpolicy and pthread_attr_setschedparam functions on the attribute object for the new thread before you create it.

    I’m not sure how conformant Linux is on honoring these requirements, but you should at least start out by making sure your code is correct to the specification, then adjust it as needed…

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

Sidebar

Related Questions

I've started experimenting with Hudson as a build server. I'm using subversion and have
I am experiencing some strange behaviour in my Java server application whereby database operations
Experimenting with android game development. I'm using PNG format for images, and was wondering
While experimenting with pixel shaders in WPF I decided to draw some pixels onto
I'm experimenting with TextArea and inheritance to implement some additional functionality on the protected
While experimenting with some stuff on the REPL, I got to a point where
I am experimenting with embedding my pure offline mobile HTML5 ebook reader (http://www.hyper-books.com/) into
Experimenting with Cocos2D collection detection and have some questions. First, some background: This is
Experimenting with new features of T-SQL, I've run into a puzzle. Here is some
been experimenting with unordered list UL and i have seem varios examples of using

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.