CSCI 3323 (Principles of Operating Systems), Fall 2022:
Reading Quiz 3

Credit:
25 points.

Reading

Be sure you have read, or at least skimmed, Chapter 7, 8, and 9 of the textbook.

Instructions

Answer the questions below using only the readings for the course -- no Web searches. It's okay to talk to classmates about this assignment as you usually do, but I want each person to at least skim all the reading. Include the Honor Code pledge in what you turn in, either the full pledge or just the word “pledged”. For these quizzes by doing this you are also saying you have at least attempted all the reading it covers.

Please put the pledge in the same document as your answers, so I don't overlook it, and please be sure to include your name somewhere in the file, so when I print it for grading I know whose work it is.

You may write out your answers by hand and scan them, or you may use a word processor or other program, but please submit PDF or plain text in the “turn-in” folder I have set up for you on Google Drive. (So, no word-processor files and no links to other Google Docs.)

Questions

  1. (2.5 points) What does the textbook mean by “workload” in the context of CPU scheduling?

  2. (2.5 points) Previous discussions of context switches have been in terms of saving and restoring CPU registers, and clearly how many of those need to be saved/restored affects the cost of switching from one process to another. What are some other factors that also affect this cost?

  3. (2.5 points) The textbook groups the simple scheduling algorithms in Chapter 7 into two “families”. How are they different, and which algorithms are in which?

  4. (2.5 points) What basic problem is Multi-Level Feedback Queue (MLFQ) scheduling intended to address?

  5. (2.5 points) The textbook's discussion of MLFQ scheduling starts with two basic rules and then adds others. What are the two basic rules, what are the three others that are added, and why is each addition necessary or at least useful?

  6. (2.5 points) Does choice of scheduling algorithm matter for security?

  7. (2.5 points) What are “voo-doo constants”1 as defined by the textbook? If they can't be avoided, what are some options for choosing their values?

  8. (2.5 points) “Lottery scheduling” is based on randomness. What does the textbook mention as three advantages of such approaches?

  9. (2.5 points) Linux's CFS (Completely Fair Scheduler) makes use of something called “virtual runtime”; what is it and how is it used to decide which process should run next?

  10. (2.5 points) What's that picture of red-black trees doing in the textbook's discussion of the Linux CFS? Aren't red-black trees ridiculously complicated data structures for what they're being used for in this algorithm?



Footnotes

... constants\rq\rq1
I'd write it without the hyphen, but then I can be pedantic about such things.



2022-10-12