Real-Time OS Scheduling

Discussions focus on real-time scheduling in Linux and other OSes, including preemptive vs. cooperative multitasking, PREEMPT_RT patches, SCHED_DEADLINE, kernel/user-space preemption, and latency guarantees compared to dedicated RTOS.

πŸ“‰ Falling 0.3x Open Source
3,389
Comments
19
Years Active
5
Top Authors
#9214
Topic ID

Activity Over Time

2008
17
2009
33
2010
44
2011
49
2012
75
2013
87
2014
111
2015
141
2016
197
2017
207
2018
201
2019
247
2020
386
2021
291
2022
320
2023
362
2024
381
2025
221
2026
19

Keywords

MS e.g CPU ROS PC UNIX ECX CFS RT QNX scheduler real time multitasking kernel os realtime scheduling user space threads operating

Sample Comments

Already__Taken β€’ Mar 15, 2017 β€’ View on HN

Doesn't source love CPU and linux would have had a better scheduler?

amelius β€’ Aug 9, 2021 β€’ View on HN

That would require a real-time OS, I suppose.

emmelaich β€’ Jan 1, 2020 β€’ View on HN

Linux has real time scheduling available though.

ramzyo β€’ Dec 3, 2017 β€’ View on HN

This is a common misconception about RTOSes, or at least needs to be further qualified with soft real time vs hard real time OSes. RTOSes provide schedulers and multitasking mechanisms for context switching between tasks. Tasks can be assigned priorities. A higher priority task can pre-empt a lower priority task (depending on the RTOS’ scheduler implementation). In that case, you may never get your cycles, or at least not deterministically. tl;dr, depends on the scheduler implementation.

nerdponx β€’ Feb 24, 2017 β€’ View on HN

Doesn't this already exist for processor scheduling?

stefan_ β€’ Nov 22, 2020 β€’ View on HN

Because you are likely still running a preemptive multitasking operating system.

jimktrains2 β€’ Aug 9, 2021 β€’ View on HN

You only need a real-time os if you're guaranteeing maximum latency.

rajnathani β€’ Feb 16, 2023 β€’ View on HN

From what I understand, it is about interrupts being handled in real-time. For example see the famous PREEMPT_RT Linux patch.

davelnewton β€’ Jul 10, 2017 β€’ View on HN

You can, at least in Linux. But in general the OS will do a better scheduling job than you will.

bitpush β€’ Jul 18, 2025 β€’ View on HN

The scheduler that puts your program on a CPU works probabilistically. There are no rigid guarentees of workloads in Linux. Those only exist in real time operating systems.