Linux Vs Windows
Linux Vs Windows
Linux
Linux was originally built by Linus Torvalds at the University of Helsinki in 1991. Linux is a Unix-like, Kernel-based, fully memoryprotected, multitasking operating system. It runs on a wide range of hardware from PCs to Macs.
Windows
First version of Windows Windows 3.1 was released in 1992 by Microsoft. Windows is a GUI based operating system. It has powerful networking capabilities, is multitasking, and extremely user friendly.
Reliability
OS it must not crash, even under extreme loads. OS should process requests even if the operating system or hardware fails.
Windows seems to be less stable even though the latest versions of Windows 2000 and XP are far more improved than the incredibly buggy Windows 95 .
Comparing Architectures
Processes and scheduling Memory management I/O
File Caching
Security
Process Management
Windows Process
Address space, handle table, statistics and at least one thread. No inherent parent/child relationship.
Threads
Basic scheduling unit. Fibers - cooperative usermode threads.
Threads
No threads per-se. Tasks can act like Windows threads by sharing handle table, PID and address space. PThreads cooperative user-mode threads
Scheduling Priorities
Windows Two scheduling classes
Real time (fixed) priority 16-31 Dynamic - priority 1-15
31
Fixed
16 15 Dynamic I/O
Windows
7
Scheduling Priorities
Windows Two scheduling classes
Real time (fixed) priority 16-31 Dynamic - priority 1-15
The Windows API function SetThreadPriority() sets the priority value for a specified thread
This value, together with the priority class of the thread's process, determines the thread's base priority level Windows will dynamically adjust priorities for non-realtime threads
10
Memory Management
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze
I/O Management
Windows
Centered around the file object Layered driver architecture throughout driver types Most I/O supports asynchronous operation Internal interrupt request level (IRQL) controls interruptability Interrupts are split between an Interrupt Service Routine (ISR) and a Deferred Procedure Call (DPC) Supports plug-and-play
Linux Centered around the vnode No layered I/O model Most I/O is synchronous
Only sockets and direct disk I/O support asynchronous I/O
Internal interrupt request level (IRQL) controls interruptability Interrupts are split between an ISR and soft IRQ or tasklet Supports plug-and-play
IRQL Masked
12
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze
File Caching
Windows
Single global common cache Virtual file cache
Caching is at file vs. disk block level Files are memory mapped into kernel memory
Linux
Single global common cache Virtual file cache
Caching is at file vs. disk block level Files are memory mapped into kernel memory
File Cache
File Cache
Disk Driver
Disk Driver
14
I/O Processing
Linux 2.2 had the notion of bottom halves (BH) for lowpriority interrupt processing
Fixed number of BHs Only one BH of a given type could be active on a SMP
Linux 2.4 introduced tasklets, which are non-preemptible procedures called with interrupts enabled Tasklets are the equivalent of Windows Deferred Procedure Calls (DPCs)
15
Security
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze
Security
Windows
Not much safe. Users are defined with
Privileges Member groups
Linux
Security here is high Users are defined with:
Capabilities (privileges)
Member groups
17
THANK YOU!!!!
18