Posted By: earnshaw | Jul 30th, 2008 @ 10:09 PM
page 1 of 1
Comments: 5 | Views: 945
earnshaw
earnshaw
Jack Sleeps
I have decades of experience with what were called timesharing systems.  Much effort was put into making each user's experience satisfying.  Many users would logon to a single computer (perhaps several CPUs and a good amount of main memory).  Since each user evaluated the computer's performance by how responsive it was for him, the manufacturer put logic into the operating system to ensure that user response time was minimized.  That meant that I/O bound batch jobs would run, but not at the expense of giving good response to live, breathing human beings who want answers immediately, not 10 minutes from now.  Comes the revolution.  Now, everybody has his own computer and very few choices for operating systems.  The Microsoft operating system (I think they call it Windows) can be maddeningly unresponsive when an I/O bound process (like a file backup) is running.  Even dropping the CPU priority of the I/O bound job is not sufficient to make the user interface responsive.  Why is that?  Well, I would imagine there is a great deal of disk contention between the user interface-related work and the file backup-related work.  Everytime an I/O completes for the batch job, the next-queued I/O for that job gets started from the I/O request queue.  Work that gets queued from the not-I/O-bound job has no priority.  So, while my file backup job (long running) is active, I can double-click an icon on the desktop and wait ... and wait for the operating system to do all the magic necessary to get the program into memory (from disk) and started executing.  This problem was solved very satisfactorily in the 1970s.   And unsolved when the Unix-heads started designing operating systems for the 21st century.
evildictaitor
evildictaitor
if( !succeed( try() ) ) { while(true) try(); }
Can you rephrase that as a question?
Yggdrasil
Yggdrasil
Pour me a cab, 'cause I can't drink no more.
http://geekswithblogs.net/sdorman/archive/2006/06/17/82193.aspx

Some changes and additions to the I/O APIs in Vista allow for setting I/O priority, so that batched I/O (like desktop search, backups, etc) will get lower priority and be less disruptive to the interactive user.
figuerres
figuerres
???
OP,

the problem is 90%  one of the programmer doing the right thing today not the OS.

windows allows multiple processes and a progreammer can put a task/thread/Process at a low priority in the background if they choose to do that.

but many progreammers are met with a manager who wants it done yesterday, sometimes folks who are programmers today do not get as much training as they should and many other things.

so when you see a crappy app trying up the system talk to the publisher and the author about it, and don't buy that app.
or if you bought it let them know your not getting the next version unless they fix it.

also realize that sometimes folks tell them "just make it fast, I don't care about any other stuff"  which is a common impatent user thing.

but the windows core is really done very well overall.  just imagine if your timeshare system had a dum-a$$  new admin who messed with job priorities and hosed the system.  that's what happens today,  folks who do not pay attention to the rules and just go nuts.
staceyw
staceyw
Before C# there was darkness...
If the backup app presents a UI, then from the OS perspective it is a foreground process.  AFAICT, the os makes no magical assumptions and puts 1 process at lower priority by reading the users mind.  Some of this is incumbent on the application developer to run as service or at lower priority (which many do not do).  Say you had two instances of same app doing different backups.  Which app instance does the os give priority too?  They both run at same priority in context of the scheduler.  I think the app that has the focus may get some better scheduler time, but not sure.

Also note, OSs like MVS (which I assume your talking about) are batch job based with everything focused around that concept.  A general purpose OS like Windows with interative UI has different goals.  There are trade offs.  Not sure you can get both and have no trade offs. 

I have a question however.  Would lowering the thread priority effectively lower the IO priority - or have the same net effect?
evildictaitor
evildictaitor
if( !succeed( try() ) ) { while(true) try(); }
It also lowers the IO priority, but given that foreground windows are usually light on the IO front, it's not usually much of an issue.
page 1 of 1
Comments: 5 | Views: 945
Microsoft Communities