T1105

Linux Systems Programming

System programming is the art of managing processes, signals, pipes, sockets, shared memory, messages queues, semaphores and more. In this course you will learn everything needed to start writing system level applications in Linux.

The first part of the course explains in depth the contents and organization of processes, virtual memory, function calls using stack frames, linkage, memory management and more.

The second part, explains all aspects of I/O, such as file systems, devices, file, system calls for I/O, memory mapped I/O, manipulation of file descriptors and more.

The third part, deals with process creation (fork) and management, executables, signals and more.

The fourth part, describes different ways to communicate between processes and threads, such as pipes, fifos, message queues, shared memory, semaphores, TCP sockets and more.

Every chapter contains a practical C/C++ programming exercise that illustrates the concepts and Linux API, discussed.

Målgrupp

C/C++ programmers

Förkunskaper

- Fluent in C/C++ programming

- Fluent in using a Unix/Linux system

- We will use Ubuntu Linux during the course

- Rudimentary knowledge about processes, threads and synchronization

- Understanding basic data structures

Content:

Application

Understanding the concept of a Linux application

The Process Concept

What is a process and dows it differ from a thread

Process meta-data

Virtual Address Space Organization

Virtual memory pages

Address translation

What happens during a page fault

Memory areas and their functions

Compilation and Linking

Overview of the various compilation steps

Understanding the magic number

Creating statically linked libraries

Creating dynamically linked libraries

Using programs to inspect compiled files such as string, nm, objdump, ldd