CSCI 3323 (Principles of Operating Systems), Fall 2021:
Reading Quiz 4

Credit:
20 points.

Reading

Be sure you have read, or at least skimmed, Chapters 12, 13, 14, 15, and 16 of the textbook.

Instructions

Answer the questions below using only the course textbook -- no Web searches. It's okay to talk to classmates about this assignment as you usually do, but I want each person to do all the reading. Include the Honor Code pledge in what you turn in, either the full pledge or just the word “pledged”. (Please put this in the same document as your answers, so I don't overlook it.) For these quizzes by doing this you are also saying you have at least attempted all the reading it covers.

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 set up for you on Google Drive. (So, no word-processor files and no links to other Google Docs. This is a change from how I've asked students to turn in work in previous semesters, meant to reduce both the chance of mistakes on my part and the amount of time I spend managing multiple file formats.)

Questions

  1. (2.5 points) We've talked about sharing memory among processes using space-sharing. But it is possible to time-share memory. Why is it not done? Does it have any advantages? (Hint: One of the goals the textbook lists for virtualization of memory is irrelevant if memory is time-shared.)

  2. (2.5 points) Discussions of how memory in an address space is used often talk about two areas that can grow or shrink. What are they, and how do they differ in typical position and usage?

  3. (2.5 points) How do calls to malloc() and free() relate to system calls? i.e., does a call to one of these library functions result in a system call always, never, or sometimes?

  4. (2.5 points) Is it possible to free only a portion of the space obtained by a call to malloc?

  5. (2.5 points) At one point in the textbook, the authors tout “try it and find out!” as a strategy for determining how something works, and indeed it's a good strategy. However, they later give a second piece of advice that indicates that it has its limitations. What is this second piece of advice?

  6. (2.5 points) What problem is segmentation intended to solve?

  7. (2.5 points) With segmentation it's typical to put a process's heap and its stack each in its own segment. How are they different in one way that affects address translation?

  8. (2.5 points) What's the difference between external and internal fragmentation?




2021-10-13