Course in Linux Systems Programming using C

Extensive course in fork/exec, pipe/dup2, tcp sockets, memory mapped I/O and much more

How to create a process and fill it with new source code. Which different ways to communicate between different processes are there? How to fix a memory-mapped I/O?

These and many more question formulations we will address in this very appreciated course

This is what you will learn
  • How the address space of a process is organized and why this is interesting
  • The details of function invocation and how exploit that insight
  • How tracking library and system calls
  • Understanding the special file system /proc
  • Asynchronous I/O and memory mapped dito
  • Dealing with signals
  • Managing processes using fork(), exec() and wait()
  • Communication between processes using pipes or fifos
  • POSIX message queues
  • POSIX shared memory segments
  • POSIX semaphores
  • TCP stream sockets
Course Contents

Virtual Address Space Organization

  • Virtual memory pages
  • Address translation
  • What happens during a page fault
  • Memory areas and their functions

Compilation and Linkage

  • Overview of the various compilation steps
  • Understanding the magic number
  • Creating statically linked libraries
  • Creating dynamically linked libraries
  • Useful compiler options
  • Using programs to inspect compiled files such as string, nm, objdump, ldd

Understanding Function Calls

  • Understanding the call stack
  • The content of a stack frame
  • The details of a single function call
  • Implementing variable number of function arguments
  • Using setjmp/longjmp

Library and System Calls

  • What is call to a library
  • What is a system call
  • How is the kernel code invoked during a system call
  • Tracing library and system calls

Memory Management

  • What is dynamic memory anyway
  • Brief about how to implement heap management
  • Estimating the current heap size
  • Allocating memory blocks on the call stack
  • Tracking memory leaks with valgrind

Creating Processes

  • Copying a the adress-space of a process with fork
  • Special process IDs
  • Terminating a process
  • Waiting for processes to terminate
  • What are zombies and daemons
  • Loading a new executable with exec

File Systems

  • What is a file system
  • FS types
  • File types
  • Basic operations on files, from the kernel's perspective
  • I-nodes
  • Directory files
  • File descriptors
  • Devices
  • Mounting devices

The /proc file system

  • What is the /proc FS
  • Top-level info files
  • Process-specific info files

Regular I/O

  • How to use the kernel API of open/close
  • Opening modes
  • Setting file permissions
  • How to use the kernel API of read/write
  • Changing the file read/write position
  • Manipulating files in the file system

Advanced I/O

  • Manipulation of file descriptors
  • Using memory mapped I/O
  • Using non-blocking I/O
  • Using non-deterministic I/O


  • What are signals
  • Sending signals from the shell and from program code
  • Implementing signal handlers
  • Registering signals and signal masks
  • Implementing timeouts
  • Creating interval timers
  • Invoking longjmp from a signal handler


  • What is a channel
  • Pipes
  • Fifos

Message Queues

  • What is a message queue and how do it differ from a channel
  • Overview of the API
  • Usages

Shared Memory

  • What is shared memory
  • Overview of the API
  • Usages


  • What is a semaphore
  • Memory vs file-system based semaphores
  • Overview of the API
  • Usages

TCP Sockets

  • What is a TCP socket
  • API overview
  • Network byte order (NBO)
  • Creating client sockets
  • Creating server-side sockets
Name Linux Systems Programming using C
Duration3 Days
Audience Technical C programmers
PrerequisitesPractical knowledge and experince of C programming
  • GCC compiler
  • Jetbrains CLion IDE
  • Ubuntu Linux @ VirtualBox or WSL @ Windows-10
Course Dates
2020-02-17Stockholm19 000 kr
2020-03-09Stockholm 19 000 kr
2020-03-30 Stockholm19 000 kr
2020-04-14Stockholm19 000 kr
2020-05-25Stockholm19 000 kr
2020-06-15Stockholm19 000 kr

Same-Company Discout

We offer a 20% discount for additional participants from the same company and at the same course date. Read more here.

Teaching Language

Our printed course material is always authored in English. The oral presentation in our classrooms is generally in Swedish, unless all participants agree to that we perform the course in English.

On-Site Course

If you order an On-Site course, we will come to you and hold the course in your office. The price is determined by our price model and is based on the number of course days, number of participants and any travel and lodging.

Read more about out price modell and term of sales here.

Related Courses
C Programming4Beginner Show
POSIX Threads using C2 AdvancedShow
Linux Systems Programming using Modern C++3AdvancedShow