- Authors

- Name
- Youngju Kim
- @fjvbn20031
Linux and Windows 10 Operating System Comparison
Linux and Windows are operating systems with different design philosophies. This article compares the kernel architecture, process management, memory management, and file systems of both operating systems, and also examines Windows Subsystem for Linux (WSL).
1. Linux System Overview
Linux Kernel Architecture
Linux is based on a monolithic kernel but achieves flexibility through a module system.
┌───────────────────────────────────────────────┐
│ User Space │
│ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │ bash │ │ nginx│ │ gcc │ │ java │ │
│ └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘ │
│ └────────┴────────┴────────┘ │
│ │ System Call Interface │
├──────────────┴────────────────────────────────┤
│ Kernel Space │
│ ┌─────────────────────────────────────────┐ │
│ │ Process Management │ │
│ │ Scheduler │ Process creation │ Signals │ │
│ ├─────────────────────────────────────────┤ │
│ │ Memory Management │ │
│ │ Virtual memory │ Page cache │ slab │ │
│ ├─────────────────────────────────────────┤ │
│ │ VFS (Virtual File System) │ │
│ │ ext4 │ XFS │ Btrfs │ NFS │ tmpfs │ │
│ ├─────────────────────────────────────────┤ │
│ │ Network Stack │ │
│ │ TCP/IP │ Sockets │ Netfilter │ eBPF │ │
│ ├─────────────────────────────────────────┤ │
│ │ Device Drivers │ │
│ │ Block │ Char │ Network │ USB │ │
│ └─────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────┐ │
│ │ Hardware Abstraction │ │
│ └─────────────────────────────────────────┘ │
├───────────────────────────────────────────────┤
│ Hardware │
└───────────────────────────────────────────────┘
Linux Process Management
// Linux의 프로세스 구조 (task_struct 주요 필드)
struct task_struct {
volatile long state; // 프로세스 상태
int prio; // 우선순위
struct mm_struct *mm; // 메모리 정보
struct fs_struct *fs; // 파일 시스템 정보
struct files_struct *files; // 열린 파일 테이블
struct signal_struct *signal; // 시그널 정보
pid_t pid; // 프로세스 ID
pid_t tgid; // 스레드 그룹 ID
struct task_struct *parent; // 부모 프로세스
struct list_head children; // 자식 프로세스 목록
// ...
};
Linux Process States:
┌─────────┐ fork() ┌─────────┐
│ Does not│────────→ │ READY │
│ exist │ │ (runnable│
└─────────┘ │ ) │
└────┬────┘
Scheduling │ Preemption
┌────┴────┐
│ RUNNING │
└────┬────┘
I/O wait │ │exit()
┌────┴──┐ │
│SLEEPING│ │
│(waiting)│ │
└────────┘ │
┌─────┴───┐
│ ZOMBIE │
│(exited) │ → wait() → removed
└─────────┘
Linux Process Scheduler (CFS)
CFS (Completely Fair Scheduler) distributes CPU time fairly based on virtual runtime.
CFS Red-Black Tree:
(sorted by vruntime)
B (vruntime=50)
╱ ╲
A (30) ╱ ╲ D (80)
╱ ╲
C (45) E (100)
→ Leftmost node (A, vruntime=30) is next to run
→ After running, A's vruntime increases → tree rebalanced
→ O(log n) insert/delete
Linux Memory Management
Linux Process Virtual Address Space (64-bit):
High address
┌──────────────────────┐ 0xFFFFFFFF...
│ Kernel space │
│ (shared by all) │
├──────────────────────┤ 0x7FFF...
│ Stack (↓ grows) │
│ (gap) │
│ mmap region │ ← shared libs, mmap
│ (gap) │
│ Heap (↑ grows) │ ← malloc/brk
├──────────────────────┤
│ BSS (uninit.) │
├──────────────────────┤
│ Data (init.) │
├──────────────────────┤
│ Text (code) │
└──────────────────────┘ 0x0000...
Low address
Linux File System Management
# Linux에서 지원하는 주요 파일 시스템
# ext4 : 범용 (가장 널리 사용)
# XFS : 대용량 파일/고성능
# Btrfs : CoW, 스냅샷, 압축
# tmpfs : 메모리 기반 임시 파일 시스템
# procfs : 프로세스 정보 (/proc)
# sysfs : 장치/드라이버 정보 (/sys)
# 마운트된 파일 시스템 확인
df -hT
# Filesystem Type Size Used Avail Use% Mounted on
# /dev/sda1 ext4 100G 45G 50G 48% /
# tmpfs tmpfs 16G 0 16G 0% /dev/shm
Linux Kernel Modules
Kernel functionality can be dynamically added/removed at runtime.
// 간단한 커널 모듈 예시
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Example");
MODULE_DESCRIPTION("Hello World Module");
static int __init hello_init(void) {
printk(KERN_INFO "Hello, Kernel Module!\n");
return 0;
}
static void __exit hello_exit(void) {
printk(KERN_INFO "Goodbye, Kernel Module!\n");
}
module_init(hello_init);
module_exit(hello_exit);
# 커널 모듈 관리 명령어
lsmod # 로드된 모듈 목록
sudo insmod hello.ko # 모듈 로드
sudo rmmod hello # 모듈 언로드
sudo modprobe module_name # 의존성 자동 해결 로드
modinfo module_name # 모듈 정보 확인
2. Windows 10 System Overview
Windows Architecture
Windows uses a hybrid kernel architecture.
┌───────────────────────────────────────────────┐
│ User Mode │
│ ┌────────────────────────────────────────┐ │
│ │ System Processes │ │
│ │ Service Mgr │ LSA │ Session Manager │ │
│ └────────────────────────────────────────┘ │
│ ┌────────────────────────────────────────┐ │
│ │ Subsystems │ │
│ │ Windows (Win32) │ POSIX │ WSL │ │
│ └────────────────────────────────────────┘ │
│ ┌────────────────────────────────────────┐ │
│ │ Environment Subsystem DLLs │ │
│ │ ntdll.dll │ kernel32.dll │ user32.dll│ │
│ └────────────────────────────────────────┘ │
├───────────────────────────────────────────────┤
│ Kernel Mode │
│ ┌────────────────────────────────────────┐ │
│ │ Executive │ │
│ │ Object Mgr │ Process Mgr │ Memory Mgr│ │
│ │ I/O Mgr │ Cache Mgr │ Security │ │
│ │ Config Mgr │ PnP Mgr │ Power Mgr │ │
│ ├────────────────────────────────────────┤ │
│ │ Kernel │ │
│ │ Scheduling │ Sync │ Interrupt handler│ │
│ ├────────────────────────────────────────┤ │
│ │ HAL (Hardware Abstraction) │ │
│ └────────────────────────────────────────┘ │
│ ┌────────────────────────────────────────┐ │
│ │ Device Drivers │ │
│ └────────────────────────────────────────┘ │
├───────────────────────────────────────────────┤
│ Hardware │
└───────────────────────────────────────────────┘
Windows Object Manager
The Windows kernel manages nearly all resources as objects.
Object Manager Namespace:
\
├── Device
│ ├── HarddiskVolume1
│ ├── Tcp
│ └── Null
├── ObjectTypes
│ ├── Process
│ ├── Thread
│ ├── File
│ ├── Mutex
│ └── Semaphore
├── Sessions
│ └── 1
│ └── BaseNamedObjects
│ └── MyMutex
└── GLOBAL??
├── C: → Device\HarddiskVolume1
└── D: → Device\CdRom0
Windows Scheduling
Windows Priority Levels:
31 ┌──────────────────┐
│ Real-time class │ 16-31: Real-time priority
16 ├──────────────────┤
15 │ Variable class │ 1-15: Dynamic priority
│ │ (temporary boost on I/O)
1 ├──────────────────┤
0 │ Idle │ 0: System idle thread
└──────────────────┘
Priority Boost:
- Interactive processes: Foreground boost
- I/O completion: Temporary priority raise
- Starvation prevention: Boost long-waiting threads
NTFS (NT File System)
NTFS Key Features:
┌──────────────────────────────────────────┐
│ MFT (Master File Table): │
│ - Stores all file/directory metadata │
│ - Each entry ~1KB │
│ - Small files stored directly in MFT │
│ │
│ Additional Features: │
│ - Journaling (transaction log) │
│ - File-level compression │
│ - File-level encryption (EFS) │
│ - Alternate Data Streams (ADS) │
│ - ACL-based fine-grained access │
│ - Disk quotas │
│ - Symbolic links, junctions │
└──────────────────────────────────────────┘
3. Linux vs Windows Comparison
Kernel Architecture
| Property | Linux | Windows |
|---|---|---|
| Kernel type | Monolithic (+ modules) | Hybrid |
| Source code | Open source (GPL) | Proprietary (some open) |
| Device drivers | In-kernel/modules | Kernel/user-mode drivers |
| File system | VFS abstraction | I/O manager + filter drv |
| Security model | DAC + MAC (SELinux) | ACL + integrity levels |
Process Model Comparison
Linux: Windows:
┌─────────────────────┐ ┌─────────────────────┐
│ Process (fork) │ │ Process │
│ ┌────┐ │ │ (CreateProcess) │
│ │Task│ = process │ │ ┌──────┐ ┌──────┐ │
│ └────┘ │ │ │Thread│ │Thread│ │
│ │ │ └──────┘ └──────┘ │
│ Thread = lightweight│ │ │
│ process (clone) │ │ Fiber: │
│ ┌────┐ ┌────┐ │ │ User-mode threads │
│ │Task│ │Task│ │ │ (cooperative sched.) │
│ └────┘ └────┘ │ └─────────────────────┘
│ → shared mm_struct │
│ (address space) │
└─────────────────────┘
Linux fork(): Process duplication (CoW)
Windows CreateProcess(): Create new process directly
File System Comparison
| Property | Linux (ext4) | Windows (NTFS) |
|---|---|---|
| Metadata | inode | MFT record |
| Max file size | 16 TiB | 256 TiB |
| Journaling | Supported | Supported |
| Permissions | POSIX (rwx) | ACL |
| Case sensitivity | Sensitive | Preserving (insens.) |
| File streams | Single | Multiple (ADS) |
| Encryption | dm-crypt (vol.) | EFS (per-file) |
IPC Comparison
Linux IPC: Windows IPC:
- pipe / named pipe (FIFO) - Named Pipes
- UNIX domain sockets - Mailslots
- System V IPC - Shared Memory (Section)
(shmem, semaphore, msgqueue) - COM / DCOM
- POSIX IPC - Windows Messages
- D-Bus - RPC
- netlink sockets - ALPC (Advanced Local
- io_uring Procedure Call)
4. Windows Subsystem for Linux (WSL)
WSL enables native execution of Linux binaries on Windows.
WSL 1 vs WSL 2
WSL 1:
┌──────────────────────────────────────┐
│ Linux User Space │
│ (bash, gcc, python, etc.) │
├──────────────────────────────────────┤
│ LxCore.sys / Lxss.sys │
│ (Linux syscall → NT syscall xlation) │
├──────────────────────────────────────┤
│ Windows NT Kernel │
└──────────────────────────────────────┘
→ Syscall translation (compatibility limits)
WSL 2:
┌──────────────────────────────────────┐
│ Linux User Space │
│ (bash, gcc, python, docker, etc.) │
├──────────────────────────────────────┤
│ Real Linux Kernel (inside light VM) │
├──────────────────────────────────────┤
│ Lightweight Utility VM (Hyper-V) │
├──────────────────────────────────────┤
│ Windows NT Kernel + Hyper-V │
└──────────────────────────────────────┘
→ Full Linux kernel (high compatibility)
| Property | WSL 1 | WSL 2 |
|---|---|---|
| Architecture | Syscall xlation | Lightweight VM (real kernel) |
| Syscall compat. | Partial | Full |
| File system perf | Windows FS fast | Linux FS fast |
| Network | Same as host | NAT-based |
| Docker support | Not supported | Supported |
| Memory | Shared | Separate (dynamic) |
# WSL 기본 명령어
wsl --list --online # 설치 가능한 배포판 목록
wsl --install -d Ubuntu # Ubuntu 설치
wsl -l -v # WSL 버전 확인
wsl --set-default-version 2 # 기본 WSL 2로 설정
wsl -d Ubuntu # Linux 배포판 시작
# Windows에서 Linux 파일 접근: \\wsl$\Ubuntu\home\user\
5. Summary
Linux
- Kernel: Monolithic + dynamic module loading
- Process: fork/exec model, task_struct-based, CFS scheduler
- Memory: Virtual memory, page cache, slab allocator
- File System: VFS unifies various file systems, ext4 as default
- Strengths: Open source, server/cloud environments, highly customizable
Windows 10
- Kernel: Hybrid architecture, Executive services layer
- Process: CreateProcess model, object-based management, priority boost
- Memory: Paged/NonPaged pools, Section objects, working set management
- File System: NTFS (MFT-based, ACL, ADS, EFS support)
- Strengths: Desktop compatibility, enterprise management, Linux integration via WSL
Quiz: Linux and Windows Comparison
Q1. What is the difference between Linux's monolithic kernel and Windows's hybrid kernel?
A1. Linux's monolithic kernel runs all core functions -- process management, memory management, file systems, and drivers -- in a single kernel space, providing good performance but affecting the entire system on errors. Windows's hybrid kernel keeps core functions in kernel mode while placing some services (environment subsystems, etc.) in user mode, balancing stability and performance.
Q2. What is the difference between Linux's fork() and Windows's CreateProcess()?
A2. fork() duplicates the current process to create a child process. Parent and child run the same code until exec() loads a different program. It is efficient with Copy-on-Write. CreateProcess() creates a new process from scratch and loads the specified executable immediately. It is similar to combining the fork+exec two-step into one.
Q3. What is the key difference between WSL 1 and WSL 2?
A3. WSL 1 uses an emulation approach that translates Linux system calls to NT kernel system calls, with compatibility limitations for some system calls. WSL 2 runs an actual Linux kernel inside a Hyper-V-based lightweight VM, providing full system call compatibility and Docker support.