190 likes | 303 Vues
Delve into the fascinating world of the Linux kernel, a free and open-source Unix-like operating system developed by Linus Torvalds and a community of contributors since 1991. This guide will cover essential topics such as its powerful architecture, monolithic kernel design, multitasking support, boot processes, and much more. Discover the benefits of Linux, including customization, strong community support, and its robust capabilities compared to commercial alternatives. Join the Linux community and unlock the full potential of this incredible operating system.
E N D
Linux Kernel 101 Sriram Sundararajan
Linux : • /lee'nuhks/ or /li'nuks/, not /li:'nuhks/ n. • The free Unix workalike created by Linus Torvalds and friends starting about 1991 – The Jargon File Resources , compiled by ESR et al.
Why Linux? • Copious Documentation • Free Source • Fully Customizable • All you need is a 386 + 4MB • Powerful
Contd…. • Great technical Support • POSIX compliant • And It’s a Great OS anyways
Dig This • Linux and other OSS advocates are making a progressively more credible argument that OSS software is at least as robust -- if not more -- than commercial alternatives. -- Halloween Docs.
Linus on Linux • The power of Linux is as much about the community of cooperation behind it as the code itself.
The Process • Ok I know that you all know what it is…. • Fundamental abstraction • Process/kernel model
Linux Vs.*nix • Monolithic Kernel • Support for modules • Kernel Threading • Multithreaded application support
Contd… • Nonpreemptive kernel • Multiprocessor Support • File System • STREAMS I/O
Linux Solaris AIX BSD System V SCO Mach Minix …. ??? On Kernels Mono and Micro…
The Bootstrap • BIOS • Boot Loader • Floppy / Hard Disk • setup( ) • startup_32( ) • start_kernel( )
BIOS • Test Hardware (POST) • Initialize Hardware • Boot from FDD/CD/HDD • Copy sector 1 to 7c00
Floppy bootsect.S Move to 0009 0000 Setup real mode stack from 0000 3ff4 Display “Loading…” Load setup( ) to 90200 Load rest of kernel and jump to setup( ) Hard disk MBR Move to 0009 a000 Setup real mode stack from 9b000 to 9a200 Display “Loading…” Load setup( ) to 90200 Load rest of kernel and jump to setup( ) Boot Loader
setup( ) • Initialize a load of Hardware devices • Adjust kernel image (low to high) • Reprograms PIC • Switches CPU from real to protected mode • Jumps to startup_32( )
startup_32( ) • Actually there are two of these • Initializes the segment registers and stack • Fills the uninitialized data area • Invokes decompress_kernel( ) • Jump to 0010 0000
Contd.. • The other startup_32( ) • Init segment regs with final values • Setup stack for process 0 • Invokes setup_idt( ) • Identifies processor model • Loads GDT and IDT • Jump to start_kernel( )
start_kernel( ) • Finally…. • Initialize page tables • Initialize page descriptors • Final initialization of IDT • Initialize Slab allocator • Initialize system date and time • Create thread for Process 1
Next… • Memory Management
References • Understanding the Linux Kernel • Linux Resource Exchange Operating Systems comparison http://www.falconweb.com/~linuxrx/WS_Linux/OS_comparison.html • The Jargon File http://www.tuxedo.org/~esr/jargon/quoting.html