1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.

Slides:



Advertisements
Similar presentations
Drivers and the kernel1-1 Drivers and the kernel UNIX system has three layers: m The hardware m The operating system kernel m The user-level programs Kernel.
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation.
Operating System Structure
Operating-System Structures
Linux+ Guide to Linux Certification, Second Edition
Chapter Nine NetWare-Based Networking. Objectives Identify the advantages of using the NetWare network operating system Describe NetWare’s server hardware.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Xuan Guo Chapter 1 What is UNIX? Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003 Original Notes.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
LECTURE 14 Operating Systems and Utility Programs
The Operating System The operation system (OS) is a set of programs that coordinates: Hardware functions Interaction between application software and computer.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
Component 4: Introduction to Information and Computer Science Unit 4: Application and System Software 1 Health IT Workforce Curriculum Version 1.0/Fall.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel.
Hands-On Virtual Computing
CIS 191 – Lesson 2 System Administration. CIS 191 – Lesson 2 System Architecture Component Architecture –The OS provides the simple components from which.
University of Management & Technology 1 Operating Systems & Utility Programs.
Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Chapter 8: Operating Systems and Utility Programs Catherine Gifford Dan Falgares.
Chapter Nine NetWare-Based Networking. Introduction to NetWare In 1983, Novell introduced its NetWare network operating system Versions 3.1 and 3.1—collectively.
09/21/081 Ho Chi Minh city University of Technology Linux kernel R.M. Introduction of building Linux kernel from source.
Troubleshooting and Performance
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Issues Autonomic operation (fault tolerance) Minimize interference to applications Hardware support for new operating systems Resource management (global.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
An Introduction to Device Drivers Ted Baker  Andy Wang COP 5641 / CIS 4930.
Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Sep. 25, 2015.
UNIX Unit 1- Architecture of Unix - By Pratima.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
OS Project 0 February 25, Outline  Linux Installation  Linux Kernel Compilation  System Call Development  Kernel Modules / 452.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
CSCI 330 UNIX and Network Programming Unit XX: Linux Administration.
LOGO Linux Installation. Linux Distribution Including shells, libraries, tools, compiler, servers, applications. Redhat, Fedora, Mandrake, SuSE, Debian,
Linux Operations and Administration
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
The Linux Operating System R.Bigelow. What is an Operating System An operating system is a collection of programs that manage a computer's resources.
Kernel Modules – Introduction CSC/ECE 573, Sections 001 Fall, 2012.
Embedded Software Design Week II Linux Intro Linux Kernel.
CITA 171 Section 1 DOS/Windows Introduction. DOS Disk operating system (DOS) –Term most often associated with MS-DOS –Single-tasking operating system.
Systems Software / The Operating System CSC October 14, 2010.
Operating System Kernel Compilation
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 20, 2016.
Operating System Structure
LINUX WINDOWS Vs..
Linux Kernel Module Programming
Drivers and the kernel UNIX system has three layers: Kernel
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 19, 2017.
Introduction to the Kernel and Device Drivers
Operating System Kernel Compilation
An Introduction to Device Drivers
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 21, 2018.
Chapter 2: The Linux System Part 1
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Kernel Structure and Infrastructure
COP 4343 Unix System Administration
CS 6560 Operating System Design
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Outline Operating System Organization Operating System Examples
Operating System Kernel Compilation
Presentation transcript:

1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the hardware. The kernel has many jobs. The essence of its job is to provide a running environment for application software. The environment has to handle issues such as networking, disk access, virtual memory and multitasking. Although the kernel is a small part of the complete linux system, it is by far the most critical element. If the kernel fails, the rest of system goes with it.

2 Linux Kernel The kernel is responsible for: –CPU resource scheduling –Process management –Signals and semaphores –Virtual memory (swapping, paging, and mapping) –Filesystem –Interprocess communication

3 Kernel The SA is able to directly customize a kernel. Some of the reasons for doing this might be: –The system hardware has been modified by adding devices, memory and processors etc. –Memory usage needs to be optimized –The speed and performance of the system may need improvement The actual kernel size varies from machine to machine, depending on what features are compiled onto it, what modifications you have made to the kernel data structures and what additions you have made to the code.

4 Example of Some Sample Tunable Kernel Parameters /etc/sysctl.conf

5 Finding and unpacking the kernel source code The distribution of Linux should have the source code to that specific kernel. Otherwise, the source code can be obtained from the vendor. Traditionally, the kernel source is located at /usr/src. Before you unpack a new source tree, you should always save and rename the current one. In /usr/src, there should be a directory named linux, which contains the current source tree. Most distributions do not install the entire source tree by default. Only the necessary files for development are installed. The safest path to upgrading is to rename the existing tree with a suffix indicating its associated version number.

6 Libraries Commands Device Driver The UNIX Architecture Interactive User Application Programs Application Programs OS System Call Interface Device Driver Driver Interface … Monolithic Kernel Module Process Management Memory Management File Management Device Mgmt Infrastructure Trap Table …

7 Building the Kernel Building the kernel allows the user to thin down the feature list so that UNIX can run on less-powerful systems, with the same performance. Building the kernel requires configuring and compiling. If you have windows running, this process would be simpler, because it can be menu driven.

8 Modules When configuring, there is a choice of making modules. As a systems administrator, there are situations where a kernel feature is necessary for a short period of time. With the module system, it allows parts of the kernel, called modules, to be dynamically loaded and unloaded from the kernel as needed. Features often not used can thus be enabled but won’t waste memory when they aren’t being used. The kernel automatically determines what to load and when.

Prerequisites linux-source (latest release of Ubuntu kernel code) build-essential (packages required to compile the code) fakeroot (kernel specific) kernel-package (kernel specific) ncurses-dev (use make menuconfig) libglade2-dev (use make gconfig} module-assistant, debhelper (to create modules) 9

Download and install the kernel source code using aptitude sudo aptitude update sudo aptitude install linux-source ls –l /usr/src/linux-source* cd /usr/src tar –xjf linux-source tar.bz2 sudo aptitude install git-core cd /usr/src/linux-source make menuconfig 10

Customizing the Kernel Under /usr/src/linux-source-***: make menuconfig Check the hidden.config file 11

Compiling/Installing a kernel image file and loadable modules make-kpkg–rootcmd fakeroot kernel-image –man make-kpkg –Compile the kernel /var/cache/apt/archives/linux-image-***deb sudo dpkg –i linux-image*.deb: –Install the kernel 12

Search the package aptitude search source$ –To display a list of available *-source packages –Source$ ensures that the string matches only the last part of a package name 13

Downloading, compiling, and installing nonstandard modules module-assistant –text-mode auto-install line6- usb-source –Module-assistant utility calls sudo to run apt-get and dpkg 14

Load a module After a module is installed with module-assistant, it must be loaded to make it available to the kernel depmod: works with dependencies for modules insmod: loads modules in a running kernel –insmod /lib/modules/ */kernel/drivers/block/floppy.ko lsmod: lists information about all loaded modules modinfo: list information about a module 15

Load a module modprobe: loads, unloads, and repots on modules rmmod: unloads a module from a running kernel 16