Processes: Creation and Control
Image by Carola Havers from Pixabay
In this module, we will begin learning about the fundamental operating system abstraction, the process. A process, which is how the operating system represents a running application, is both the basic unit for execution and the main abstraction for protection in the operating system.
Learning Objectives
We've learned that the operating system performs three roles in the system: referee, illusionist, and the glue. Here, we'll see the development of those roles over the course of time.
Upon completion of this module, you will be able to:
- Explain purpose of processes,
- Understand the process life cycle and how a process transitions between stages,
- Create and control processes and their children through systems calls
- Modify process behavior through communication
Learning
- Video: What is a Process? (25 minutes)
- Video: Dual Mode Execution (15 minutes)
- Video: System Resources (9 minutes)
- Video: Process Creation (15 minutes)
- Video: Process Control (11 minutes)
-
Slides that were presented in the videos
Note that these videos have embedded formative assessments---you'll want to watch the videos and complete those before class, so that you can earn participation credit.
Recommended Readings
Completing the readings in this class is highly recommended---it can be very helpful to see how the concepts are explained by a different person, and the extra details can help the pieces fit together.
OSTEP: The Process, Process API, and Limited Direct Execution up to 6.3
(Limited Direct Execution is the term that OSTEP uses for Dual Mode Execution)
Fun Insights
- User Space vs. Kernel Space by Julia Evans
- Signals by Julia Evans
- Signals Quiz by Julia Evans
- fork() can fail by Rachel by the Bay
- Solaris Process State Diagram
- Demo: Linux Processes from UTCS's own Vijay Chidambaram
From Class
Evaluating Your Understanding
We are providing these rubrics for each module so that you can better understand what is expected and evaluate your understanding against those expectations. The hope is that, if you find yourself earning a 3 or below, you will continue to enhance your understanding until you find yourself earning a 4 or a 5.
| Standards | 5 | 4 | 3 | 2 |
|---|---|---|---|---|
| Process Life Cycle Diagram and Analysis | Student accurately draws the process life cycle, accurately describes its states, and accurately analyzes which state a process is when given information about its actions. | Student accurately draws the process life cycle, accurately describes its states, and satisfactorily analyzes which state a process is when given information about its actions | Student satisfactorily draws the process life cycle, satisfactorily describes its states, but unsatisfactorily analyzes which state a process is when given information about its actions | Student does not submit the diagram and analysis, OR student unsatisfactorily draws the process life cycle, improperly describes its states, and improperly analyzes which state a process is when given information about its actions |
| Short Answer Questions: Process-Specific | Student submitted answers to given questions that accurately and succinctly answer the questions. | Student submitted answers to given questions that satisfactorily and succinctly answer the questions. | Student submitted answers to given questions that unsatisfactorily answer the questions. | Student does not submit the answers OR submitted answers to given questions that incorrectly answer the questions. |
| Short Answer Questions: Processes as part of the larger system | Student submitted answers to given questions that accurately and succinctly answer the questions. | Student submitted answers to given questions that satisfactorily and succinctly answer the questions. | Student submitted answers to given questions that unsatisfactorily answer the questions. | Student does not submit the answers OR submitted answers to given questions that incorrectly answer the questions. |
| Shell Project (Project 0) | Student submitted project that 1) when executed, passes all tests cases, 2) when visually inspected, does not reveal any race conditions or concurrency errors, 3) includes a design document that accurately describes the code and answers the given questions, and 4) follows all given formatting guidelines | Student submitted project that 1) when executed, passes most tests cases, 2) when visually inspected, does reveals one or no race conditions or concurrency errors, 3) includes a design document that satisfactorily describes the code and answers the given questions, and 4) follows most given formatting guidelines | Student submitted project that 1) when executed, passes some tests cases, 2) when visually inspected, does reveals a few race conditions or concurrency errors, 3) includes a design document that unsatisfactorily describes the code and answers the given questions, and 4) follows few given formatting guidelines | Student fails to submit the project or submitted project that 1) when executed, passes no or few tests cases or doesn’t execute, 2) when visually inspected, does reveals many race conditions or concurrency errors, 3) includes a design document that incorrectly describes the code and answers the given questions, and 4) follows few given formatting guidelines |
| Userprog Project (Project 2) | Student submitted project that 1) when executed, passes all tests cases, 2) when visually inspected, does not reveal any race conditions or concurrency errors, 3) includes a design document that accurately describes the code and answers the given questions, and 4) follows all given formatting guidelines | Student submitted project that 1) when executed, passes most tests cases, 2) when visually inspected, does reveals one or no race conditions or concurrency errors, 3) includes a design document that satisfactorily describes the code and answers the given questions, and 4) follows most given formatting guidelines | Student submitted project that 1) when executed, passes some tests cases, 2) when visually inspected, does reveals a few race conditions or concurrency errors, 3) includes a design document that unsatisfactorily describes the code and answers the given questions, and 4) follows few given formatting guidelines | Student fails to submit the project or submitted project that 1) when executed, passes no or few tests cases or doesn’t execute, 2) when visually inspected, does reveals many race conditions or concurrency errors, 3) includes a design document that incorrectly describes the code and answers the given questions, and 4) follows few given formatting guidelines |