28-03-2011, 11:46 AM
[attachment=11146]
Linus and Linux
In 1991 Linus Torvalds took a college computer science course that used the Minix operating system
Minix is a “toy” UNIX-like OS written by Andrew Tanenbaum as a learning workbench
Linus wanted to make MINIX more usable, but Tanenbaum wanted to keep it ultra-simple
Linus went in his own direction and began working on Linux
In October 1991 he announced Linux v0.02
In March 1994 he released Linux v1.0
Windows and Linux
Both Linux and Windows are based on foundations developed in the mid-1970s
Comparing the Architectures
Both Linux and Windows are monolithic
All core operating system services run in a shared address space in kernel-mode
All core operating system services are part of a single module
Linux: vmlinuz
Windows: ntoskrnl.exe
Windowing is handled differently:
Windows has a kernel-mode Windowing subsystem
Linux has a user-mode X-Windowing system
Linux Kernel
Linux is a monolithic but modular system
All kernel subsystems form a single piece of code with no protection between them
Modularity is supported in two ways:
Compile-time options
Most kernel components can be built as a dynamically loadable kernel module (DLKM)
DLKMs
Built separately from the main kernel
Loaded into the kernel at runtime and on demand (infrequently used components take up kernel memory only when needed)
Kernel modules can be upgraded incrementally
Support for minimal kernels that automatically adapt to the machine and load only those kernel components that are used
Windows Kernel
Windows is a monolithic but modular system
No protection among pieces of kernel code and drivers
Support for Modularity is somewhat weak:
Windows Drivers allow for dynamic extension of kernel functionality
Windows XP Embedded has special tools / packaging rules that allow coarse-grained configuration of the OS
Windows Drivers are dynamically loadable kernel modules
Significant amount of code run as drivers (including network stacks such as TCP/IP and many services)
Built independently from the kernel
Can be loaded on-demand
Dependencies among drivers can be specified
Comparing Portability
Both Linux and Windows kernels are portable
Mainly written in C
Have been ported to a range of processor architectures
Windows
i486, MIPS, PowerPC, Alpha, IA-64, x86-64
Only x86-64 and IA-64 currently supported
> 64MB memory required
Linux
Alpha, ARM, ARM26, CRIS, H8300, i386, IA-64, M68000, MIPS, PA-RISC, PowerPC, S/390, SuperH, SPARC, VAX, v850, x86-64
DLKMs allow for minimal kernels for microcontrollers
> 4MB memory required
Comparing Layering, APIs, Complexity
Windows
Kernel exports about 250 system calls (accessed via ntdll.dll)
Layered Windows/POSIX subsystems
Rich Windows API (17 500 functions on top of native APIs)
Linux
Kernel supports about 200 different system calls
Layered BSD, Unix Sys V, POSIX shared system libraries
Compact APIs (1742 functions in Single Unix Specification Version 3; not including X Window APIs)