Linux Kernel 101 Sriram Sundararajan. Linux : /lee'nuhks/ or /li'nuks/, not /li:'nuhks/ n. /lee'nuhks/ or /li'nuks/, not /li:'nuhks/ n. The free Unix.

Slides:



Advertisements
Similar presentations
PC bootup Presented by: Rahul Garg (2003CS10183) Rajat Sahni (2003CS10184) Varun Gulshan(2003CS10191)
Advertisements

OS/2 Warp Chris Ashworth Cameron Davis John Weatherley.
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
Startup. Major phases  BIOS  MBR program  Boot loader (Partition boot program )  OS’s kernel Loader  CPU always starts running at x’FFFF0’=1,048,560.
1 OS Structure, Processes & Process Management. 2 Recap OS functions  Coordinator  Protection  Communication  Resource management  Service provider.
Operating Systems Parallel Systems (Now basic OS knowledge)
Day 11 Processes. Operating Systems Control Tables.
Operating Systems Parallel Systems and Threads (Soon to be basic OS knowledge)
Unix kernel Kernel refers to the core part of an operating system Historically, UNIX kernels are monolithic Newer versions of UNIX allow part of the kernel.
EET 450 Chapter 2 – How hardware and Software Work Together.
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
Introduction to Kernel
System initialisation
Operating Systems - Introduction S H Srinivasan
Chapter 6 Implementing Processes, Threads, and Resources.
The Design of Robust and Efficient Microkernel ManRiX, The Design of Robust and Efficient Microkernel Presented by: Manish Regmi
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
Processes Part I Processes & Threads* *Referred to slides by Dr. Sanjeev Setia at George Mason University Chapter 3.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Operating Systems Operating System
hardware and operating systems basics.
Linux Booting Procedure
ICOM Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark.
From UEFI Shell to Linux - UEFI Linux BootLoader Zhang Rui Software Engineer Sep 28 th 2011.
IST 222 Introduction to Operating Systems Fall, 2004.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Laface Operating System Design Booting a PC to run a kernel from Low memory VGA display.
Making MINT64OS Chan Seok Kang 2013/01/21. 2Computer Systems and Platforms Lab Content Introduction My Approach Encountered Problem Conclusion & Future.
Operating Systems 1 K. Salah Module 2.0: Processes Process Concept Trace of Processes Process Context Context Switching Threads –ULT –KLT.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
SAPC Hardware Pentium CPU (or 486) 4M usable memory no hard disk; boot from floppy no keyboard or monitor or mouse COM2 serial port: used for console i/o.
© 2004, D. J. Foreman 1 Implementing Processes and Threads.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
Bootstrapping Steve Muckle Dave Eckhardt. Carnegie Mellon University1 Synchronization Project 3 checkpoint 1 Bboard post, web page Paging, COW optional.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Genesis: From Raw Hardware to Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
Copyright © Genetic Computer School 2008 Computer Systems Architecture SA 8- 0 Lesson 8 Secondary Management.
10. Epilogue ENGI 3655 Lab Sessions.  We took control of the computer as early as possible, right after the end of the BIOS  Our multi-stage bootloader.
IT Essentials 1 v3 Module 4 JEOPARDY IT Essentials 1 RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Linux Boot Process on the Raspberry Pi 2 1 David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis,
OS Boot Sequence and File System (implication to “Boot Sector Viruses”) Department of Computer Science Southern Illinois University Edwardsville Spring,
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Overview A) Power on or reset B) 1st stage boot loader C) 2nd stage boot loader D) Operate system.
Introduction to Operating Systems Concepts
Operating System & Application Software
Introduction to Kernel
Introduction to Operating Systems
An Introduction to Operating Systems
CS 6560: Operating Systems Design
KERNEL ARCHITECTURE.
Chapter 4: Threads.
Introduction to Operating Systems
SAPC Hardware Pentium CPU (or 486) 4M usable memory
Genesis: From Raw Hardware to Processes
Computer Startup.
Implementing Processes, Threads, and Resources
CS533 Concepts of Operating Systems Class 6
CSE 153 Design of Operating Systems Winter 2019
OS Boot Sequence and File System
Chapter 1: Introduction CSS503 Systems Programming
OS Boot Sequence and File System
Lecture 10 review Booting sequence in Brief
Presentation transcript:

Linux Kernel 101 Sriram Sundararajan

Linux : /lee'nuhks/ or /li'nuks/, not /li:'nuhks/ n. /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. 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 Copious Documentation Free Source Free Source Fully Customizable Fully Customizable All you need is a MB All you need is a MB Powerful Powerful

Contd…. Great technical Support Great technical Support POSIX compliant POSIX compliant And It’s a Great OS anyways 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. 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 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…. Ok I know that you all know what it is…. Fundamental abstraction Fundamental abstraction Process/kernel model Process/kernel model

Linux Vs.*nix Monolithic Kernel Monolithic Kernel Support for modules Support for modules Kernel Threading Kernel Threading Multithreaded application support Multithreaded application support

Contd… Nonpreemptive kernel Nonpreemptive kernel Multiprocessor Support Multiprocessor Support File System File System STREAMS I/O STREAMS I/O

On Kernels Mono and Micro… Linux Linux Solaris Solaris AIX AIX BSD BSD System V System V SCO SCO Mach Minix …. ???

The Bootstrap BIOS BIOS Boot Loader Boot Loader Floppy / Hard Disk Floppy / Hard Disk setup( ) setup( ) startup_32( ) startup_32( ) start_kernel( ) start_kernel( )

BIOS Test Hardware (POST) Test Hardware (POST) Initialize Hardware Initialize Hardware Boot from FDD/CD/HDD Boot from FDD/CD/HDD Copy sector 1 to 7c00 Copy sector 1 to 7c00

Boot Loader Floppy Floppy bootsect.S bootsect.S Move to Move to Setup real mode stack from ff4 Setup real mode stack from ff4 Display “Loading…” Display “Loading…” Load setup( ) to Load setup( ) to Load rest of kernel and jump to setup( ) 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 Load rest of kernel and jump to setup( )

setup( ) Initialize a load of Hardware devices Initialize a load of Hardware devices Adjust kernel image (low to high) Adjust kernel image (low to high) Reprograms PIC Reprograms PIC Switches CPU from real to protected mode Switches CPU from real to protected mode Jumps to startup_32( ) Jumps to startup_32( )

startup_32( ) Actually there are two of these Actually there are two of these  Initializes the segment registers and stack  Fills the uninitialized data area  Invokes decompress_kernel( )  Jump to

Contd.. The other startup_32( ) 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…. 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 Memory Management

References Understanding the Linux Kernel Understanding the Linux Kernel Linux Resource Exchange Operating Systems comparison nux/OS_comparison.html Linux Resource Exchange Operating Systems comparison nux/OS_comparison.html nux/OS_comparison.html nux/OS_comparison.html The Jargon File html The Jargon File html html html