From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,753b5643b97061a3 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2001-05-14 10:06:23 PST Path: archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!rob From: rob@GTEDHCP-133.inetarena.com (Robert M. Riches Jr.) Newsgroups: comp.os.linux.alpha Subject: Re: short-term scheduling algorithm Date: Mon, 14 May 2001 17:06:22 -0000 Organization: none-at-all Message-ID: References: Reply-To: richesr1@inetarena.com User-Agent: slrn/0.9.6.4 (Linux) X-Complaints-To: newsabuse@supernews.com Xref: archiver1.sj.google.com comp.os.linux.alpha:2847 On Mon, 14 May 2001 15:31:18 -0000, daniel wrote: > i have a question, could u help me. > An I/O-bound program is one that, if run alone, would spend more time >waiting for I/O than using the processor. A processor-bound program is the >opposite. Suppose a short-term scheduling algorithm favors those programs >that have used little processor time in the recent past. Could u tell me >why this algorithm favors I/O-bound programs and yet does not permanently >deny processor time to processor-bound programs. This sounds like a question from a take-home exam for an operating systems class. Or, maybe it's a homework question. The detailed answer to this question depends on the details of the implementation of the scheduler. There are combinations of scheduler implementations and workloads that could become pathological. In most cases, at least with light loading on the machine, the I/O-bound processes (by definition) don't use a lot of CPU time, so they release the CPU considerably before the end of their time slice. Because I/O operations usually take much longer than a few time slices, each I/O-bound processes simply cannot consume much CPU time. A large number of I/O-bound processes could, in the aggregate, monopolize the CPU, _except_ that most systems don't have enough separate I/O channels to allow a large number of I/O-bound processes to get (pieces of) time slices and consume much of the CPU. If there are a large number of I/O-bound processes, they will queue up on the I/O devices, so they will slow themselves (each other) down. If this was a homework or exam question, please inform whether the grader liked the above answer. 1/2 :-) Robert Riches richesr1@inetarena.com