windows3-4 Exercise 1: Count the Content Processes ================================================================= Verification: Level 1 (run on the author's machine, read-only, no administrator rights). Prediction (work this out before running the script): Before running: guess how many of Firefox's processes are tab (content) processes, and whether the summed working set will be larger or smaller than the summed private working set. (Mozilla's default is 8 shared web content processes, plus one per isolated site.) Command (firefox_roles.ps1 saved in the current folder; for Edge or Chrome change 'firefox' to 'msedge' or 'chrome' everywhere, but note their command lines name process types differently, so the role rule will need changing): .\firefox_roles.ps1 Output (real, from the author's machine on 2026-10-24; your numbers will differ): tab 20 procs private WS 1,186 MB working set 2,006 MB commit 2,222 MB parent 1 procs private WS 231 MB working set 360 MB commit 396 MB gpu 1 procs private WS 81 MB working set 155 MB commit 804 MB utility 3 procs private WS 7 MB working set 58 MB commit 32 MB rdd 1 procs private WS 2 MB working set 13 MB commit 39 MB socket 1 procs private WS 1 MB working set 7 MB commit 9 MB TOTAL 27 procs private WS 1,507 MB working set 2,599 MB commit 3,503 MB WHY THIS WORKS AS AN ANSWER --------------------------- Answers from this output: 20 tab (content) processes. The largest role by private working set is tab (1,186 MB, against 231 MB for the parent). The summed working set (2,599 MB) is larger than the summed private working set (1,507 MB) because the working set of each process includes pages it shares with other processes, and adding the processes together counts each shared page once per process; private working set counts only what a process holds that nothing else shares (chapter 1). Commit (3,503 MB) is larger again because it includes memory reserved but not in RAM, as the GPU process shows (81 MB private, 804 MB commit). Common mistakes: reporting the 'working set' total as "what Firefox uses"; reading the process count as the memory cost (the non-tab roles other than the parent are under 100 MB together); and expecting your own numbers to match, since they depend on which sites you have open and on the Firefox version (this run was Firefox Nightly 161.0a1).