Operating Systems

Projected Time

30-45 minutes

Motivation

Whether you interact with it via the command line or through a GUI, the operating system is a crucial and powerful element of any machine. Understanding the fundamentals of what an OS is responsible for and how you can interact with it will help you design more sophisticated and efficient applications.

Objectives

Participants will be able to:

Specific Things to Learn

Lesson

Common Mistakes / Misconceptions

Guided Practice

Open Spotlight (command + spacebar) and search for Activity Monitor. Press enter when it appears.

One the CPU tab, notice the number of processes and threads currently running. How many do you recognize?

Next, do all of the following using only the terminal.

Navigate back to the Activity Monitor. What do you notice? It should be obvious which process is stuck in an infinite loop. Make note of the Process ID number (PID).

In the other terminal window, enter kill 12345, replacing 12345 with the Process ID.

If this works, both terminal windows should close. If you don’t have permission to execute this command, type sudo kill 12345 and enter your password.

(Use this moment to remember to always think before you sudo.)

Independent Practice

Read all of the following instructions before starting:

First, save all your work, close all your programs, and restart your computer.

When your computer is back on, re-open the Activity Monitor. How are things different than they were during the Guided Practice? Are you surprised by anything?

Open Chrome and create a split-screen with the browser and the Activity Monitor. Play around with the browser: look for some cat videos, search for something eBay, check your email. As you do this, keep an eye on what changes in the Activity Monitor.

Arrange the processes in Activity Monitor alphabetically and navigate to the Google Chrome process.

In a new tab, open the clickbait website twentytwowords.com. Watch what happens in the Activity Monitor. Close the tab.

In a new tab, open the notably bare-bones community website craigslist.org. Watch what happens in the Activity Monitor. Close the tab.

Think about how the contrast between these two sites might inform websites you design in the future.

Challenge

Re-sort the processes in Activity Monitor to by CPU%. You will probably notice processes like “Google Chrome Helper” or “Slack Helper”. Pick one of these helper processes and research online to find out what its purpose is.

Check for Understanding

Pair with another participant who researched a different helper process. Explain to each other what you learned about the process, and discuss how you think affects the efficiency of the overall application.

Supplemental Materials