

A runnable process is one that is not currently blocked.Ī process is processor-bound (aka compute-bound) if it consumes mostly processor as opposed to I/O resources, and I/O-bound in the opposite case hence, a processor-bound process is mostly runnable, whereas an I/O-bound process is mostly blocked.

The process can resume execution only after the event completes. A blocked process is awaiting the completion of some event such as an I/O event. Linux threads are sometimes described as lightweight processes, with the lightweight underscoring the sharing of resources among the threads within a process.Īlthough a process can be in various states, two are of particular interest in scheduling. Threads within a multi-threaded process remain related in that they share resources such as memory address space. If a process is multi-threaded with N threads, then N scheduling actions would be required to cover the threads. In a simplifying move, Linux turns process scheduling into thread scheduling by treating a scheduled process as if it were single-threaded. 10 command-line tools for data analysis in Linux.

To schedule a process is to schedule one of its threads on a processor. A process has one or more threads of execution, which are sequences of machine-level instructions. Process scheduling is how the operating system (OS) assigns tasks (e.g., crunching some numbers, copying a file) to processors-a running process then performs the task. As such, a process must contend with other processes for shared system resources: memory to hold instructions and data, at least one processor to execute instructions, and I/O devices to interact with the external world. Linux inherits the Unix view of a process as a program in execution. Let's start with a quick review of some core technical terms. Let's dig into the details of what sets CFS apart from-indeed, above-other process schedulers. In any case, CFS breaks dramatically with what might be called "classic preemptive scheduling." Also, the "completely fair" claim has to be seen with a technical eye otherwise, the claim might seem like an empty boast. Completely fair scheduling (CFS), which became part of the Linux 2.6.23 kernel in 2007, is the scheduling class for normal (as opposed to real-time) processes and therefore is named SCHED_NORMAL.ĬFS is geared for the interactive applications typical in a desktop environment, but it can be configured as SCHED_BATCH to favor the batch workloads common, for example, on a high-volume web server. A scheduling class specifies which scheduling policy applies to which type of process. Linux takes a modular approach to processor scheduling in that different algorithms can be used to schedule different process types.
