Kernel Comparison Linux vs Windows

This version was saved 2 years, 6 months ago View current version     Page history
Saved by widefox
on April 18, 2007 at 10:54:22 pm
 

Kernel Comparison: Linux versus Windows

 

Linux (2.6.20) v Windows (2003 R2 SP2)

This aims to be the most comprehensive0 kernel1, 2 comparison3 of the latest most popular Unix style kernel versus the latest most popular kernel. In Q2 2007, this means Linux 2.6.20 kernel versus Windows Server 2003 R2 SP2 kernel.

 

From 18 April 2007 this comparison is being upgraded to Vista! For the next few days there will be a mix of 2003 and Vista. Watch this space for the best Linux verses Vista kernel comparison.

 

Authors

I'm pleased to announce that Paolo De Nictolis has joined my previously single-handed effort. Originally inspired by, and based on TechEd 2004 - Session: Mark Russinovich 'Linux and Windows Kernel Comparison' #512. Edit this wiki! something wrong? - mail me Johnathon Weare

 

Also See: New Features 2.6.21 v Vista

Kernel New Feature Comparison: Linux (2.6.21) versus Windows (Vista)

 

  1. Kernel Comparison: Linux versus Windows
    1. Linux (2.6.20) v Windows (2003 R2 SP2)
    2. Authors
    3. Also See: New Features 2.6.21 v Vista
    4. Key
  2. Current Kernel
    1. Latest Release
    2. Initial Release
  3. Architecture
    1. Kernel Architecture
    2. Driver Architecture
  4. OS API
    1. OS API
    2. Available OS API
  5. Development
    1. Kernel Development
    2. OS Release
    3. Driver Development
    4. Kernel Compiler
  6. Source Code
    1. Kernel Source Code
    2. Kernel Source Code
    3. Driver Source Code
    4. Kernel + Drivers Source Code
  7. Boot
    1. Boot Image
    2. Boot Image Features
    3. Uniprocessor Boot Image
    4. Alternative Boot Image
    5. Boot probing
  8. Hardware
    1. Hardware Architecture
    2. Multiprocessor Hardware
    3. Hardware Components
    4. Hotplug
    5. ACPI
    6. Hard Disk
    7. Peripheral Buses
  9. Graphics
    1. Graphics Architecture
    2. Direct Graphics
    3. Graphics Drivers
  10. Process / Threads / Fiber
    1. Process
    2. Process Limits
    3. Thread
    4. Fiber
    5. Process, Thread, Fiber Performance
  11. Scheduler
    1. Scheduler Unit
    2. Scheduler Features
    3. Default Scheduler
    4. Alternative Scheduler
    5. Scheduler Classes
    6. Advanced Scheduling
    7. Scheduler Details
    8. Scheduler Timeslice - Uniprocessor
    9. Scheduler Timeslice - Multiprocessor
    10. Scheduler Details
    11. Scheduler Performance
  12. Real-Time
  13. Power
  14. Memory
    1. Memory Hardware
    2. Virtual Memory
    3. Virtual Memory Limits
    4. Swap
  15. Clock
    1. Hardware Clock
    2. Hardware High-Resolution timer
  16. Interrupts
    1. First Level Interrupt Handling
    2. Second Level Interrupt Handling
    3. Multiprocessor Interrupt
    4. Interrupt Performance
  17. I/O
    1. I/O General
    2. Default I/O Scheduler
    3. Alternative I/O Scheduler
    4. I/O Performance
    5. Vectored I/O
    6. Asynchronous I/O
    7. I/O Priority
    8. I/O Priority - read
    9. I/O Priority - write
  18. Synchronization
  19. Filesystem
    1. File Limits
    2. Filesystem caching
    3. Filesystem Mechanisms
    4. Best-in-class Filesystem
    5. General Purpose Filesystem
    6. Network Filesystem
    7. Legacy Filesystem
    8. Virtual Filesystem
    9. Encrypted Filesystem
    10. Obsolete Filesystem
    11. Specialist Filesystem
    12. Miscellaneous Filesystem
    13. Non Filesystem - swap
  20. Network
    1. General Network
    2. IPv6 Network
    3. Wireless Network
    4. Other Network
  21. Sound
  22. Virtualization
  23. Security
    1. Security Model
    2. Memory Security
    3. Cryptography
    4. Advanced Security
  24. Maintenance
  25. Support
  26. Availability
    1. Key2
    2. 2007
    3. 2006
    4. 2005
    5. 2004-2000
  27. Kernel Comparisons
  28. Notes
  29. References
  30. Further Reading
  31. Related Issues
  32. Comments

 


Key

better or more flexible vs. worse or less flexible, neutral or controversial.

 

Current Kernel

Latest Release

Current Kernel1, 2 Linux Windows
OSLinux 2.6.20Server 2003 R2 SP2
Version (patch)Linux 2.6.20.7NT 5.2.3790
Date (patch)Q2 2007Q1 2007

 

Initial Release

Initial Kernel1, 2 Linux Windows
OSLinux 2.6.20Server 2003
Version (release)Linux 2.6.20NT 5.2.3790
Date (release)Q1 2007Q4 2005

 

Architecture

Kernel Architecture

Architecture (kernel) Linux Windows
Architecture (#1, #27)monolithicmonolithic7
i.e. kernel protection from drivers (#1, #2)NN

 

Driver Architecture

Architecture (driver) Linux Windows
i.e. drivers user space (#1, #2)N (exceptions below)N
user space driver - USB (#157, -)YN
user space driver - printingYN
user space driver - FUSEYN
user space driver - Graphics27 (see below) (#159, #160)YN

 

OS API

OS API

OS API Linux Windows
OS APILinuxWin32
OS API - user space library (#1, #2)glibc 19Win32, Native20
OS API - Callssystem callslibrary calls
OS API - Calls total (#31, #32)320>1000

 

Available OS API

OS API (available) Linux Windows
OS API - POSIX APIY (not cert.)Y (N without option)
OS API - Linux APIYN
OS API - Win32 APIN (Y add-on18)Y
OS API - OS/2 APINN6
OS API - MS Native APINY (undocumented)

 

Development

Kernel Development

Development Model (kernel) Linux Windows
development modelopen sourceclosed source
development cycle time -major release (#8930, #9031)35 months38 months
development cycle time -minor release (#8930, #9031)3 months31 months
development cycle time -patch releaseongoingongoing

 

OS Release

OS Release Linux Windows
kernel release used unpatched in OS distribution (generally)NY

 

Driver Development

Development Model (drivers) Linux Windows
development modelopen source (few binary drivers)closed source
driver authors (in general)communitymanufacturer
constant kernel ABI5NY
drivers in kernel source tree5, 9Y (few binary drivers9)N
binary driver testing (as part of release)N (few)Y

 

Kernel Compiler

Kernel Compiler Linux Windows
compiler (#41, -)gccclosed
compiler - additional (#41, -)-closed SEH/VEH
compiler version (#41, -)3.2-4.3closed
compiler - alternative (not recommended)Intel icc-

 

Source Code

Kernel Source Code

Kernel Language (no drivers) Linux Windows
language - C (#411, #412)YY
language - Assembly (#411, #412)YY
language - SEH (#411, #412)NY
language - VEH (#411, #412)NY
language - C++8 (#411, #412)NY
language - C proportion8 (#57, #58)94% ±3%60% ±25%

 

Kernel Source Code

Source Size (no drivers)
kernel - size Source_lines_of_code (SLOC28) (no drivers) (#7, #826)3.5M ±0.5M7.5M ±2.5M26

 

Driver Source Code

Source Code (drivers) Linux Windows
language - C (#411, #412)YY
language - Assembly (#411, #412)YY
language - SEH (#411, #412)NY
language - VEH (#411, #412)NY
language - C++8 (#411, #412)NY
drivers proportion of total (#51, #52)50%40% ±20%
drivers proportion of total bugs (#51, #52)85%75% ±20%

 

Kernel + Drivers Source Code

Source Code (kernel + drivers) Linux Windows
language - C proportion8 (#57, #58)94% ±3%70% ±25%
kernel Source_lines_of_code (SLOC28) (with drivers) (#3, #426)6M ±2M15M ±10M26
estimated bug error rate per line (#510, #610, 16)0.02%100.2%10, 16
i.e. estimated kernel bugs total (#3 * #510, #4 * #610)1200103000010, 16

 

Boot

Boot Image

Boot Image (selection) Linux Windows
boot selection of uniprocessor/multiprocessor optimised image (#67, #68)YY
boot self patching of unified image to create uniprocessor/multiprocessor imageYN

 

Boot Image Features

Boot Image Features Linux Windows
runtime loadable modulesYY
Relocatable kernelYN

 

Uniprocessor Boot Image

Boot Image (uniprocessor, no PAE) Linux Windows
files - kernel mode (no drivers25, 29) (#17, #20 #22)vmlinuz11, 12NTOSKRNL.EXE, HAL.DLL, GDIPLUS.DLL
files - user mode (no drivers25, 29) (#23, #24 #26 #30 #28)-NTDLL.DLL, WIN32K.SYS, KERNEL32.DLL, CSRSS.EXE22
filesizes - kernel mode (no drivers25, 29) (#17, #18 #20)1.3MB4.6MB (2.4MB + 0.5MB + 1.7MB)
filesizes - user mode (no drivers25, 29) (#23, #24 #26 #30 #28)-3.4MB (0.7MB + 1.7MB + 1.0MB + 0MB22)
filesizes - total of kernel mode + user mode (no drivers25, 29) (#17 #23, #18 ...)1.3MB>8.0MB

 

Alternative Boot Image

Boot Image (others) Linux Windows
files kernel mode - multiprocessor, no PAE (no drivers25, 29)vmlinuz11, 12NTKRNLMP.EXE, HAL.DLL, GDIPLUS.DLL
files kernel mode - uniprocessor, PAE (no drivers25, 29)vmlinuz11, 13NTKRNLPA.EXE, HAL.DLL, GDIPLUS.DLL
files kernel mode - multiprocessor, PAE (no drivers25, 29)vmlinuz11, 13NTKRPAMP.EXE, HAL.DLL, GDIPLUS.DLL

 

Boot probing

Boot (probing) Linux Windows
boot - multi-threaded device probing - USBN (Y option)N
boot - multi-threaded device probing - PCIN (Y option)N
boot - multi-threaded device probing - ISAN (Y option)N
boot - asynchronous SCSI scanningYN

 

Hardware

Hardware Architecture

Hardware Architecture Support (PC) Linux Windows
PC x86YY
PC AMD64YY
PC IA-64YY
Hardware Architecture Support (general)
AlphaYN
PPCYN
PPC64YN
SPARC32YN
SPARC64YN
ARMYN
HP PA-RISCYN
Motorola 680x0YN
MIPSYN
MIPS (DEC)YN
PowerPCYN
IBM S/390YN
Cell (STI)YN
Atmel AVR32YN
Hardware Architecture Support (game consoles)
Nintendo WiiNN
Microsoft Xbox 360NN (Y W2K deriv)
Microsoft XboxYN (Y W2K deriv)
Sony Playstation 3 (PS3)YN
Sony Playstation 2 (PS2)YN
Nintendo GamecubeYN
Hardware Architecture Support (other)
othersYN

 

Multiprocessor Hardware

Multiprocessor Support (architecture) Linux Windows
Multiprocessor - SMPYY
Multiprocessor - NUMAYY
NUMA Memory Manager Support (#421, -)YY
Hyperthreading (SMT)YY
MulticoreYY
Multiprocessor Support (limits)
Maximum number of CPUs - 32bit (#47 PID limit, -)>10244 (other edition 32)
Maximum number of CPUs - 64bit (#47 PID limit, -)>10244 (other edition 64)

 

Hardware Components

Hardware Support (PC) Linux Windows
hardware support (new hardware15)none-good15OK-good15
hardware support (old hardware15)none-good15none-good15
supported listLDP Suse RHMS

 

Hotplug

Hardware (Hotplug) Linux Windows
CPU HotplugYY
RAM HotplugYY
PCI HotplugYY
I/O host bridges HotplugYN
PCI PnPYY
ISA PnPYY (Vista N (Y option))

 

ACPI

ACPI Linux Windows
ACPI 3.0Y (some)Y (some)
ACPI 2.0Y (some)Y (some)
ACPI 1.0Y (some)Y (some)

 

Hard Disk

Hard Disk Linux Windows
SATA support - NCQYY
flash drive as disk cacheNN
disk with flash cacheNN

 

Peripheral Buses

Peripheral Buses (PCIe) Linux Windows
PCI-Express (PCIe)YY
PCI-Express AERYN
Peripheral Buses (PCI)
PCIYY
Peripheral Buses (ISA)
ISAYY
Peripheral Buses (USB)
USB 2.0YY
USB Bandwidth reservationYY
USB 2.0 benchmark - hardware speed (#42315, #42415)Y?N
wireless USBYY
Peripheral Buses (other)
InfiniBandYN (Y other editions)
ExpressCardYY
FirewireYY

 

Graphics

Graphics Architecture

Graphics (architecture) 27 Linux Windows
layered graphics systemYN
modular graphics systemYN
graphics system user mode (drivers)YN
graphics system user mode (system)YN
windowing system user mode (interface)YN (Y some)
graphics system only user privileges (drivers)NN
windowing system only user privileges (system)NN
windowing system only user privileges (interface)YN

 

Direct Graphics

Graphics (direct) Linux Windows
direct graphicsDRI, xvDirectX 9

 

Graphics Drivers

Graphics (drivers) Linux Windows
graphics performance (in general15)OK9, 15Good9, 15
driver features (in general15)OK9, 15Good9, 15
driver authors (in general9)community9manufacturer

 

Process / Threads / Fiber

Process

Process Linux Windows
process - nomenclaturetaskcontainer, holds at least one thread
process - holds address space, handle table, statisticsYY
parent-child relationshipYN

 

Process Limits

Process (limits) Linux Windows
max processes2G?
max groups per processunlimited?
max threads2G?
max fibers2G?
max stack size??
max core file sizesee file size?
max data seg sizesee vm limit?
max file sizesee file size?
max pending signalsunlimited?
max locked memorysee vm limit?
max memory sizesee vm limit?
max open files??
max pipe size??
max POSIX message queues??
max cpu timeunlimited?
max user processes??
max virtual memorysee vm limit?
max file locks??

 

Thread

Thread Linux Windows
thread model (#171, -)1×1m×n
i.e. preemptive thread scheduling (-, #174)NY
threadN (Y tasks can24)Y
POSIX Threads (#101, #102)YN (Y add-on)

 

Fiber

Fiber Linux Windows
fiber (user-space thread)YY

 

Process, Thread, Fiber Performance

Process, Thread, Fiber (performance) Linux Windows
process cheap (#131, #132)YN
thread cheap (#131, #132)YY
fiber cheap (#131, #132)YY

 

Scheduler

Scheduler Unit

Scheduler (also see Process Management) Linux Windows
basic scheduling unittaskthread

 

Scheduler Features

Scheduler (features) Linux Windows
reentrantYY
preemptible user modeYY
preemptible kernel modeYY

 

Default Scheduler

Scheduler (default) (also see alternative) Linux Windows
default discipline (RR=Round Robin)RR, multilevel feedback queueRR, multilevel queue + boost
O(1) schedulerYY
priority basedYY
Scheduler (scalability)
pre-sorted queuesYY
queue per processorYY

 

Alternative Scheduler

Scheduler (alternative) Linux Windows
alternative disciplines availableYN
boot time selectionNN
Scheduler (available disciplines)
Borrowed-Virtual-Time (BVT)NN
Critical Path Method (CPM)NN
Deadline-Monotonic Scheduling (DMS)NN
Deficit Round Robin (DRR)NN
Earliest Deadline First (EDF)NN
Elastic Round Robin (ERR)NN
fair-shareNN
First In, First Out (FIFO) (or First Come First Served (FCFS))NN
genetic anticipatoryNN
Highest Response Ratio Next (HRRN)NN
intervalNN
Last In, First Out (LIFO) (or Last Come First Served (LCFS))NN
job shopNN
least-connectionNN
Least Slack Time (LST)NN
listNN
lotteryNN
multilevel feedback queue Round RobinYN
multilevel queue + boost Round RobinNY
never queueNN
proportional shareNN
Random Scheduling (RSS)NN
Rate-Monotonic Scheduling (RMS)NN
Rotating Staircase Deadline (RSDL)YN
Round-Robin (RR)NN
shortest expected delayNN
Shortest Job Next (SJN)NN
Shortest Remaining Time (SRT)NN
"take"NN
two-levelNN
Weighted Fair Queuing (WFQ)NN
weighted least-connectionNN
Weighted Round Robin (WRR)NN

 

Scheduler Classes

Scheduler (classes) Linux Windows
scheduling classes42
1. Normal (dynamic) priorities39 "100-139"15 "1-15"
2. Real Time FIFO (fixed) priorities100 "0-99"16 "16-31"
3. Real Time Round Robin (fixed) priorities100 "0-99"0
4. Batch (IDLEPRIO) (fixed)39 "100-139"0
scheduling priorities ranked most favoured->leastLow->HighHigh->Low

 

Advanced Scheduling

Scheduling (advanced scheduling) Linux Windows
Gang schedulingN (Y partial Cell)N

 

Scheduler Details

Scheduler (priority dynamism) Linux Windows
priority dynamism - raising priorityprocess does not use up timeslice23on wakeups
priority dynamism - lowering priorityprocess uses up timeslice23never
Scheduler (timeslice dynamism)
timeslice vary - automatic (entire range - priority, interactivity)YN
timeslice vary - manual (user setting, window boost)NY
timeslice vary - automatic (window boost)NY
Scheduler (prioritising tweaks)
priority interactive boost/CPU bound cut-5 to +5 (batch = +5)?
focused window process boost (-, #342)NY
focused window process boost - timeslice change (-, #342)-3x
i.e. Interactive Process boostYY

 

Scheduler Timeslice - Uniprocessor

Scheduler - Uniprocessor (timeslice) Linux Windows
timeslice runtime configurable (default) (-, #332)NY (Server or Client)
timeslice - uniprocessor Client (range) (#331, #332)10ms-200ms10ms-120ms
timeslice - uniprocessor Client (default) (#331, #332)100ms20ms, 40ms, 60ms
i.e. process minimum CPU174.8%7.7%
timeslice - uniprocessor Server (range) (#331, #332)10ms-200ms120ms
timeslice - uniprocessor Server (default) (#331, #332)100ms120ms

 

Scheduler Timeslice - Multiprocessor

Scheduler - Multiprocessor (timeslice) Linux Windows
timeslice - multiprocessor Client (range) (#331, #332)10ms-200ms15ms-180ms
timeslice - multiprocessor Client (default) (#331, #332)100ms30ms, 60ms, 90ms
timeslice - multiprocessor Server (range) (#331, #332)10ms-200ms180ms
timeslice - multiprocessor Server (default) (#331, #332)100ms180ms

 

Scheduler Details

Scheduler - Multiprocessor/Core (affinity) Linux Windows
scheduler SMP processor affinityYY
scheduler NUMA node affinityYY
scheduler Core affinityYY
scheduler Hyperthread (SMT) affinityYY
Scheduler - Multiprocessor/Core (priority)
scheduler favours physical CPU over HyperthreadYY
scheduler favours physical CPU over MulticoreYY
Scheduler - Multiprocessor/Core (load balancing)
scheduler load balancing - initialYY
scheduler load balancing - re-balanceYN
scheduler load balancing - smpniceYN
scheduler load balancing period (#151, -)200ms-

 

Scheduler Performance

Scheduler (performance) Linux Windows
scheduling latency (average) (#201, #20210)0.009mS2mS10
scheduling latency (worse) (#203, #20410)0.3mS16mS10

 

Real-Time

Soft Real-Time Support Linux Windows
Soft Real-Time SupportN (Y partial)N
Hard Real-Time Support
Hard Real-Time SupportN (Y customised versions33)N 34

 

Power

Power Management Linux Windows
idle processYY
CPU frequency throttling (ACPI)YY
CPU voltage throttling (ACPI)YY
peripheral sleep (ACPI)YY
system sleep - software suspend to RAM (ACPI)YY
system sleep - software suspend to disk (ACPI)YY

 

Memory

Memory Hardware

Memory (Hardware Support) Linux Windows
Maximum RAM - 32bit64GB4GB (128GB other editions)
i.e. PAE (#111, #112)YN (Y other editions)
Maximum RAM - 64bit1024GB-8589934592GB32GB (2048GB other editions)
Memory (Hardware Features)
Performance Acceleration Technology (PAT)NY
MTRRYY
MTRR not needed (superseded by PAT)NY
ECCYY

 

Virtual Memory

Virtual Memory Management (working sets) Linux Windows
working setsglobalper process
working set management uses "clock" algorithmYY
i.e. working set management - no set capYN
i.e. working set management - LRU memory pageused on the entire systemremoved for that process
i.e. working set management - tuner adjusts sets according to memory needs-Y
swapper (#45, -) NN
Virtual Memory Management (general)
per-CPU kernel memory buffersYY
lock pages in memoryYY
copy-on-write executables (COW) (#81, #82)YY
demand paging (#311, #312)YY

 

Virtual Memory Limits

Virtual Memory Management (limits) Linux Windows
split user-mode/kernel-mode 32bit 1GB/3GBYN
split user-mode/kernel-mode 32bit 2GB/2GBYY
split user-mode/kernel-mode 32bit 3GB/1GBYY
split user-mode/kernel-mode 32bit - option 4GB/4GBYN
i.e. maximum memory per process 32bit3GB 4GB split option3GB
maximum memory per process 32bit (PAE) (#113, #114)N (Y non-standard 64GB)N (Y other editions 64GB)
split user-mode/kernel-mode 64bit (#301, #302)8388608 TB/8388608 TB8 TB/8 TB
i.e. maximum memory per process 64bit (#301, #302)8388608 TB8 TB

 

Swap

Virtual Memory Management (swap) Linux Windows
swap prefetchN (Y with patch)N
swap speculativeN (Y with patch)N
swap performance - amount usedless15more15

 

Clock

Hardware Clock

Hardware Clock Linux Windows
timer interrupt frequency default - uniprocessor Hz (#321, #322)250100
timer interrupt frequency build time configurable - uniprocessor Hz (#321, #322)unlimitedN
timer interrupt frequency - multiprocessor Hz (#321, #322)25067
timer interrupt frequency build time configurable - multiprocessor Hz (#321, #322)unlimitedN

 

Hardware High-Resolution timer

Hardware High-Resolution timer Linux Windows
Time Stamp Counter (RDTSC) - uniprocessor (#323, #324)YN
Time Stamp Counter (RDTSC) - multiprocessor (#323, #324)YY

 

Interrupts

First Level Interrupt Handling

Interrupt (handling) Linux Windows
First-Level Interrupt Handler (FLIH) (#9, #10)ISRISR
prioritised First-Level Interrupt Handler (FLIH) (-, #122)NY
preemptive First-Level Interrupt Handler (FLIH) (-, #122)NY
interrupt priority levels (IPL) (FLIH) (#13, #14)132

 

Second Level Interrupt Handling

Second Level Interrupt Handling Linux Windows
Second-Level Interrupt Handler (SLIH) (#11, #12)softIRQ/taskletDPC
interrupt classes - "softIRQ types" (SLIH) (#163, #164)32 (4 used)-
prioritised Second-Level Interrupt Handler (SLIH) (-, #122)YY
preemptive Second-Level Interrupt Handler (SLIH) (-, #122)NY
interrupt priority levels (IPL) (SLIH) (#161, #162)13

 

Multiprocessor Interrupt

Interrupts (multiprocessor/multicore?) Linux Windows
all CPUs - First-Level Interrupt Handler (FLIH) (#512, #512)YY
all CPUs - Second-Level Interrupt Handler (SLIH) (#512 #11, #512 #11)YY

 

Interrupt Performance

Interrupt (enhancement) Linux Windows
Adaptive Interrupt Coalescing (#167, #168)YY
Interrupts (performance)
interrupt latency (average) (#155, #15610)0.011mS0.036mS10
interrupt latency (maximum) (#191, #19210)1mS45mS10

 

I/O

I/O General

I/O Management (general) Linux Windows
centred aroundinodefile object
layered I/O modelNY
generic file descriptors (pipes and network connections that act like files)YN
wake-one socket semantics (#512, #512)YY

 

Default I/O Scheduler

I/O Scheduler (default) Linux Windows
default disciplineCFQSCAN?
i.e. I/O priority basedYN

 

Alternative I/O Scheduler

I/O Scheduler (alternative) Linux Windows
alternative discipline availableYN
alternative discipline selected at bootYN
alternative discipline selected at runtimeYN
alternative discipline assignable per deviceYN
I/O Scheduler (available disciplines)
anticipatoryYN
Completely Fair Queuing (CFQ)YN
DeadlineYN
Elevator algorithm (SCAN)NY?
Elevator algorithm variants (C-SCAN, LOOK, C-LOOK, FSCAN)NN
First In, First Out (FIFO) (or First Come First Served (FCFS))NN
Highest Response Ratio Next (HRRN)NN
Last In, First Out (LIFO)NN
N-Step-SCANNN
Random Scheduling (RSS)NN
requested merge FIFO (NOOP)YN
Shortest Seek / Service Time First (SSTF) (shortest seek first)NN
Stochastic Fair Queuing (SFQ)NN

 

I/O Performance

I/O Management (performance) Linux Windows
zero-copy file sendingYY

 

Vectored I/O

I/O Management (vectored) Linux Windows
Scatter/Gather DMAYY
vectored I/O support (#501, #502)YY
asynchronous vectored I/O support (#501, #502)YY

 

Asynchronous I/O

I/O Management (asynchronous) Linux Windows
asynchronous I/O support (#502, #502)YY
asynchronous I/O support - general system (#512, #512)NY
asynchronous I/O support - system (#512, #512)AIO (or epoll)completion ports
asynchronous I/O cancellationN (Y with patch)N

 

I/O Priority

I/O Priority Linux Windows
I/O priority based on thread priority - defaultYN
I/O priority based on thread priority - optionYN
I/O priority - user control (read, write) (#43, #44)ioniceN

 

I/O Priority - read

I/O Priority - read Linux Windows
I/O timeslices (read) (#43, #44)YN
I/O bandwidth reservation (read) (#43, #44)NN
I/O priority (read) (#43, #44)YN
I/O priority - scheduling class levels (read) - realtime (IOPRIO_CLASS_RT) (#43, #44)80
I/O priority - scheduling class levels (read) - best effort (IOPRIO_CLASS_BE) (#43, #44)80
I/O priority - scheduling class levels (read) - idle (IOPRIO_CLASS_IDLE) (#43, #44)10

 

I/O Priority - write

I/O Priority - write Linux Windows
I/O timeslices (write) (#43, #44)YN
I/O bandwidth reservation (write) (#43, #44)NN
I/O priority (write) (#43, #44)NN
I/O priority - scheduling class levels (write) - realtime (IOPRIO_CLASS_RT) (#43, #44)80
I/O priority - scheduling class levels (write) - best effort (IOPRIO_CLASS_BE) (#43, #44)80
I/O priority - scheduling class levels (write) - idle (IOPRIO_CLASS_IDLE) (#43, #44)10

 

Synchronization

Light-Weight Synchronization Linux Windows
critical sections (#512, #512)YY
futexes (prioritise waits) (#512, #512)YN
interprocess (prioritise waits) (#512, #512)YN

 

Filesystem

File Limits

File (limits) Linux Windows
Block device limit16TB / 8EB?
Major/minor numbers4k/1M?

 

Filesystem caching

Filesystem (caching) Linux Windows
single global common cacheNY
i.e. Virtual File Cache - globalYY
i.e. Virtual File Cache - user cache14NY
directory lookup caching (good caching) (#512, #512)YN

 

Filesystem Mechanisms

Filesystem (mechanisms) Linux Windows
FUSEYN
LoopbackYN
automounterY (autofs 4)N (Y only network shares)
automounter (obsolete)N (autofs 3)N

 

Best-in-class Filesystem

Filesystem (best in class only) Linux Windows
safe/matureext3NTFS
general (#351, )XFSNTFS
general (new) - ZFS (#355, #356)NN
network - NFS 4 (#353, #354)YN (Y with add-on)
cross-platform file exchange - FAT32YY
cross-platform network - SMBYY

 

General Purpose Filesystem

Filesystem (general purpose) Linux Windows
ext4YN
ReiserFS (3)YN (Y readonly with freeware)
Reiser4 (4)N (Y partial as patch)N
XFSYN (Y with freeware)
NTFSN (Y partial support)Y
JFSYN
ISO 9660 (CDFS)YY
UDF - read2.0x (2.50 patch)2.0x
UDF - write2.0x (1GB limit)N (2.0x with add-on)
OCFS2YN
HFS+ (HFSX)YN
ZFSNN
NILFSN (Y with patch)N

 

Network Filesystem

Filesystem (network) Linux Windows
NFS 4YN (Y with add-on)
NFS 3YN (Y with add-on)
SMB/CIFSYY
9PYN
GFS2YN
GFSYN
InterMezzoYN
ventiNN

 

Legacy Filesystem

Filesystem (legacy) Linux Windows
FAT (32)YY
FAT (16)YY
FAT (12)YY

 

Virtual Filesystem

Filesystem (virtual) Linux Windows
configfsY-
procY-
sysfsY-
usbfsY-
tmpfsY-
devptsY-

 

Encrypted Filesystem

Filesystem (encrypted) Linux Windows
cryptographic layer - genericdm-cryptEFS
eCryptfsYN
EFS (NTFS)NY

 

Obsolete Filesystem

Filesystem (obsolete) Linux Windows
UMSDOSN (Y old kernels)-
FossilN (Y as patch)N
AFSYN
BFS (BeFS)YN
BFS (UnixWare Boot Filesystem)YN
NFS 2YN
ext2YN (Y with freeware)
minixYN
OCFSYN
QFSNN
FFS (AFFS)YN
CodaYN
XenixYN
HPFS-2YN
HPFSYN
HFSYN
sysvfsYN
adfsYN
UFS2Y (partial)N
UFSY (partial)N
EFS (SGI)YN

 

Specialist Filesystem

Filesystem (specialist) Linux Windows
FATXN (Y as patch)N
ROMFSYN
CDfs (not CDFS)N (Y with patch)N
openpromfsYN
cramfsYN
Google File System (GFS) - corporate internalN (Y unreleased patch)N

 

Miscellaneous Filesystem

Filesystem (miscellaneous) Linux Windows
debugfsYN
devfsYN
devptsYN
freevxfsYN
hostfsYN
hugetlbfsYN
jbdYN
jffsYN
jffs2YN
jfsYN
ncpfsYN
nlsYN
qnx4YN
ramfsYN
sysvYN

 

Non Filesystem - swap

Non Filesystem (swap) Linux Windows
swap filesYY
swap partitionsYN
swap formatLinuxWindows

 

Network

General Network

Network (general) Linux Windows
protocols (#55, -)
TCP buffer auto sizingYY
jumbo packetsYY
IPv4YY
auto TCP receive window resizeYN
UDP-LiteYY

 

IPv6 Network

Network (IPv6) Linux Windows
IPv6YY
Native IPv6 stackYN

 

Wireless Network

Network (wireless) Linux Windows
Wi-Fi (IEEE 802.11) A,B,G,pre-NYY
Wi-Fi encryption - WEP, WPA, WPA2YY
Wi-Fi Quality of Service WMMYY
Wi-Fi Power Save WMMYY
Bluetooth 2.0YY
OtherYY

 

Other Network

Network (other) Linux Windows
IRYY

 

Sound

Sound (system) Linux Windows
audio systemALSADirectSound
handles multiple audio streamsYY
full-duplexYY
SMP, thread-safeYY
user space software mixingYY?
user space "loopback/snoop" capabilitiesY?
driver features (in general15)OKGood
Sound (performance)
audio latency low15YN (Y with Steinberg's ASIO)
audio video sync accurate15YN

 

Virtualization

Virtualization Linux Windows
Virtualization - CPU extension support (KVM,-)YN
Virtualization (runs under VM)YY
Paravirtualization (e.g. lguest/lhype/rustyvisor)YN

 

Security

Security Model

Security (model) Linux Windows
security model - Standard Unix ModelYN
i.e. immunity from viruses (given common usage15)YN
security model - ACLN (Y SELinux21)Y
security model - POSIX ACLYY
security model - Security Modules (#401, #402)Y - LSMY - CAS
user definition - privileges, member groupsYY
security is implemented - any object manager object (files, processes...)NY
security is implemented - free from object-by-object assignmentNY

 

Memory Security

Security (memory) Linux Windows
NX YY
ASLR YN

 

Cryptography

Security (cryptography) Linux Windows
cryptography support - genericNY35
cryptography - filesystem (see Filesystem (encrypted))YY

 

Advanced Security

Security (advanced) Linux Windows
auditing supportN (Y option)Y
tampering protectionN (Y SELinux36)Y

 

Maintenance

Maintenance Linux Windows
Updates - downloadsYY
Self fix / extendYN (Y with licence)

 

Support

Support Linux Windows
Support - other users via internetYY
Support - developers via internetYN (Y with licence)
Support - companiesYY

 

 

 


 

Availability

Key2

current, non-current, future.

 

2007

Kernel Release Linux Kernel32 Linux OS32 Windows Kernel Windows OS
2007 Q42.6.23
2007 Q32.6.22NT 6.0.6001Vista Server
2007 Q22.6.21
2007 Q12.6.202.6.20.6 Foresight 1.2

2.6.20.6 GParted 0.3.4-6

CRUX 2.3

Sabayon 3.3

Ubunutu/Kubuntu Feisty Fawn 7.04,

Fedora Core 7

NT 6.0.6000

NT 5.2.3790

Vista

2003 R2 SP2

 

2006

Kernel Release Linux Kernel32 Linux OS32 Windows Kernel Windows OS
2006 Q42.6.192.6.19.5 KNOPPIX 5.2
2006 Q32.6.182.6.18.2 openSUSE 10.2

CentOS 5.0

Debian 4.0 etch

Fedora Core 6 zod,

Kanotix 2006-01-rc4

2006 Q22.6.17Red Hat RHEL5,

Ubunutu/Kubuntu 6.10 edgy,

Mandriva 2007,

Gentoo 2006.1)

2006 Q12.6.16

2.6.15

2.6.16.21 SUSE Linux Enterprise 10,

2.6.16.27 PCLinuxOS 0.93a

MEPIS 6.5

 

2005

Kernel Release Linux Kernel32 Linux OS32 Windows Kernel Windows OS
2005 Q4NT 5.2.37902003 R2

 

2004-2000

Kernel Release Linux Kernel32 Linux OS32 Windows Kernel Windows OS
2004 Q42.6.9 Red Hat RHEL4
2003 Q42.6
2003 Q2NT 5.22003)
2001 Q4NT 5.1XP)
2000 Q1NT 52000)

 

Kernel Comparisons

WhatAuthor Windows Linux Solaris FreeBSD OS XOther
This pageJohnathon Weare2003 R2 SP22.6.20
This page (see history at bottom of page) Johnathon Weare2003 R22.6.19,

2.6.18

New featuresJohnathon WeareVista Server,

Vista,

2003 R2 SP2

2.6.21

2.6.20

2.6.19,

2.6.18,

2.6.17

Better in other Kernels/OSJohnathon WeareVista2.6.20106.110.4Y
engr.smu.edu (ppt)Solomon, RussinovichXP2.6
OverviewWikipedians20032.6.x106.110.4Y
sekhon.berkeley.eduJasjeet Sekhon2.610.4
miceplans.netClayton, Talbot, Zola2.6.810.3.7
opensolaris.orgMax Bruning2.6105.3
softpanorama.orgNikolai Bezroukov2.610
2cpu.comjim@2cpu.com2.6.4, 2.4.25
freebsd.orgBruce, Stokely20002.24
webtechniques.comNathan Boeger2.24.1

(Other = OpenBSD, Plan9, openVMS, RTOS)

 

Notes

0 Most comprehensive kernel comparison - as shown by Kernel Comparisons

1 A pragmatic approach is used to compare the two kernels. Sometimes one kernel has a parallel outside of the kernel domain, or due to the fact that direct comparison is sometimes impossible or practically infeasible. An example of this is the SLOC calculations28.

2 Some of this comparison only applies to 32bit PC x86 systems.

3 this is a kernel comparison. This is not a kernel review, or kernel programming guide, and only involves non-kernel issues/OS issues when related to the kernel in at least one of the compared kernels.

4 Kernel burning edge probably more correct Kernel burnt edge as this is for the most popular production kernels, rather than burning edge kernels

5 Constant kernel ABI vs having drivers in kernel source tree is controversial. Driver authors favouring building on the constant API, and kernel authors favouring building with the flexibility of no ABI.

6 Y in W2K

7 Monolithic name is used, due to the controversy over the term "Hybrid". Essentially, the term "Hybrid" may be technically correct (by definition) but makes ambiguous the issue of kernel mode versus structure hides the fact that there are more subsystems in kernel mode than most monolithic kernels (graphics GDI/GDI+, printing etc.). Also, although the kernel may be structured in a similar way to a microkernel, it is in no way a microkernel, or contain a microkernel. It simply does no message passing due to kernel mode, just like other monolithic kernels.

8In the Linux community C++ in the kernel is seen as undesirable due to leaving too much kernel control to the compiler. An argument can be made that the size of modern kernels lend themselves better to C++, and that C++ compilers have matured. I therefore leave this as controversial.

9Graphic card support in general varies, but at least initially, most graphic cards either have basic Linux support or for instance ATI and NVIDIA provide binary only drivers.

10when there is no alternative, sometimes outdated references must be used - for older OS versions - e.g. NT, old hardware, or benchmarks done with very different criterion, or due to basic difference in OSes. In these cases, no direct comparison should be made, so the comparison is not coloured.

11no restriction on filename. By convention it is called vmlinuz or zImage, bzImage.

12image compiled without PAE support

13image compiled with PAE support

14can cause inconsistencies

15unsubstantiated claim

16estimate, based on #6 W2K 63,000 bugs in total 29million results in 0.2% . Note this is much lower than a general estimate for commercial software 2-3% (20 to 30 bugs for every 1,000 lines) #91 , which might possibly be considered as an upper bound.

17one process at maximum priority vs one at minimum priority (settable with user privileges) competing for single CPU: Linux 10ms / (200ms + 10ms) = 4.8%, Windows 10ms / (120ms + 10ms) = 7.7%

18 with Wine

19 for some comparable equivalent calls to Windows

20 both OS API and Native API

21 some distributions

22 0.7MB not counted

23 Linux priority level number goes down when priority increases / goes up when decreasing

24 tasks can act like Windows threads by sharing handle table, PID, address space

25 no drivers are included. The drivers will significantly add to the file sizes.

26estimate

27 Some aspects like graphics are not considered primarily as kernel issues in Linux, but are in Windows due to the GDI/GDI+ being inside the kernel, so are included here.

28 Also note that the SLOC calculations are based on data from incompatibly mixed sources - kernel, total OS, drivers, also with a lack of hard data on the Windows side. Also, there are two viewpoints 1. the kernel as a whole (covering all ports, and drivers) 2. a typical kernel (x86 port, typical hardware). Currently, 1. is followed (due to lack of data on 2.) but I think 2. could give more meaningful results for a comparison for real kernel usage, as opposed to theoretical kernel comparison.

29 includes GDI+

30major: Linux 2.4.0 January 2001 -> Linux 2.6 December 2003, minor: Linux 2.6.18 -> Linux 2.6.19

31major: Windows 2000 February 2000 -> Windows Server 2003 April 2003, minor: Windows Server 2003 April 2003 -> Windows Server 2003 R2 December 2005

32this is the bundled version which might be able to be updated online. Manually installing the latest Linux kernel may not be a supported configuration.

33These customized versions are separately maintained branches / folks of Linux.

34Windows CE based real-time systems have a separate CE kernel, and are not based on the NT kernel.

35Windows supports natively cryptography since 2000 edition through its Data Protection API. Linux kernel has no such support as of 2.6 version, even if plenty of cryptography packages are available for free for Linux platform. Vista improves cryptography support with Cryptography Next Generation API.

36Windows Vista has integrated tampering protection through securable objects labelling with Mandatory Integrity Control Infrastructure. Linux kernel has not such support as of 2.6 version, whilst adding a Mandatory Access Control through SELinux, grsecurity/PaX or AppArmor you have not only tampering, but also disclosure protection.

 

References

#0 This document http://widefox.pbwiki.com/Kernel%20Comparison%20Linux%20vs%20Windows Johnathon Weare

#1 monolithic kernel

#2 monolithic kernel aka "hybrid" kernel7

#3 estimate based on total SLOC28 + dependent on driver selection, X not included

#4 estimate based on total SLOC which is sourced from Gary McGraw "Building Secure Software - How to avoid security problems the right way"28 i.e. dependent on driver selection, GDI/GDI+ included

#5 0.016% defect density 2005 survey, 2004 survey, + guess 0.004% increase 2006 update Linux bugs increasing = 0.02%

#610 based on estimate16 63,000 in W2K Software Quality: Why Windows 2000 has 63,000 \"bugs\" and Linux* does not

#7 roughly - depends on options kernel, Microkernel

#8 estimate, based on newsgroup discussions Microkernel

#9 interrupts

#10 ISR, NT Lesson 8 - Interrupt and Exception Handling

#11 interrupts, I will Do It Later: Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers

#12 DPC

#13 Interrupt_handler

#14 IRQL

#15 Open source

#16 Closed source

#17 1.3MB vmlinuz from Linux 2.6.18 image on PPro/Celeron/PII/PIII/P4 Debian linux-image-2.6.18-3-686 (2.6.18-6) package

#18 >4.6MB=(2.4+0.5+1.7+?)MB , 8.0MB=4.6+(0.7+1.7+1.0)MB Windows 2003 SP1 fix Note - it is not clear which files correspond to kernel mode and user mode.

#20 NTOSKrnl.exe

#21 no known other files

#22 Windows_NT_Startup_Process, Server info

#23 no other known files

#24 Internet Explorer bug,

#25 no other known files

#26 Native API, bugfix

#27 no other known files

#28 csrss.exe

#31 kernel.org

#32 Real Time Systems with MS Windows CE, Wikipedia Win32

#41 Documentation/Changes kernel change

#43 default=(cpu_nice + 20) / 5 ioprio.txt

#44 Windows Vista: Kernel Changes - I/O, I/O, It is off to work I go...

#45 "swap daemon" is working set trimmer

#47 kernel build option

#51 user space device drivers

#52 estimate, based on #51 but reduced 10% due to larger size of Windows kernel

#55 networking

#57 see #3 - from 2.4.x study

#58 see #4

#67 Linux_2_6_17

#68 boot time flag NT kernel, but always SMP kernel?

#81 Linux

#82 Binding an Executable

#89 kernel changes

#90 Microsoft Windows

#91 survey 2004

#99 IPL

#101 Native POSIX Thread Library (NPTL)

#102 with freeware Open Source POSIX Threads for Win32

#111 PAE

#112 PAE

#113 non-standard extension

#114 Address Windowing Extensions (AWE)

#122 NT RT

#131 Thread

#132 Thread

#151 Linux scheduler

#155 evaluationengineering

#15610 36uS 1998 NT Real-Time, non-independent result 199510 23uS (mid of 17-30uS) NT RT , and NT latency

#157 user space device drivers

#161 Kernel Analysis HOWTO

#162 Advanced DPCs

#163 Linux Networking

#164 levels used

#167 Linux Networking

#168 Performance Tuning Guidelines for Microsoft Services for Network File System

#171 NPTL

#174 W2K thread scheduling

#191 997uS Montavista

#19210 NT benchmark 45027uS NT RTX realtime performance

#201 Montavista, similar to kerneltrap RT benchmark

#20210 benchmark - "few mS" taken as 2mS Michael B. Jones and John Regehr. "The Problems You're Having May Not Be the Problems You Think You're Having: Results from a Latency Study of Windows NT". In Proceedings of the 7th Workshop on Hot Topics in Operating Systems, pages 96-101, March 1999.

#203 Montavista

#20410 benchmark - as #202 16ms from "software delays up to 16ms", ignored "hardware delays up to 30ms"

#301 Linux maximum memory per process, Virtual Memory in the IA-64 Linux Kernel

#302 Running Oracle on 10g on Windows Server 2003 x64 Editions: Unlimited Scalability and Performance

#311 Demand paging

#312 Wake up...

#321 Linux: Changing The Default Hertz (2.6.13 Kernel Release change)

#322 Thread Scheduling (set by HAL not kernel)

#323 RDTSC read time stamp counter

#324 How to Use Windows* XP Power-Event Interception and Control

#331 Linux Optimization

#332 - as #322

#342 - as #322

#351 filesystem comparison

#352 crossmeta ext2, XFS, ReiserFS add-on

#401 Linux Security Modules (LSM)

#402 CAS

#411 check of the Linux source!

#412 VEH, GDI

#421 What is what in Linux 2.6.16

#42315 linux kernel monkey log

#42415 as #423

#501 Asynchronous I/O and vectored operations, API changes: interrupt handlers and vectored I/O

#502 Inside I/O Completion Ports

#512 Comparing Windows XP and Linux (PPT), and Windows vs Linux: A tale of two kernels, and TechEd 2004 - Session: Mark Russinovich \"Linux and Windows Kernel Comparison\" The original source of information, and inspiration for this page.

 

Further Reading

 

Related Issues

Security Hardened Systems

General OS Flexibility

 

Comments

 

 

 

Vertical Tab Firefox Widefox

 

Johnathon Weare © Johnny Weare 2007