27-06-2013, 04:48 PM
Linux Kernel Architecture
Linux Kernel.ppt (Size: 706.5 KB / Downloads: 103)
Analysis of Linux Kernel Architecture
Stability
Safety
Speed
Brevity
Compatability
Portability
Reusability and modifiability
Monolithic kernel vs. microkernel
Linux takes the advantages of monolithic kernel and microkernel
Resources for Tracing Linux
Source code browser
cscope
Global
LXR (Source code navigator)
Books
Understanding the Linux Kernel, D. P. Bovet and M. Cesati, O'Reilly & Associates, 2000.
Linux Core Kernel – Commentary, In-Depth Code Annotation, S. Maxwell, Coriolis Open Press, 1999.
The Linux Kernel, Version 0.8-3, D. A Rusling, 1998.
Linux Kernel Internals, 2nd edition, M. Beck et al., Addison-Wesley, 1998.
Linux Kernel, R. Card et al., John Wiley & Sons, 1998.
Memory Management Subsystem
Provides virtual memory mechanism
Overcome memory limitation
Makes the system appear to have more memory than it actually has by sharing it between competing processes as they need it.
It provides:
Large address spaces
Protection
Memory mapping
Fair physical memory allocation
Shared virtual memory
Swapping
If a process needs to bring a virtual page into physical memory and there are no free physical pages available:
Linux uses a Least Recently Used page aging technique to choose pages which might be removed from the system.
Kernel Swap Daemon (kswapd)
Page Allocation and Deallocation
Linux uses the Buddy algorithm to effectively allocate and deallocate blocks of pages.
Pages are allocated in blocks which are powers of 2 in size.
If the block of pages found is larger than requested must be broken down until there is a block of the right size.
The page deallocation codes recombine pages into large blocks of free pages whenever it can.
Whenever a block of pages is freed, the adjacent or buddy block of the same size is checked to see if it is free.