Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: rob@GTEDHCP-133.inetarena.com (Robert M. Riches Jr.)
Subject: Re: short-term scheduling algorithm
Date: Mon, 14 May 2001 17:06:22 -0000	[thread overview]
Message-ID: <slrn9g044d.qum.rob@GTEDHCP-133.inetarena.com> (raw)
In-Reply-To: tfvui67ab83h3f@corp.supernews.com

On Mon, 14 May 2001 15:31:18 -0000, daniel <shenxueyu@yahoo.com> 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


  reply	other threads:[~2001-05-14 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-14 15:31 short-term scheduling algorithm daniel
2001-05-14 17:06 ` Robert M. Riches Jr. [this message]
2001-05-15  3:09   ` Jason Stratos Papadopoulos
2001-05-14 19:57 ` Paul Repacholi
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox