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

Credit:
17.5 points.

Reading

Be sure you have read, or at least skimmed, Chapters 4 and 5 of the textbook. (Correction: Chapter 6 should have been included too.)

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 are two basic techniques used in operating systems to share resources?

  2. (2.5 points) What are “policy” and “mechanism” as used in the textbook, and why separate the two?

  3. (2.5 points) When you execute, from the command line, a compiled C program, from an application programmer's point of view “the system” does some mysterious things and then transfers control to its main() function with argc and argv set appropriately. Which system call (“API” in the textbook's usage) does this? sketch what it does, as briefly as you can. (You can get full credit here even if you don't mention everything.)

  4. (2.5 points) What keystroke combination do UNIX shells use to interrupt the currently running process? To suspend it?

  5. (2.5 points) Under UNIX, can users kill any process whose process ID number they know?

  6. (2.5 points) The “limited” part of “limited direct execution” relies on several hardware features. List as many of them as you can, based on this chapter.

  7. (2.5 points) The “trap” instruction transfers control to -- somewhere. How does the system (hardware and/or operating system) know where to go?




2022-10-15