0
$\begingroup$

I'm wondering which is a better scheduling algorithm to use. The only real difference I can see is that in FSCAN there are two queues, and when a scan begins all requests are put in one queue and the other left empty. Then during the scan the other queue is used to store new requests and deferred until all the old requests have been processed.

$\endgroup$
1
$\begingroup$

If you take a peek at how real operating systems do it, the answer is that they use algorithms that are orders of magnitude more complex than either.

If I told you the dirty secret behind operating systems (and compiler, and...) text books, I'd have to kill you afterwards.

Text books only show you the parts where there is some hints of order (some theory behind the algorithms). Most of an operating system's code is battling unruly hardware, work around device bugs, get some half-decent answer out of woefully inadequate data, and do all that fast. Many algorithms are heuristics, derived by trying many ideas, keeping and refining those that worked best. For compilers, the authors of the book describing lcc say that the contents of most compiler books was around 5% of the code of the compiler, and the bug rate in that negligible. I'd say operating systems aren't much different.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.