Objective

See the operating system at work on your own PC: the background services it runs, the processes sharing your CPU and memory, and the simple view of hardware that the OS gives to programs. You only look. Nothing in this lab changes any setting. (Do not stop or disable any service or process.)

Time: 25–30 minutes
You need: A Windows PC. No extra software is required.

What to Open

ToolHow to open it
Task ManagerPress Ctrl + Shift + Esc
ServicesPress Win + R, type services.msc, press Enter
Resource MonitorPress Win + R, type resmon, press Enter
Performance MonitorPress Win + R, type perfmon, press Enter
System InformationPress Win + R, type msinfo32, press Enter
PowerShellPress Win, type PowerShell, press Enter (normal, not admin)

Part 1: Services Running (Services.msc)

A service is a program the OS runs in the background, with no window, often from boot. Printing, networking, Windows Update and sound all work through services.

Open services.msc. Click the Status column header so Running services come first.

  1. How many services are listed in total (roughly)? ________________
  2. How many say Running (roughly)? ________________
  3. Find Windows Update. Status: ________ Startup Type: ________
  4. Find Print Spooler. Status: ________ Startup Type: ________
  5. Double-click DHCP Client, open the Dependencies tab. What does it depend on? ________________

Startup types: Automatic (starts at boot), Manual (starts only if needed), Disabled (never starts). Close the window with Cancel; do not change anything.

Now the same facts in PowerShell:

Get-Service | Group-Object Status | Select-Object Name, Count
Get-Service | Where-Object Status -eq 'Running' | Select-Object -First 15 Name, DisplayName
  1. Do the counts match what you saw in the window? ________________

Part 2: System Processes (Task Manager)

Open Task Manager. Click More details if it looks small.

2A. The Processes tab. Click the CPU column to sort. Note the top three.

  1. Top three CPU users: ________________
  2. Look at the Apps, Background processes and Windows processes groups. Which group has the most entries? ________________

2B. The Details tab. Find these and note their PID (process ID):

ProcessWhat it isPID
SystemHolds the kernel's own threads________
System Idle ProcessNot a program: shows how much CPU is unused________
smss.exeSession Manager: an early boot-time process________
csrss.exePart of the Windows subsystem________
wininit.exe and services.exeStart the system services________
explorer.exeThe desktop and file manager (the shell)________
  1. Which has the lowest PID? ________________ (Hint: the System process is usually PID 4 and the Idle process is 0.)

Right-click a column header → Select columns, and add Threads, Handles and Status.

  1. How many threads does explorer.exe have? ________________
  2. How many threads does the System process have? ________________ (It holds many kernel threads.)

2C. Parent and child. Right-click the Processes tab list → choose Expand all, or in the Processes tab expand a program like a browser to see its child processes.

  1. How many separate processes does your browser use? ________________ (This is the browser's sandbox design, Section 6.2.)

PowerShell version:

Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 Name, Id, CPU, Threads
(Get-Process).Count
(Get-Process | Measure-Object -Property Threads -Sum).Sum
  1. Total number of processes: ________ Total number of threads: ________ Is the thread count bigger than the number of CPU cores? ________

Part 3: Kernel vs User Time (Performance Monitor)

Open perfmon. Click Performance Monitor on the left, press the green + button, and add these counters (look under Processor and System):

  • Processor → % Privileged Time (time in kernel mode, Section 7)
  • Processor → % User Time
  • System → Context Switches/sec
  • System → System Calls/sec

Open a large program or a big web page, and watch.

  1. Which is larger on your PC: user time or privileged time? ________________
  2. Context switches per second (roughly): ________________
  3. System calls per second (roughly): ________________

Notice: the numbers are in the thousands. This is the hidden traffic from Section 7.4 and 7.5.

Part 4: OS Abstraction: What Hardware Do Applications See?

The OS shows programs a simplified world. Compare what the real hardware is with what the OS shows.

4A. Real hardware (Task Manager → Performance). Click CPU, Memory, Disk and Ethernet/Wi-Fi one by one.

  1. CPU model and number of cores / logical processors: ________________
  2. RAM size and speed: ________________
  3. Disk type (SSD or HDD) and name: ________________

4B. What programs see. Run these in PowerShell:

Get-Volume
Get-PSDrive -PSProvider FileSystem
Get-NetAdapter | Select-Object Name, Status, LinkSpeed
  1. Look at the list of drives. Does your program see the physical SSD brand, or just C:? ________________
  2. In Get-Volume, what file system does C: use (probably NTFS)? ________________

4C. The virtual memory view. In Task Manager → Performance → Memory, note In use, Available, Committed and Cached.

  1. Committed (first number / second number): ________________
  2. Is Committed larger than In use? ________________ (Committed counts promises; remember lazy allocation from Section 4.2.)

4D. Drivers behind the abstraction. In Device Manager (Win + X), expand Disk drives and Network adapters. Right-click one device → Properties → Driver.

  1. Driver provider and date: ________________

4E. Resource Monitor. Open resmon. Click the Disk tab.

  1. Which process is doing the most disk activity right now? ________________ (This is the OS sharing one disk among many programs, Section 2.1.)

What Should Happen

  • Part 1 shows dozens of background services, most Running, a few Manual or Disabled.
  • Part 2 shows low-numbered system processes started by the OS at boot, and hundreds of threads for few cores.
  • Part 3 shows thousands of system calls and context switches per second, even on a quiet PC.
  • Part 4 shows programs see C: and a network connection, not specific chips.

Interpretation Guide

What you seeWhat it means
System Idle Process at 90% or moreThe CPU is mostly unused; good
System process (PID 4)The home of kernel-mode threads
Hundreds of threads, 8 coresMost threads are waiting (Section 3.2)
Committed larger than In usePromised memory is not all in RAM yet
High Hard Faults/sec in Resource MonitorRAM is short and the OS is paging (Section 4.4)
Many browser processesEach tab or part is isolated (Section 6.2)
Service with startup type ManualThe OS starts it only when something needs it
System interrupts with high CPUA device or driver is firing too many interrupts (Section 5.3)

Follow-Up Questions

  1. Why does the OS run services as background processes, rather than making each program do those jobs itself?
  2. The System Idle Process shows 95% CPU. Is something wrong? Why or why not?
  3. Explain in your own words why the same program works on your PC and on a friend's PC with a different SSD brand.
  4. Why does a PC with 8 cores comfortably run 300 threads?
  5. Name three facts from this lab that you could not have learned from just looking at the outside of the PC.