UNIX process scheduling


At any given time, only one process can be running on a given CPU.

The OS uses a periodic interrupt to trigger a scheduling routine that decides whether to let another process run on that CPU instead.

A process making a system call may also trigger scheduling, if the OS cannot satisfy its request immediately (the process may be waiting for input or some other event).

If many processes all want to run, the result is that the OS switches rapidly between them so they all appear to make progress (but the more processes that compete, the slower they all get).

Schedulers typically have a notion of process priority, and a way for users to influence priority with "niceness". The nice and renice utilties can set or change niceness. Positive "nice" values decrease process priority, making a process get less run time; negative values cause processes to be preferentially scheduled for run time.

Next ->


Steve VanDevender
Last modified: Thu Jul 5 14:31:14 PDT 2007