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
| Tool | How to open it |
|---|---|
| Task Manager | Press Ctrl + Shift + Esc |
| Services | Press Win + R, type services.msc, press Enter |
| Resource Monitor | Press Win + R, type resmon, press Enter |
| Performance Monitor | Press Win + R, type perfmon, press Enter |
| System Information | Press Win + R, type msinfo32, press Enter |
| PowerShell | Press 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.
- How many services are listed in total (roughly)? ________________
- How many say Running (roughly)? ________________
- Find Windows Update. Status: ________ Startup Type: ________
- Find Print Spooler. Status: ________ Startup Type: ________
- 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- 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.
- Top three CPU users: ________________
- 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):
| Process | What it is | PID |
|---|---|---|
| System | Holds the kernel's own threads | ________ |
| System Idle Process | Not a program: shows how much CPU is unused | ________ |
| smss.exe | Session Manager: an early boot-time process | ________ |
| csrss.exe | Part of the Windows subsystem | ________ |
| wininit.exe and services.exe | Start the system services | ________ |
| explorer.exe | The desktop and file manager (the shell) | ________ |
- 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.
- How many threads does
explorer.exehave? ________________ - 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.
- 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- 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.
- Which is larger on your PC: user time or privileged time? ________________
- Context switches per second (roughly): ________________
- 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.
- CPU model and number of cores / logical processors: ________________
- RAM size and speed: ________________
- 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- Look at the list of drives. Does your program see the physical SSD brand, or just
C:? ________________ - 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.
- Committed (first number / second number): ________________
- 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.
- Driver provider and date: ________________
4E. Resource Monitor. Open resmon. Click the Disk tab.
- 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 see | What it means |
|---|---|
| System Idle Process at 90% or more | The CPU is mostly unused; good |
| System process (PID 4) | The home of kernel-mode threads |
| Hundreds of threads, 8 cores | Most threads are waiting (Section 3.2) |
| Committed larger than In use | Promised memory is not all in RAM yet |
| High Hard Faults/sec in Resource Monitor | RAM is short and the OS is paging (Section 4.4) |
| Many browser processes | Each tab or part is isolated (Section 6.2) |
| Service with startup type Manual | The OS starts it only when something needs it |
| System interrupts with high CPU | A device or driver is firing too many interrupts (Section 5.3) |
Follow-Up Questions
- Why does the OS run services as background processes, rather than making each program do those jobs itself?
- The System Idle Process shows 95% CPU. Is something wrong? Why or why not?
- Explain in your own words why the same program works on your PC and on a friend's PC with a different SSD brand.
- Why does a PC with 8 cores comfortably run 300 threads?
- Name three facts from this lab that you could not have learned from just looking at the outside of the PC.