Introduction to the Linux Kernel

Slides:



Advertisements
Similar presentations
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Advertisements

國立台灣大學 資訊工程學系 Chapter 4: Threads. 資工系網媒所 NEWS 實驗室 Objectives To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Operating Systems Parallel Systems and Threads (Soon to be basic OS knowledge)
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Protection and the Kernel: Mode, Space, and Context.
國立台灣大學 資訊工程學系 Chapter 4: Threads. 資工系網媒所 NEWS 實驗室 Objectives To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
Operating Systems. Definition An operating system is a collection of programs that manage the resources of the system, and provides a interface between.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
Scott Ferguson Section 1
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
UNIX Unit 1- Architecture of Unix - By Pratima.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
Page 1 2P13 Week 1. Page 2 Page 3 Page 4 Page 5.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Introduction to the Linux Kernel 國立中正大學 資訊工程研究所 羅習五 老師.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Introduction to Operating Systems Concepts
Computer System Structures
CS 3214 Computer Systems Lecture 9 Godmar Back.
Current Generation Hypervisor Type 1 Type 2.
Operating Systems CMPSC 473
Memory Protection: Kernel and User Address Spaces
CS 6560: Operating Systems Design
OPERATING SYSTEMS CS3502 Fall 2017
Process Scheduling 國立中正大學 資訊工程研究所 羅習五 老師.
Chapter 4: Threads 羅習五.
CS490 Windows Internals Quiz 2 09/27/2013.
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Chapter 4: Threads.
Threads, SMP, and Microkernels
Chapter 2: The Linux System Part 2
Chapter 2: The Linux System Part 1
CGS 3763 Operating Systems Concepts Spring 2013
Mid Term review CSC345.
Chapter 2: The Linux System Part 3
Lecture 4- Threads, SMP, and Microkernels
Introduction to Operating Systems
Threads Chapter 4.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Computer System Structures
CS510 Operating System Foundations
System Calls System calls are the user API to the OS
Chapter 2 Operating System Overview
Memory Protection: Kernel and User Address Spaces
Lecture Topics: 11/1 Hand back midterms
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Introduction to the Linux Kernel 國立中正大學 資訊工程研究所 羅習五 老師

GNU/Linux One of Linux's most interesting features is that it is not a commercial product The basics of a Linux system are the kernel, C library, compiler, toolchain, and basic system utilities, such as a login process and shell. Strictly speaking, after all, the term Linux refers to only the kernel.

Kernel components Typical components of a kernel are interrupt handlers to service interrupt requests, a scheduler to share processor time among multiple processes, a memory management system to manage process address spaces, and system services such as networking and interprocess communication (IPC).

Kernel mode and kernel space The kernel includes a protected memory space and full access to the hardware. This system state and memory space is collectively referred to as kernel-space A user process executes in User-space kernel-space

Function calls and OS Eventually call a system call eventually calls write() to write the data to the console Always call a system call some library calls have a one-to-one relationship with the kernel. Other C library functions such as strcpy(), should (you hope) make no use of the kernel at all.

Devices and OS When hardware wants to communicate with the system, it issues an interrupt that asynchronously interrupts the kernel. Interrupts are identified by a number. The number is used to identify a interrupt handler Linux’s interrupt handlers do not run in a process context. Instead, they run in a special interrupt context that is not associated with any process.

The modes a CPU executes in In kernel-space, in process context, executing on behalf of a specific process In kernel-space, in interrupt context, not associated with a process, handling an interrupt In user-space, executing user code in a process

The modes a CPU executes in User space Process context Kernel space (including bottom half) Top halve ISR CTX

Linux Versus Classic Unix Kernels Linux supports the dynamic loading of kernel modules. Linux has symmetrical multiprocessor (SMP) support. Including UMA and NUMA The Linux kernel is preemptive Linux does not differentiate between threads and processes. by invoking “clone()”

Note: A preemptive kernel A preemptive OS initiate a context switch when the OS switch to user mode. A preemptive kernel can also initiate a context switch in kernel mode to satisfy the scheduling policy'

Linux Kernel Versions

Before We Begin This book is about the Linux kernel: how it works, why it works, and why you should care. Do make a Linux kernel Understand menu items listed in “make menuconfig” Read documents in /“linux-src”/Documentation Enjoy your Linux life

Note: Something we have to know and have to try Kernel hacking and others Kernel debugging and others