Team LiB
Previous Section Next Section

Algorithms

An algorithm is a series of instructions, possibly one or more inputs, and ultimately a result or output. For example, the steps carried out to count the number of people in a room are an algorithm, with the people being the input and the count being the output. In the Linux kernel, both page eviction and the process scheduler are examples of algorithms. Mathematically, an algorithm is like a function (or at least, you can model it as one). For example, if you call the people counting algorithm f and the number of people to count x, you can write:

y = f(x)

people counting function


where y is the time required to count the x people.

    Team LiB
    Previous Section Next Section