Kernel Modules – Introduction CSC/ECE 573, Sections 001 Fall, 2012.

Slides:



Advertisements
Similar presentations
Computer System Laboratory
Advertisements

OPERATING SYSTEM An operating system is a group of computer programs that coordinates all the activities among computer hardware devices. It is the first.
Mr. D. J. Patel, AITS, Rajkot 1 Operating Systems, by Dhananjay Dhamdhere1 Static and Dynamic Memory Allocation Memory allocation is an aspect of a more.
Chap 2 System Structures.
Operating-System Structures
CSCI 530 Lab Firewalls. Overview Firewalls Capabilities Limitations What are we limiting with a firewall? General Network Security Strategies Packet Filtering.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Operating Systems: Software in the Background
Introduction to Kernel
Embedded System Programming Introduction to Device Drivers.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Common System Components
Chapter 5 Input/Output I/O Hardware I/O Software Software Layers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights.
Self Stabilizing Distributed File System Implementing a VFS Module.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Word Processing, Web Browsing, File Access, etc. Windows Operating System (Kernel) Window (GUI) Platform Dependent Code Virtual Memory “Swap” Block Data.
An Introduction to Device Drivers Sarah Diesburg COP 5641 / CIS 4930.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
GBT Interface Card for a Linux Computer Carson Teale 1.
The Linux /proc Filesystem CSE8343 – Fall 2001 Group A1 – Alex MacFarlane, Garrick Williamson, Brad Crabtree.
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.
Firmware Storage : Technical Overview Copyright © Intel Corporation Intel Corporation Software and Services Group.
1.4 Open source implement. Open source implement Open vs. Closed Software Architecture in Linux Systems Linux Kernel Clients and Daemon Servers Interface.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Chapter 1 : The Linux System Part 1 Lecture 1 10/21/
5 SYSTEM SOFTWARE CHAPTER
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
Processes Introduction to Operating Systems: Module 3.
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
1.4 Open source implement. Open source implement Open vs. Closed Software Architecture in Linux Systems Linux Kernel Clients and Daemon Servers Interface.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
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.
Copyright © Genetic Computer School 2008 Computer Systems Architecture SA 8- 0 Lesson 8 Secondary Management.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Virtual Machines Mr. Monil Adhikari. Agenda Introduction Classes of Virtual Machines System Virtual Machines Process Virtual Machines.
Reverse Engineered Architecture of the Linux Kernel Kristof De Vos.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CSNB334 Advanced Operating Systems 3. Kernel Structure and Organization Lecturer: Abdul Rahim Ahmad.
System Components Operating System Services System Calls.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Tgt: Framework Target Drivers FUJITA Tomonori NTT Cyber Solutions Laboratories Mike Christie Red Hat, Inc Ottawa Linux.
Introduction to Operating Systems Concepts
Introduction to Kernel
Kernel Design & Implementation
Linux Kernel Module Programming
Von Neumann model - Memory
KERNEL ARCHITECTURE.
Introduction to the Kernel and Device Drivers
Chapter 2: The Linux System Part 2
Von Neumann model - Memory
Chapter 2: Operating-System Structures
Operating Systems Lecture 3.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 2: Operating-System Structures
Operating System Concepts
Presentation transcript:

Kernel Modules – Introduction CSC/ECE 573, Sections 001 Fall, 2012

Kernel The “Operating System” System of software that – Sits between hardware and application programs – Provides necessary abstractions – Mediated by system calls Process management Memory management File Systems Device drivers Network (drivers and protocols)

Why Kernel? Networking “subsystem” originally implemented as user-space – Code easy to examine and change Later, as part of kernel – Not just device drivers, but protocols as well – Experimentation with common protocols require kernel access – Even if only “probing” or “reading off” Kernel problems – Keeps moving – Device dependent

Communicating with Kernel Kernel programs run in separate (and unique) address space – Cannot be swapped out – Does not overlap user space address spaces All kernel programs share address space – Mistakes typically causes kernel to crash – VMs ideal in experimenting with kernel programming /proc filesystem is an elegant interface in UNIX – Dynamically generated files – User-space communication with kernel programs

Kernel Modules Linux uses kernel modules – Dynamically load and unload – flexibility – Shares address space – still monolithic – Can be completely new code, and “observer” Linux commands insmod, rmmod, lsmod etc. Callback functions – Initialization and exit – Any other functions Device open or close, for device drivers – Register functions for callback conditions

Hooks for Callback Linux provides netfilter that includes “hooks” that callback code can register for Can register kernel modules at hooks – Can pop functionality out to user space, but more efficient in kernel space

Packet Processing Packets injected into kernel (from device or from user space) stored in special structures Copying eliminated inside kernel – various kernel operations all operate on this structure General framework for packet processing – transcends specific protocol stack, specific protocol data formats

Packet Storage

Summary In Linux, particularly easy to investigate and experiment with network protocols, or build new protocols Powerful enough that real advanced application building is possible