🔬 Lab
CS 240 Lab 13
Learning Goals & Reflection
CS 240 Lab 13
Learning Goals
Core Goals
Students can:
- Explain what a process is:
(
)
- Explain how multiple processes can run “at the same time” on a single CPU.
- Explain what an “interrupt” is.
- Explain at a very high level how the physical RAM of the computer is shared between multiple processes.
- Use Linux command-line tools for managing processes:
(
)
- Use
toporpsto list processes. - Read files in the
/procfolder to find out stats about processes.
- Use
- Understand how the
forkfunction works in C: ( )- Explain what it means that you “call
forkonce but it returns twice.” - Describe the return value from
forkand how it differs between the parent and child processes. - Predict the output from short programs that use
fork, including how many processes will be created and when the shell will assume the process is done and print the next input prompt. - Identify whether a program is a “fork bomb” by reading the source code without running it.
- Explain why the order in which processes will run is unpredictable.
- Explain what it means that you “call
Stretch goals
- Use Linux command-line tools for managing processes:
(
)
- Use control-C,
kill, and/orkillallto stop processes. - Use control-Z and the
jobs,fg, andbgcommands to pause and manage foreground and background processes.
- Use control-C,
- Understand how the
forkfunction works in C: ( )- Identify a few different options for communication between processes that need to coordinate work.
Reflection
Note: Make sure to use the ‘print’ dialog to save this page as a PDF when you’re done.
I’m most confident in (list a few):
I’m least confident in (list a few):
Questions (please take the time to ask at least one, thinking of a question will help you cement what you’ve learned):
