From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Priorities, schedulers, and nice values

Priorities, schedulers, and nice values

- So processes are scheduled, and you can influence that scheduling process. And in order to do so, you need to know about priorities, schedulers, and nice values. Let's talk about it. So Linux uses schedulers at different levels. The process scheduler runs processes in realtime or normally. And the I/O scheduler defines how I/O requests, disk requests, that is, are handled. It's a completely different thing. You manage them independently. Current Linux, that is kernel version 6, uses the Complete Fair Scheduler as a default scheduler for processes. And within this scheduler, different policies can be used to define how tasks are handled. You can use chrt, for change real time, command to determine which scheduler policy to use. And the chrt on some occasions can actually be pretty interesting. Now, what are the options? Well, we have five different policies. SCHED_OTHER is the default Linux time-sharing scheduling policy which is used by most processes. SCHED_BATCH is a non-realtime…

Contents