Linux Application Programming

 

Part I: Introduction

 

Session 1 U/Linux History

  • UNIX History
  • Richard Stallman and the GNU Movement
  • Linus Torvalds and the Linux Kernel

 

Session 2 GNU/Linux Architecture

  • High-Level Architecture
  • Architectural Breakdown of Major Kernel Components

 

Part II: GNU Tools

 

 

Session 3 The GNU Compiler Toolchain

  • A Review of the Compilation Process
  • Introduction to Common GCC Patterns
  • Using the GCC Optimizer
  • Using the GCC Warning Options
  • Architectural Specification to GCC
  • Related Tools Such as size and objdump

 

Session 4 Building Software with GNU make

  • Compiling C
  • Basic Makefile
  • Makefile Constructs
  • Dependency Tracking

 

Session 5 Building and Using Libraries

  • Introduction to Libraries
  • Building and Using Static Libraries
  • Building and Using Shared Libraries
  • Building and Using Dynamic Libraries
  • GNU/Linux Library Commands

 

Session 6 Coverage Testing with GNU gcov

  • Understanding GNU s gcov Tool
  • Explore the Different Uses for gcov
  • Build Software for gcov
  • Understand gcov s Various Data Products
  • Illustrate Problems with gcov and Optimization

 

Session 7 Profiling with GNU gprof

  • An Introduction to Performance Profiling
  • An Introduction to the GNU gprof Profiler Utility
  • Preparing an Image for Use with gprof
  • Discussing the Data Products Provided by gprof
  • Exploring Some of the Most Important gprof Utility Options

 

Part III - Application Development Topics

 

Session 8 File Handling in GNU/Linux

  • Understand File Handling APIs in GNU/Linux
  • Explore the Character Access Mechanisms
  • Explore the String Access Mechanisms
  • Investigate Both Sequential and Nonsequential (Random Access) Methods
  • Review Alternate APIs and Methods for File Access

 

Session 9 Programming with Pipes

  • Review of the Pipe Model of IPC
  • Differences Between (Anonymous) Pipes and Named Pipes
  • Creating Anonymous and Named Pipes
  • Communicating Through Pipes
  • Command-line Creation and Use of Pipes

 

Session 10 Introduction to Sockets Programming

  • Understand the Sockets Programming Paradigm
  • Learn the BSD4.4 Sockets API
  • See Sample Source for a TCP/IP Server and Client
  • Explore the Various Capabilities of Sockets (Control, I/O, Notification)
  • Investigate Socket Patterns that Illustrate Sockets API Use
  • Examine Sockets Programming in Other Languages

 

Session 11 GNU/Linux Process Model

  • Creating Processes with fork()
  • Review of Process- related API Functions
  • Raising and Catching Signals
  • Available Signals and Their Uses
  • GNU/Linux Process-related Commands

 

Session 12 POSIX Threads (Pthreads) Programming

  • Threads and Processes
  • Creating Threads
  • Synchronizing Threads
  • Communicating Between Threads
  • POSIX Signals API
  • Threaded Application Development Topics

 

Session 13 IPC with Message Queues

  • Introduction to Message Queues
  • Creating and Configuring Message Queues
  • Creating Messages Suitable for Message Queues
  • Sending and Receiving Messages
  • Adjusting Message Queue Behavior
  • The ipcs Utility

 

Session 14 Synchronization with Semaphores

  • Introduction to GNU/Linux Semaphores
  • Discussion of Binary and Counting Semaphores
  • Creating and Configuring Semaphores
  • Acquiring and Releasing Semaphores
  • Single Semaphores or Semaphore Arrays
  • The ipcs and ipcrm Utilities for Semaphores

 

Session 15 Shared Memory Programming

  • Introduction to Shared Memory
  • Creating and Configuring Shared Memory Segments
  • Using and Protecting Shared Memory Segments
  • Locking and Unlocking Shared Segments
  • Using the ipcs and ipcrm Utilities

 

Part IV - GNU/Linux Shells and Scripting

 

Session 16 Bourne-Again Shell (bash)

  • An Introduction to Bash Scripting
  • Scripting versus Interactive Shell Use
  • User Variables and Environmental Variables
  • Arithmetic in Bash
  • Tests, Conditionals, and Loops in Bash
  • Script Input and Output
  • Dissecting of Useful Scripts

 

Session 17 Editing with sed

  • Quick Introduction to sed
  • Discussion of sed Spaces
  • Typical sed Command-line Options
  • sed and Regular Expressions
  • sed Numerical and Pattern Ranges
  • Most Useful sed Commands

 

Session 18 Text Processing with awk

  • An Introduction to awk
  • Simple awk Scripting
  • Complex Applications in awk
  • Conditional and Looping Constructs in awk
  • Awk Built-in Functions

 

Part V - Debugging and Testing

 

Session 19 Software Unit Testing Frameworks

  • Unit Testing versus System Testing
  • Brew Your Own Frameworks
  • Testing with the C Unit Test Framework
  • Testing with the Embedded Unit Test Framework
  • Testing with expect

 

Session 20 Debugging with GDB

  • Source Debugging with GDB
  • Debugging Multiprocess Applications
  • Debugging Multithreaded Applications
  • Debugging Programs Already Running
  • Post-mortem Debugging

 

Part VI SELinux

 

Session 21. Getting Started with SELinux

  • Boot Options for SELinux
  • Enabling user home directories
  • SELinux Settings for User Home Directories
  • Targeted Policy Protected Services
  • Default list of SELinux Protected Services
  • File Context for Special Directory Trees
  • Setting Persistent SELinux Contexts on Directory Trees.
  • Example: ftp server with non default directory

 

Session 22. Parser Generation with flex and bison

  • Introduction
  • A Simple Grammar
  • Encoding the Grammar in bison
  • Hooking the Lexer to the Grammar Parser
  • Building a Simple Configuration Parser
  • The Big Picture
  • Summary

 

Session 23. Source Control in GNU/Linux

  • Source Control Models
  • CVS Overview
  • Subversion Overview
  • GIT Overview

 

Session 24. Data Visualization with Gnuplot

  • Introduction
  • Gnuplot
  • Summary