{ "q1": { "type": "blank", "question": "\n\n\nModern operating systems use a basic technique known as ____, which allows\nusers to run as many concurrent processes as they would like on a single\n____. To do this, the OS will need to employ low-level ____ or methods\nsuch as a ____, which gives the OS the ability to stop one program and start\nanother on a given CPU. Additionally, on top of these methods, the OS will\nneed to provide intelligence in the form of ____ or algorithms that make\ndecisions within the OS.\n\n\n" }, "q2": { "type": "multiple", "question": "\n\n\nAfter a fork(), both the parent and the child processes are\nalmost exactly the same except they have different (choose all that apply):\n\n\n", "responses": { "address": "Address spaces", "registers": "Registers", "code": "Program code", "pid": "Process identifiers (PID)", "uid": "User identifier (UID)" } }, "q3": { "type": "multiple", "question": "\n\n\nWhen a program is executed, the operating system must do which of the\nfollowing tasks (choose all that apply)?\n\n\n", "responses": { "kill": "Kill an existing process.", "fs": "Allocate space on the hard drive.", "code": "Load code and static data in memory.", "stack": "Create and initialize the stack and heap.", "io": "Setup I/O or file descriptors.", "main": "Jump to the main() routine.", "compile": "Compile the code.", "init": "Signal the init process." } }, "q4": { "type": "blank", "question": "\nA process be in three different states:\n\n
    \n\n
  1. The ____ state is where a process can be ran, but for some reason\n the OS has chosen not to run it at the current moment.
  2. \n\n
  3. The ____ state is where a process has performed some kind of\n operation that makes it unavailable to be ran until another even takes\n place.
  4. \n\n
  5. The ____ state is where a process is actively executing on a processor
  6. \n\n
\n" }, "q5": { "type": "order", "question": "\n\n\nSuppose our user application wishes to open a file for reading. Order the\nfollowing events:\n\n\n", "responses": { "trap": "Hardware receives trap.", "return": "OS returns-from-trap.", "syscall": "User application calls open() system call.", "jump": "Hardware jumps to trap handler.", "registers": "Hardware saves registers to kernel stack.", "handler": "OS handles trap by doing work of syscall.", "kernelmode": "Hardware moves to kernel mode." } }, "q6": { "type": "blank", "question": "\n\n\nOn early versions of the Macintosh operating system, the OS used a ____\napproach where the OS trusts the processes of the system to behave\nreasonably. Of course, this was a terrible idea, so modern operating\nsystems now utilize a ____ to raise a CPU exception, halt the current\nprocess, and load a pre-configured ____ in the OS. When this happens, the\n____ needs to make a decision on which process to run next. If it chooses\nto execute another process, then the OS must perform a ____.\n\n" }, "q7": { "type": "multiple", "question": "\n\nDuring a context switch, what information must be saved and restored\n(choose all that apply)?\n\n\n", "responses": { "registers": "General purpose registers", "pc": "Program counter", "ksp": "Kernel stack pointer", "files": "Open files", "memory": "Address space" } } }