Crs 470 Systems and Network Programming for Linux
This course focuses on the "virtual machine" provided by the linux
kernel to application software. Inherited largely from UNIX, the elegant
application programming interface (API) described in this course has been
essentially stable for many years.
The course covers all major system programming features of Linux, from
basic I/O operations to interprocess and network communications, to the
exploitation of concurrency through the use of threads and processes.
The C language bindings are invariably used to document the system call
interface, and C is still the language of choice for most Linux systems
programming. For these reasons, C is used for the examples in this course.
|
Course Outline
Getting Started
- The "Hello World" program
- Receiving command line arguments
- Accessing environment variables
- Reading and writing stdin and stdout
- How to detect and handle system call errors
Multiprocessing
- The memory model and life cycle of a process
- Creating processes with fork
- Executing programs with exec
- Waiting for process termination
- Returning and retrieving exit status
Multithreading
- The memory model and life cycle of a thread
- Creating threads with the pthreads API
- Waiting for thread termination
- How are threads and processes different?
- Synchronising access to shared data
- When to use multiple processes and threads
Basic I/O
- Low-level input and output
- Reading and writing files
- Changing file attributes
- Managing files and directories
Interprocess Communication
- Pipes
- Message queues
- Shared Memory
- Semaphores
Signals
- What are signals for?
- Sending signals
- Ignoring and catching signals
- Writing signal handlers
Working with the Linux Security Model
- Changing file permissions and ownerships
- Accessing the user account database
- Setting user identity of a process
Network Communication
- TCP/IP fundamentals
- Client/server programming
- Connection-oriented sockets
- Connectionless sockets
- Name resolution
Writing graphical applications
- The Xlib libraries
- The Tk and Tcl toolkits
- Drag and drop interface construction with glade
- The Gnome and KDE toolkits
The Linux development environment
- The traditional build model
- Header files
- Automating rebuilds with make
- Writing platform-independent code with GNU configure
- Integrated development environments
- Commercial development environments
|
Intended Audience
The course is intended primarily for software developers writing or
porting code in the Linux environment. The course is also valuable for
technical managers and system designers wishing to understand the
capabilities of Linux at a programming level.
Attendees should have a reasonable understanding of the C language.
Although unnecessarily complex language structures are avoided in the
course, the design of some of the API calls require that attendees are
comfortable with, for example, the notion of a function returning a
pointer to a structure. Course 100 Introduction to C, provides
adequate background. |