Single-Processor Systems

team bbl


When using a single processor, scheduling is simple; all tasks use the same processor. The scheduler algorithm for a single processor centers on fairness; in other words, is every process getting a fair turn at the processor? Optimizations tend to streamline both user and kernel code by minimizing the number of context switches. Ideally, every process gets an executable timeslice, and no process is preempted. The need by most tasks to perform some I/O, and the fact that I/O is traditionally slower than a processor, mean that unless a task is CPU-bound, scheduling becomes necessary.

Tasks might use only a fraction of their timeslice before voluntarily giving up the processor to wait for some other event, such as a signal or an I/O completion. In the context of fairness, the implementation needs to consider whether it makes sense to schedule a task that frequently gives up the processor, as opposed to a process that executes until preempted.

The versatility of the Linux scheduler moves seamlessly from single-processor systems to more complex scheduling. With a load-balancing policy, the scheduler can ensure scheduling on the multiprocessors also.

    team bbl



    Performance Tuning for Linux Servers
    Performance Tuning for Linux Servers
    ISBN: 0137136285
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net