In a system programming context, there are cases where some processes must be handled differently than others. By differently, we mean the different ways a process gets a processor time or a different priority. A system programmer must be aware of this and learn how to interact with the scheduler's API. This recipe will show you how to change the policy of a process to meet different scheduling requirements.
Learning to set and get a scheduler policy
How to do it...
This recipe will show you how to get and set the policy of a process alongside the limits that can be assigned to it. Let's get started:
- On a shell, let's open a new source file called schedParameters.cpp. We need to check what the current (default...