* short-term scheduling algorithm
@ 2001-05-14 15:31 daniel
2001-05-14 17:06 ` Robert M. Riches Jr.
2001-05-14 19:57 ` Paul Repacholi
0 siblings, 2 replies; 4+ messages in thread
From: daniel @ 2001-05-14 15:31 UTC (permalink / raw)
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.
Thank very much.
--
Posted via CNET Help.com
http://www.help.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: short-term scheduling algorithm
2001-05-14 15:31 short-term scheduling algorithm daniel
@ 2001-05-14 17:06 ` Robert M. Riches Jr.
2001-05-15 3:09 ` Jason Stratos Papadopoulos
2001-05-14 19:57 ` Paul Repacholi
1 sibling, 1 reply; 4+ messages in thread
From: Robert M. Riches Jr. @ 2001-05-14 17:06 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: short-term scheduling algorithm
2001-05-14 17:06 ` Robert M. Riches Jr.
@ 2001-05-15 3:09 ` Jason Stratos Papadopoulos
0 siblings, 0 replies; 4+ messages in thread
From: Jason Stratos Papadopoulos @ 2001-05-15 3:09 UTC (permalink / raw)
Robert M. Riches Jr. <rob@gtedhcp-133.inetarena.com> wrote:
: This sounds like a question from a take-home exam for an
: operating systems class. Or, maybe it's a homework question.
Even worse, the original poster asked CNET help, which evidently posts the
question to random vaguely technical newsgroups. Your answers are then
picked up automatically and made to look like a response from CNET's
"expert troubleshooting staff". So basically,
1. The original poster asked his HW question to a tech support forum
2. The tech support forum takes credit for your knowhow and experience
3. CNET's paying customers leave thinking their ISP is really smart
Especially in the x86 hardware newsgroups, this really gets folks cheesed
off.
In comp.arch, whenever someone asks a homework question the regulars there
make up the most convincing-sounding but completely wrong answer they
can. It's great fun!
jasonp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: short-term scheduling algorithm
2001-05-14 15:31 short-term scheduling algorithm daniel
2001-05-14 17:06 ` Robert M. Riches Jr.
@ 2001-05-14 19:57 ` Paul Repacholi
1 sibling, 0 replies; 4+ messages in thread
From: Paul Repacholi @ 2001-05-14 19:57 UTC (permalink / raw)
daniel <shenxueyu@yahoo.com> writes:
> 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.
Ah, mid May, end of semester looming is it?
It does not. There could be enought IO bound processes to a) stay
within the high-pri window, and b) use 100% between them. Thus there
will always be a high priority IO completion process, and your CPU
bound process will not be scheduled. See the VMS sysgen docs for the
ugly details of stopping this from being a major problem if the lo pri
process is holding an 'interesting' lock or in a critical section. The
last is called priority inversion.
--
Paul Repacholi 1 Crescent Rd.,
+61 (08) 9257-1001 Kalamunda.
West Australia 6076
Raw, Cooked or Well-done, it's all half baked.
Spam-To: uce@ftc.gov,enforcement@sec.gov,sness@fcc.gov,hfurchtg@fcc.gov,
mpowell@fcc.gov,gtristan@fcc.gov
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-05-15 3:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-14 15:31 short-term scheduling algorithm daniel
2001-05-14 17:06 ` Robert M. Riches Jr.
2001-05-15 3:09 ` Jason Stratos Papadopoulos
2001-05-14 19:57 ` Paul Repacholi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox