An operating system mainly manages three very important things:
- Filesystems (how data is stored)
- Processes (running programs)
- Permissions (who can access what)
Think of it like a company:
- Filesystem = Filing cabinet
- Processes = Workers doing tasks
- Permissions = Access rules for rooms and documents
Filesystems
What Is a Filesystem?
A filesystem is the method the operating system uses to:
- Store files
- Organize folders
- Keep track of where data lives on the disk
Without a filesystem, your computer would not know:
- Where your documents are
- Where programs are installed
- Where your photos are stored
How Files Are Organized
Operating systems use a tree structure.
Example:
Root ├── Users │ ├── Alice │ │ └── file.txt │ └── Bob └── Program Files
There is always a top-level folder:
- Windows → C:\
- Linux/macOS → /
This top is called the root.
Common Filesystems
Different operating systems use different filesystems:
- Windows → NTFS
- Linux → ext4
- macOS → APFS
Each filesystem controls:
- Maximum file size
- File permissions
- Disk performance
- Security features
Viewing Files via Command Line
Linux/macOS:
ls
Windows:
dir
Change directory:
cd foldername
Processes
What Is a Process?
A process is a running program.
When you:
- Open a browser
- Run a game
- Start a text editor
The OS creates a process.
Important:
A program is just a file.
A process is that program running in memory.
What the OS Does for Each Process
The OS gives each process:
- Memory (RAM)
- CPU time
- Process ID (PID)
- Access permissions
Think of it like giving each worker:
- A desk
- Electricity
- An ID badge
- Work rules
Viewing Processes
Linux/macOS:
ps
Or live monitoring:
top
Windows:
tasklist
To stop a process (Linux/macOS):
kill 1234
(1234 = Process ID)
Permissions
Why Permissions Exist
Imagine if every user could:
- Delete system files
- Read other users’ private data
- Modify the operating system
That would be chaos.
Permissions protect:
- System files
- User data
- Running services
Types of Users
Most systems have:
- Regular users
- Administrator (Windows)
- root (Linux/macOS superuser)
The administrator/root has full control.
File Permissions (Linux/macOS Example)
Each file has three permission categories:
- Owner
- Group
- Others
And three permission types:
- Read (r)
- Write (w)
- Execute (x)
Example:
-rwxr-xr--
Meaning:
- Owner: read, write, execute
- Group: read, execute
- Others: read only
Changing Permissions
Linux/macOS:
chmod 755 file.txt
Windows (basic example):
icacls file.txt
How These Three Work Together
Let’s say you open a text editor and save a file.
Here’s what happens internally:
- A process is created for the editor.
- The OS checks your permissions.
- The filesystem stores the file on disk.
- The OS updates metadata (size, location, owner).
Everything is coordinated by the OS kernel.
Simplified Internal Flow
When you run a program:
User Action ↓ Shell / GUI ↓ Operating System ↓ Kernel ↓ CPU + Memory + Disk
The kernel is the core of the OS that controls everything.
# List files (Linux/macOS)
ls
# List files (Windows PowerShell)
dir
# Change directory
cd foldername
# View processes (Linux/macOS)
ps
# Live process monitor (Linux/macOS)
top
# View processes (Windows)
tasklist
# Kill a process (Linux/macOS)
kill 1234
# View file permissions (Linux/macOS)
ls -l
# Change permissions (Linux/macOS)
chmod 755 file.txt
# Check permissions (Windows)
icacls file.txt