T1105

Ladda ner som PDF

Linux System 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.

  1. 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.
  2. 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.
  3. The third part, deals with process creation (fork) and management, executables, signals and more.
  4. 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

Working knowledge in C/C++ and basic concurrency theory (threads/processes). For example, knowledge similar to the course Advanced C++ and Threads Programming.

Content:

Application Processes

  • Organization of the address space
  • Virtual memory management
  • Process capabilities
  • Process priorities
  • CPU affinity
  • Scheduling
  • Processes versus Threads

Compilation and Linking

  • Compilation phases
  • Assembler
  • Linker
  • Static and dynamic linking
  • Commands to reveal compiled code

Function Calls

  • Stack frames
  • Call and return of functions
  • Manipulation of the call stack
  • Varargs
  • Non-local jumps with longjmp
  • System calls (OS)
  • Commands to reveal system calls

Memory Management

  • Heap organization
  • The malloc family
  • Heap statistics
  • Memory leaks
  • Valgrind
  • Word and page alignment

File systems

  • Devices types
  • Special devices
  • Mounting
  • Using a block file as a disk

Regular I/O

  • Directories, files and inodes
  • Device system calls
  • Open/close, read/write

The/proc File System

  • Information from the kernel

Advanced I/O

  • Binary I/O
  • Positional read/write
  • File descriptor manipulation (dup)
  • Memory mapped I/O (mmap)
  • Non-blocking I/O

Signals

  • Sending signals
  • Signal handlers
  • Timeouts
  • nterval timers
  • Longjmp and signal handlers

Process Control

  • Creating processes (fork)
  • Loading code (exec)
  • Zombies and daemons
  • Overview of Inter Process Communication (IPC)

Channels (IPC)

  • Pipes
  • Fifos
  • Named pipes

Message queues (IPC)

  • Queue operations
  • API and Commands

Semaphores

Content:

Application Processes

  • Organization of the address space
  • Virtual memory management
  • Process capabilities
  • Process priorities
  • CPU affinity
  • Scheduling
  • Processes versus Threads

Compilation and Linking

  • Compilation phases
  • Assembler
  • Linker
  • Static and dynamic linking
  • Commands to reveal compiled code

Function Calls

  • Stack frames
  • Call and return of functions
  • Manipulation of the call stack
  • Varargs
  • Non-local jumps with longjmp
  • System calls (OS)
  • Commands to reveal system calls

Memory Management

  • Heap organization
  • The malloc family
  • Heap statistics
  • Memory leaks
  • Valgrind
  • Word and page alignment

File systems

  • Devices types
  • Special devices
  • Mounting
  • Using a block file as a disk

Regular I/O

  • Directories, files and inodes
  • Device system calls
  • Open/close, read/write

The/proc File System

  • Information from the kernel

Advanced I/O

  • Binary I/O
  • Positional read/write
  • File descriptor manipulation (dup)
  • Memory mapped I/O (mmap)
  • Non-blocking I/O

Signals

  • Sending signals
  • Signal handlers
  • Timeouts
  • nterval timers
  • Longjmp and signal handlers

Process Control

  • Creating processes (fork)
  • Loading code (exec)
  • Zombies and daemons
  • Overview of Inter Process Communication (IPC)

Channels (IPC)

  • Pipes
  • Fifos
  • Named pipes

Message queues (IPC)

  • Queue operations
  • API and Commands

Semaphores

  • Local semaphores
  • Named semaphores
  • API and Commands

Shared Memory

  • Shared memory with and without a backing file
  • API and Commands
  • Synchronization and message queues in shared memory
  • Threads communication and shared memory

TCP Sockets

  • Inet domain sockets
  • Client sockets
  • Server sockets
  • Network byte order (NBO)
Kurs-ID: T1105
Längd: 3 dag
Pris exkl moms: 26 950 kr
Kan betalas med:
TRAINING CARD

Lämna dina kontaktuppgifter om du önskar en företagsintern utbildning.

Tipsa