System information
Tuning the Task Scheduler 167
One approach is to classify a process either I/O-bound or processor-bound.
I/O-bound
I/O stands for Input/Output devices, such as keyboards, mice, or optical and hard
disks. I/O-bound processes spend the majority of time submitting and waiting for
requests. They are run very frequently, but for short time intervals, not to block
other processes waiting for I/O requests.
processor-bound
On the other hand, processor-bound tasks use their time to execute a code, and
usually run until they are preempted by the scheduler. They do not block process-
es waiting for I/O requests, and, therefore, can be run less frequently but for
longer time intervals.
Another approach is to divide processes by either being interactive, batch, or real-time
ones.
• Interactive processes spend a lot of time waiting for I/O requests, such as keyboard
or mouse operations. The scheduler must wake up such process quickly on user re-
quest, or the user will find the environment unresponsive. The typical delay is ap-
proximately 100 ms. Office applications, text editors or image manipulation pro-
grams represent typical interactive processes.
• Batch processes often run in the background and do not need to be responsive. They
usually receive lower priority from the scheduler. Multimedia converters, database
search engines, or log files analyzers are typical examples of batch processes.
• Real-time processes must never be blocked by low-priority processes, and the
scheduler guarantees a short response time to them. Applications for editing multi-
media content are a good example here.
14.3 O(1) Scheduler
The Linux kernel version 2.6 introduced a new task scheduler, called O(1)
scheduler (see Big O notation [http://en.wikipedia.org/wi
ki/Big_O_notation]), It was used as the default scheduler up to Kernel version
2.6.22. Its main task is to schedule tasks within a fixed amount of time, no matter how
many runnable processes there are in the system.