Weighting (Niceness)

This lesson will make you familiar with the concept of weighting (niceness) with the discussion of an example.

We'll cover the following

Nice level of a process

CFS also enables controls over process priority, enabling users or administrators to give some processes a higher share of the CPU. It does this not with tickets, but through a classic UNIX mechanism known as the nice level of a process. The nice parameter can be set anywhere from -20 to +19 for a process, with a default of 0. Positive nice values imply lower priority and negative values imply higher priority; when you’re too nice, you just don’t get as much (scheduling) attention, alas.

CFS maps the nice value of each process to a weight, as shown here:

Get hands-on with 1400+ tech skills courses.