> > > RHD251 Detailed outline

RHD251O (RHD251)

Course Description Schedule Course Outline

Detailed Course Outline

GCC—GNU Compiler Collection

  • GNU Compiler Collection (GCC)
  • History of GCC
  • Four Stages of GCC
  • Interrupting the compiler
  • Compiling a C program
  • Preprocessor features
  • Predefined preprocessor symbols
  • Warnings and extensions
  • Optimization
  • Linking

Building software with make

  • Introducing make(1)
  • How make works
  • Makefile rule syntax
  • Example: makefile first steps
  • Makefile improved
  • Implicit rules
  • Example: simpler Is better makefile
  • Variables
  • Defining variables
  • Example: makefile with variables
  • Automatic variables
  • Special targets
  • Defining useful phony targets

The GNU C library and system calls

  • Library goals
  • Library standards
  • GNU C library - glibc
  • Library functions vs. system calls
  • Using system calls
  • Handling errors with errno
  • Making sense of errno
  • Using strace

Program arguments and environment

  • Program startup
  • Using argc/argv
  • Handling options with getopt()
  • Handling options with getopt_long()
  • Environment
  • Manipulating the environment
  • Program exit
  • Registering exit handlers

Building libraries

  • Why use libraries?
  • Static versus shared
  • Static library benefits
  • Shared library benefits
  • Creating a static library
  • Using static libraries
  • Creating a shared library
  • Using shared libraries
  • Shared library management
  • Library locations
  • ldconfig

Time functions

  • When does time begin?
  • Time data types
  • Determining real time
  • Converting time_t
  • Converting tm structure
  • Process time
  • Time arithmetic
  • Second resolution timers
  • Fine-grained timers
  • Real-time clock (RTC)

Process management

  • What a process is
  • Process relationships
  • Create a child process
  • Doing something else
  • Related execve() functions
  • Wait for a child
  • More precise waiting
  • Changing priority/nice
  • Real-time priority

Memory operations

  • Allocating and freeing memory
  • Memory alignment
  • Locked memory
  • Memory copy and initialization
  • Memory comparison and search

Debugging

  • What is my program doing?
  • Source-level debugging
  • Invoking gdb
  • Getting started with gdb
  • Examining and changing memory
  • Debuginfo libraries
  • Using gdb with a running process
  • Using gdb to autopsy a crash
  • Debugging libraries - ElectricFence
  • Debugging with valgrind
  • Profiling for performance

Basic file operations

  • Stream vs. system calls
  • Opening and closing streams
  • Stream input/output functions
  • Stream status/errors
  • Stream file positioning
  • Stream buffering
  • Temporary and scratch files
  • Opening and closing file descriptors
  • File descriptor I/O
  • Repositioning file descriptors
  • Stream/file descriptor conversions
  • cat using ANSI I/O
  • cat using POSIX I/O

Communicating with pipes

  • Introduction to pipes
  • Standard I/O: popen()/pclose()
  • Using popen()/pclose()
  • System call: pipe()
  • Using pipe()
  • Named pipes
  • Using named pipes
  • For further reading

Managing signals

  • What signals are
  • Blocking and checking signals
  • Working with signal sets
  • Example of blocking signals
  • Handling signals with sigaction()
  • sigaction() example
  • Handling signals with signal()
  • Sending signals
  • Real-time signals

Programming with threads

  • Introducing threaded programming
  • Applications suited to threads
  • Building threaded programs
  • Creating threads
  • Thread identity
  • Synchronizing by joining
  • Detaching threads
  • Stopping threads
  • Synchronizing with sutexes
  • Using mutexes
  • Read/ and write locks
  • Conditional variables
  • Using conditional variables
  • A conditional variable gotcha
  • For further reading

Advanced file operations

  • Directory operations
  • File system operations
  • Multiplexed I/O with select()
  • Miscellaneous I/O functions
  • Memory mapped I/O
  • Using memory mapped I/O
  • File locking

Interprocess communication (IPC)

  • Interprocess communication (IPC)
  • POSIX IPC overview
  • POSIX shared memory
  • POSIX semaphores
  • POSIX message queues
  • System V IPC overview
  • System V IPC shared memory
  • System V IPC semaphore arrays
  • System V IPC message queues

Basic network programming

  • Linux networking overview
  • Getting started with socket()
  • Client functions
  • Specifying IPv4 addresses
  • Host versus network byte order
  • Example TCP/IP client
  • Address conversion functions
  • Using getaddrinfo()
  • Server functions
  • Example TCP/IP server
  • Datagram communication with UDP

Working with the Linux community

  • Getting in touch with the community
  • General considerations
  • Building a community
  • Licenses
  • GPL
  • LGPL
  • BSD
  • Creative commons