PROCESSES (Linux)
🧠PROCESSES (Linux) – MINI STUDY GUIDE
🔹 1. What is a Process?
Think of a process as a program that is currently running.
👉 Example:
Opening Chrome = isang process
Playing music = another process
đź’ˇ Key Characteristics
Can be started from:
GUI (click-click lang)
Command line (terminal)
Can create another process (parang parent-child relationship)
Important: A process can ONLY be created by another process
đź§ In short:
“Processes are like living programs—they can create, run, and manage other programs.”
🔹 2. Commands for Viewing & Controlling Processes
These are your main tools sa terminal:
Command | Purpose |
|---|---|
| Shows snapshot of processes |
| Real-time process viewer |
| Lists active jobs |
| Sends job to background |
| Brings job to foreground |
đź’ˇ Example:
ps= parang screenshottop= parang livestream
🔹 3. Viewing Processes (ps Command)
đź§ľ What ps Shows
It gives you a list of running processes with details like:
User
CPU usage
Memory usage
âš™ Process States
State | Meaning |
|---|---|
R | Running |
S | Sleeping (waiting) |
D | Waiting for I/O (e.g., disk) |
T | Stopped |
Z | Zombie (terminated but not cleaned) |
📌 According to page 1 table: Zombie processes are already dead but not yet removed by parent process
đź’ˇ Real-life analogy:
R = working student
S = naka-idle, waiting
Z = ghost đź‘» (exists but useless)
🔤 Extra Process Flags
Symbol | Meaning |
|---|---|
| High priority |
| Low priority |
| Locked in memory |
| Session leader |
| Multi-threaded |
| Foreground |
đź§ Quick Summary Trick:
👉 “RSDTZ” = Run, Sleep, Disk, Stop, Zombie
🔹 4. Understanding ps aux Output
When you run ps aux, you’ll see:
Field | Meaning |
|---|---|
USER | Owner |
%CPU | CPU usage |
%MEM | Memory usage |
VSZ | Virtual memory |
RSS | Actual RAM used |
START | Start time |
📌 From page 2:
RSS = real memory usage
VSZ = virtual memory
đź’ˇ In short:
VSZ = “potential memory”
RSS = “actual ginagamit”
🔹 5. The top Command (Real-Time Monitoring)
Ito na yung boss-level monitoring tool 🔥
📊 System Summary (Top Section)
From the table on page 2:
Time – current system time
Uptime – how long system is running
Users – number of logged-in users
Load Average – how busy the CPU is
đź’ˇ Load average = pila ng processes sa CPU
đź§ CPU Breakdown
Field | Meaning |
|---|---|
us | User processes |
sy | System processes |
ni | Low priority processes |
id | Idle |
wa | Waiting for I/O |
hi | Hardware interrupts |
si | Software interrupts |
st | Time stolen (VM) |
📌 Important concept: Niceness
Higher niceness = lower priority
Lower niceness = higher priority
đź’ˇ Real-life:
“Nice ka → papasingit ka sa iba → less priority ka”
đź’ľ Memory Info
Field | Meaning |
|---|---|
KiB Mem | RAM usage |
KiB Swap | Virtual memory |
🔹 6. Columns in top
From page 3:
Column | Meaning |
|---|---|
PID | Process ID |
USER | Owner |
PR | Priority (-20 to 19) |
NI | Niceness |
VIRT | Virtual memory |
RES | Real memory |
SHR | Shared memory |
S | Status |
%CPU | CPU usage |
%MEM | Memory usage |
TIME+ | CPU time used |
COMMAND | Process name |
đź’ˇ Important:
PR = priority level
NI = how “nice” the process is
🔹 7. Controlling Processes
🛑 Stop a Process
Ctrl + C
🔄 Background & Foreground
Action | Command |
|---|---|
Send to background |
|
Bring to foreground |
|
Show jobs |
|
đź’ˇ Example flow:
Run program
Stop it
bg→ runs in backgroundfg→ bring back
đź§ Real-life Analogy:
Foreground = ginagawa mo ngayon
Background = naka-open pero di focus
đź§ FINAL RECAP (Memory Hacks)
🔥 1. Commands
👉 “PJT-BF”
PS
Jobs
Top
BG
FG
🔥 2. Process States
👉 “RSDTZ”
Run
Sleep
Disk
Stop
Zombie đź‘»
🔥 3. Memory Types
👉 “Virtual vs Real”
VSZ = virtual (possible)
RSS/RES = real (actual)
🔥 4. Priority Trick
👉 “Nice ka = low priority”
đź§ FINAL TL;DR
Processes = running programs
ps= snapshot,top= real-time
States = RSDTZ
Priority controlled by niceness
Foreground vs Background = focus vs multitasking