tanisha-patrick
Uploaded by
8 SLIDES
212 VUES
80LIKES

Advanced Systems Programming: Exploring Linux Kernel Modules and C/C++

DESCRIPTION

This advanced course in systems programming focuses on utilizing the computer to study its own architecture, specifically through the lens of Linux kernel modules. Students will write applications in C/C++, leveraging standard runtime libraries and system calls to interact with the kernel. The course covers writing loadable kernel modules, which enable direct control over peripherals and modifications to kernel scheduling algorithms. Prerequisites include familiarity with C/C++, Linux/UNIX, and a basic understanding of x86 architecture. Recommended texts enhance the learning experience.

1 / 8

Télécharger la présentation

Advanced Systems Programming: Exploring Linux Kernel Modules and C/C++

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Science 635 Advanced Systems Programming Fall 2007 Professor Allan Cruse

  2. Course’s theme is… “Using the computer to study the computer”

  3. Normal C/C++ programming We would write most of this source-code “app.cpp” but we would call some library-functions e.g., open(), read(), write(), malloc(), … then our code would get ‘linked’ with standard runtime libraries (So this is an example of “code reuse”) application call ret standard “runtime” libraries

  4. Normal C/C++ programming Many standard library functions perform services that require executing privileged instructions (which only the kernel can do) application call Operating System kernel ret syscall standard “runtime” libraries sysret user space kernel space

  5. Linux Kernel Modules Linux allows us to write our own installable kernel modules and add them to a running system application module call ret call Operating System kernel ret syscall standard “runtime” libraries sysret user space kernel space

  6. Requirements/Benefits • An LKM has to be written using “C” -- but can include “inline” assembly language • An LKM runs in kernel-space – so it can do anything that the CPU supports • So an LKM can – • directly control the peripheral devices • modify the kernel’s scheduling algorithms • examine the kernel’s hidden data-structures

  7. Course prerequisites • Be a CS Graduate Student • Be familiar with using Linux (or UNIX) • Be able to write programs in C (or C++) • Be able to use an assembler • Be acquainted with x86 architecture • General-purpose registers (EAX, EBX, …) • Categories of instructions (MOV, ADD, …) • Ways to address memory (direct, indirect,…)

  8. Recommended texts Corbet, Rubini, and Kroah-Hartman, Linux Device Drivers (3rd Ed), O’Reilly (2005), ISBN 0-596-00590-3 Bovet and Cesati, Understanding the Linux Kernel (3rd Ed), O’Reilly (2006), ISBN 0-598-00565-2

More Related