Skill Set Name: Linux System Programming

Topics Level Sub topics Skill Category No Code Share comment
Architecture of Linux Kernel


Understanding the basic architecture and functions of the Linux kernel, including process management, memory management, file systems, networking, device management and interrupt mechanism.


Architecture of Linux kernel
System Calls I

Understanding the system call function used for OS functions in ordinary applications. Understanding the position of the system call among other functions. Knowing the outline of the internal behavior of the OS when the system call function is activated.

  •  Understanding the system call to invoke OS functions in applications
  • Understanding the internal behavior of system calls
  • Tracing systems using ‘strace’ command
    • Command line options
Linux System Monitoring Tools I

Understanding the system monitoring tools, including /proc file system and top, ps commands.

  • Understanding how to monitor various parts of the Linux kernel and status of system resources by using /proc file system.
  • Knowing top, ps commands
    • Command line options
    • Meaning of the output
  • Knowing the kill command
  • Knowing the PowerTOP utility
    • Understanding power-aware system monitoring
Development Tools II

Knowing how to use GNU tools, including compiler, loader, and debugger. Understanding and writing Makefile to develop Linux system programs.

  • Make and Makefile
  • Compiler / linker (gcc, GNU ld)
  • Library management tools
  • Debugging
    •  Debugger
    •  Debugging skill
    •  Strace ()
Shell Environment II

Understanding how to obtain the shell environment and to interface with shell command line arguments.

  • Understanding Shell Scripts
  • Get / put information between C program and shell environments
    •  Accessing environment variables
    •  Using command line arguments (argc, argv)
  • Use redirection and pipe
File input/output II

Understanding file control commands to control file and operations on files, including file locking.

  • Polling functions
    • poll(), select(), epoll()
  • Mapping file into memory
  • Mmap()
  • Understanding and knowing to use fcntl() commands.
  • Knowing how to use file locking mechanism with fcntl()
  • Understanding blocking, non-blocking operation
File input/output I

Knowing how to use files and directories by using standard POSIX API functions.

  • POSIX file input/output
    • open(), read(), write(), close(), lseek(), … 
    • and their stream versions fopen(), …


File systems II

Knowing to manage files and directories and device-special files.

File Systems
  • file and directory manipulation
    • creating, deleting files, directories
    • link, symbolic link, stat()
    • accessibility and mktmp, and security
  • accessing device special files
Processes and threads II

Knowing how to create process, to execute a program and to manage the process

Process management
  • Understanding the difference between processes and threads in Linux
  • Setting the schedule class of a process
    •  nice(), sched_getparam(), sched_setparam()
  • Create process
    •  fork()
  • Execute a program
    •  exec() and its variants
    •  system()
  • Other process-related functions
    •  wait(), kill(), …
  • Daemonize a process
Multi-thread Programming II

Knowing how to create, cancel, synchronize with pthread library

Process management
  • Pthread basic
  • Thread create, cancellation
    •  Passing parameter to thread
  • Thread synchronization
Signals II

Knowing how signal works in Linux system, how to catch or ignore signals. Understanding and using setjmp() and longjmp()

  • Introduction to signal
    •  How it works
    •  Side effects of signal
  • Using signal
    •  How to catch, ignore signal
    •  Signal handler programming
  • Understanding and using setjmp(), longjmp()
Input/output to/from terminal equipment I

Understand tty architecture of Linux and knowing how to use termcap and/or curses library.

  • Introduction to tty
    •  Tty architecture
    •  Tty operation modes
    •  Pseudo tty
    •  Termcap and curses
  • Understand tty attributes
Input/output to/from terminal equipment II

Knowing how to use termios and curses library

Time II

Knowing various time manipulating functions in Linux and knowing how to delay management short or long delay.

  • Understating of the presentation of time in Linux
  • Knowing time-manipulating functions
    •   Finding time
    •  Conversion between time formats
  • Knowing how to wait for time
    •  use sleep(), nanosleep(), clocknanosleep() and alarm()
    •  using select() to wait
2-4-12-II Time
IPC mechanisms II

Knowing how to use Linux IPC primitives.

Inter process communications
  • Understanding pipe and named pipe.
    •  Using pipe()
    •  Using mkfifo command
Network socket programming II

Knowing BSD socket programming

Protocol stacks
  • Knowing the various socket types and protocols inside
  • Knowing how to TCP/IP client, server application using socket library
    • socket(), close(), bind(), listen(), connect(), accept(), select(), send(),recv(), select(), …


Building a shared library I

Understanding the concept of library, and knowing how to manage shared library code. Knowing how to build a shared library.

  • Understanding the concept of library and using library options in GNU loader
    • static library
    • shared dynamic library
  • Understanding the operation library manager
    • The ar command
  • System library management
  • Building a Shared library
Optimization of Linux system program III

Knowing how to measure the performance of a program by profiling and resource usage monitoring.

  • Knowing to profile application and system
    •  Using GNU gprof and gprof library
    •  Oprofile
  • Optimization techniques