The process lifecycle contains five states: creation, ready, running, waiting, and exiting. Connect these states with arrows and explain what process would cause a process to transfer from one state to another over that connection. Note: This exercise is an example of the kind of work we will be doing all semester. The textbook provided a three-state model, so you're being asked to recall that model. Then, you're being asked to elaborate on the model and to extend it. The goal is to move this material into long-term memory by asking you to recall it and to connect it to other knowledge. Note: We used this exercise as a jumping-off point for discussing the creation of processes (recall the relationship between __start and main). We also introduced the key terms "mechanism" and "policy" and provided some examples in the context of scheduling. ------------------------------ Remember the memory model we drew at the end of last lecture? Recreate that diagram and use it as a starting point to answer the question, "What must the operating system do to 'create' a process?" In particular, focus on what structures in memory and pieces of state must be initialized. Note: The key insight here is, "The OS must initialize register state like the PC, but the process is not running on the processor, so there must be a structure in memory that stores this state." That structure is the process struct, and it contains (1) all of the execution state of the process (so that a context switch can be performed) and (2) links to OS state for the process including the page table, file table, etc. ------------------------------ Remember our discussions about loading and running a program from systems programming or computer organization? List the steps required to prepare a program for execution (starting from loading a program residing on a hard drive). Separately, list the steps required to execute and return from a function. Note: We filled in some gaps here and related the idea of a function call to that of a system call. The key mechanisms are the trapframe and the trap (exception). We will start with this question on Monday.