Part III: Application Development Topics


Chapter List

Chapter 10: File Handling in GNU/Linux
Chapter 11: Programming with Pipes
Chapter 12: Introduction to Sockets Programming
Chapter 13: GNU/Linux Process Model
Chapter 14: POSIX Threads (Pthreads) Programming
Chapter 15: IPC with Message Queues
Chapter 16: Synchronization with Semaphores
Chapter 17: Shared Memory Programming
Chapter 18: Other Application Development Topics

Part Overview

In this part of the book, well review a number of important topics that are important to application development. This includes using the most important elements of GNU/Linux including various IPC mechanisms, Sockets, and multiprocess and multithreaded programming.

Chapter 10, File Handling in GNU/Linux

The file handling APIs are important in GNU/Linux because there are patterns for many other types of I/O, such as sockets and pipes. This chapter demonstrates the proper use of the file handling APIs using binary, character, and string interfaces. Numerous examples illustrate the APIs in their different modes.

Chapter 11, Programming with Pipes

The pipe model of communication is an older aspect of UNIX, but it is still an important one, considering its wide use in shell programming. The pipe model is first reviewed, with discussion of anonymous and named pipes. The API to create pipes is discussed, along with examples of using pipes for multiprocess communication. Shell-level creation and use of pipes complete this chapter.

Chapter 12, Introduction to Sockets Programming

Network programming using the standard Sockets API is the focus of this chapter. Each of the API functions is detailed, illustrating their use in both client and server systems. After a discussion of the Sockets programming paradigm and each of the API functions, other elements of Sockets programming are discussed, including multilanguage aspects.

Chapter 13, GNU/Linux Process Model

The GNU/Linux process model refers to the standard multiprocessing environment. We discuss the fork function (to create child processes) and the other process- related API functions (such as wait ). The topic of signals is also discussed, including the range of signals and their uses. Finally, the GNU/Linux process commands (such as ps ) are detailed.

Chapter 14, POSIX Threads (Pthreads) Programming

Programming with threads using the pthreads library is the topic of this chapter. The functions in the pthreads library are discussed, including thread creation and destruction, synchronization (with mutexes and condition variables ), communication, and other thread-related topics. Problems in multithreaded applications are also discussed, such as reentrancy.

Chapter 15, IPC with Message Queues

Message queues are a very important paradigm for communication in multiprocess applications. The model permits one-to-many and many-to-one communication and a very simple and intuitive API. This chapter details the message queue APIs for creating, configuring, and then sending and receiving messages. Advanced topics such as conditional message receipt are also discussed, along with user layer utilities for message queue inspection.

Chapter 16, Synchronization with Semaphores

Semaphores in GNU/Linux and the ability to create critical sections are the topics of this chapter. After a discussion of the problems that semaphores solve, the API for semaphores is detailed, including creation, acquisition, release, and removal. The advanced features provided by GNU/Linux such as semaphore arrays are discussed, including user-level commands to inspect and remove semaphores.

Chapter 17, Shared Memory Programming

One of the most important process communication mechanisms available in GNU/Linux is shared memory. The shared memory APIs allow segments of memory to be created and then shared between two or more processes. This chapter details the shared memory APIs for creating, attaching, detaching, locking, and unlocking shared memory segments.

Chapter 18, Other Application Development Topics

In this final chapter of Part III, we explore some of the important application development topics that were not covered in the preceding chapters. The topics explored here include command-line parsing with the getopt and getopt_long APIs, time conversion functions, sysinfo , memory mapping with mmap , and locking and unlocking memory pages for performance.




GNU/Linux Application Programming
GNU/Linux Application Programming (Programming Series)
ISBN: 1584505680
EAN: 2147483647
Year: 2006
Pages: 203
Authors: M. Tim Jones

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net