Preface

Team-FLY

UNIX Systems Programming: Communication, Concurrency and Threads is the second edition of Practical UNIX Programming: A Guide to Communication, Concurrency and Multithreading , which was published by Prentice Hall in 1995. We changed the title to better convey what the book is about. Several things have changed, besides the title, since the last edition.

The Internet has become a dominant aspect of computing and of society. Our private information is online; our software is under constant attack. Never has it been so important to write correct code. In the new edition of the book, we tried to produce code that correctly handles errors and special situations. We realized that saying handle all errors but giving code examples with the error handling omitted was not effective. Unfortunately, error handling makes code more complex. We have worked hard to make the code clear.

Another important development since the last edition is the adoption of a Single UNIX Specification, which we refer to as POSIX in the book. We no longer have to decide which vendor's version of a library function to use ”there is an official version. We have done our best to comply with the standard.

The exercises and projects make this book unique. In fact, the book began as a project workbook developed as part of a National Science Foundation Grant. It became clear to us, after preliminary development, that the material needed to do the projects was scattered in many places ”often found in reference books that provide many details but little conceptual overview. The book has since evolved into a self-contained reference that relies on the latest UNIX standards.

The book is organized into four parts , each of which contains topic chapters and project chapters. A topic chapter covers the specified material in a work-along fashion. The topic chapters have many examples and short exercises of the form "try this" or "what happens if." The topic chapters close with one or more exercise sections. The book provides programming exercises for many fundamental concepts in process management, concurrency and communication. These programming exercises satisfy the same need as do laboratory experiments in a traditional science course. You must use the concepts in practice to have real understanding. Exercises are specified for step-by-step development, and many can be implemented in under 100 lines of code.

The table below summarizes the organization of the book ”twenty two chapters grouped into four parts. The fifteen topic chapters do not rely on the eight project chapters. You can skip the projects on the first pass through the book.

Part

Topic Chapter

#

Project Chapter

#

I Fundamentals

Technology's Impact

1

   

Programs

2

   

Processes in UNIX

3

   

UNIX I/O

4

   

Files and Directories

5

   

UNIX Special Files

6

   
   

The Token Ring

7

II Asynchronous Events

Signals

8

   

Times and Timers

9

   
   

Virtual Timers

10

   

Cracking Shells

11

III Concurrency

POSIX Threads

12

   

Thread Synchronization

13

   

Semaphores

14

   

POSIX IPC

15

   
   

Producer Consumer

16

   

Virtual Machine

17

IV Communication

Connection-Oriented Commun.

18

   
   

WWW Redirection

19

Connectionless Commun.

20

   
   

Internet Radio

21

   

Server Performance

22

Project chapters integrate material from several topic chapters by developing a more extensive application. The projects work on two levels. In addition to illustrating the programming ideas, the projects lead to understanding of an advanced topic related to the application. These projects are designed in stages, and most full implementations are a few hundred lines long. Since you don't have to write a large amount of code, you can concentrate on understanding concepts rather than debugging. To simplify the programming, we make libraries available for network communication and logging of output. For a professional programmer, the exercises at the end of the topic chapters provide a minimal hands-on introduction to the material. Typically, an instructor using this book in a course would select several exercises plus one of the major projects for implementation during a semester course. Each project has a number of variations, so the projects can be used in multiple semesters.

There are many paths through this book. The topic chapters in Part I are prerequisites for the rest of the book. Readers can cover Parts II through IV in any order after the topic chapters of Part I. The exception is the discussion at the end of later chapters about interactions (e.g., how threads interact with signals).

We have assumed that you are a good C programmer though not necessarily a UNIX C programmer. You should be familiar with C programming and basic data structures. Appendix A covers the bare essentials of program development if you are new to UNIX.

This book includes synopsis boxes for the standard functions. The relevant standards that specify the function appear in the lower-right corner of the synopsis box.

A book like this is never done, but we had to stop somewhere. We welcome your comments and suggestions. You can send email to us at authors@usp.cs.utsa.edu. We have done our best to produce an error-free book. However, should you be the first to report an error, we will gratefully acknowledge you on the book web site. Information on the book is available on the WWW site http://usp.cs.utsa.edu/usp. All of the code included in the book can be downloaded from the WWW site.

Team-FLY


Unix Systems Programming
UNIX Systems Programming: Communication, Concurrency and Threads
ISBN: 0130424110
EAN: 2147483647
Year: 2003
Pages: 274

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