-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> You cannot tell in general, that's a basic result from CS. But you can >> measure previous runs and do predictions based on that, in some cases >> at least. I hope I'm not answering a homework assignment...
Nope , this has nothing to do with homework , just i was wondering how does an OS implement such an algorithm in real world. >> >> -Otto >> > In general you cannot predict, however there are many (long) jobs with > very predictable times to completion: sorts, merges, most anything that > processes thousands of records in one batch operation. > (and ties up various resources for the duration --- thein is the gotcha) > I would not trust counting instructions, loops, subroutine calls as > being usefully predictive of execution time. Yeah , looping time depends the complexity of that loop , i've learned that , We use a O(n) to present such complexity of a program. > > The fun thing about scheduling algorithms is that any one of them > is usually theoretically capable of giving the worst possible overall > performance. That's why there's so many runtime exceptions in cplusplus , can't avoid all of it. It's unpredictable anyway. - -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4r0n on freenode Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvLoNgACgkQvf41sEptMqDkJgCfXSYyJHBBzyt4QeFmKu8v/Ra7 aAUAn3jdYLwCvUfeyjA0BjsEchphInqC =zInF -----END PGP SIGNATURE-----