Practical UNIX Programming - Kay Robbins, Steve Robbins

Practical UNIX Programming

A Guide to Concurrency, Communication, and Multithreading
Buch | Hardcover
672 Seiten
1995
Prentice Hall (Verlag)
978-0-13-443706-4 (ISBN)
45,90 inkl. MwSt
zur Neuauflage
  • Titel erscheint in neuer Auflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
Explains complicated topics such as signals and concurrency. This book offers an abundance of practical examples and exercises. It covers fundamentals, asynchronous events, concurrency, and communication.
For programmers in need of a better understanding of UNIX systems programming.

Well written and comprehensive, this book explains complicated topics such as signals and concurrency in a simple, easy-to-understand manner. The book offers an abundance of practical examples and exercises. This book is comparable to other best-selling UNIX books, such as UNIX Network Programming, by Richard Stevens. Covers fundamentals, asynchronous events, concurrency, and communication.

I. FUNDAMENTALS.

1. What Is Concurrency?


Multiprogramming and Multitasking. Concurrency at the Applications Level. UNIX Standards. Programming in UNIX. Making Functions Safe. Exercise: Argument Arrays. Additional Reading.

2. Programs and Processes.


Layout of a Program Executable. Static Objects. The Process ID. The Process State. Process Creation and the UNIX fork. The wait System Call. The exec System Call. Background Processes and Daemons. The Process Environment. Process Termination in UNIX. Critical Sections. Exercise: Process Chains. Exercise: Process Fans. Exercise: Simple biff. Exercise: News biff. Additional Reading.

3. Files.


Directories and Paths. UNIX File Representation. File Handle Representation. Filters and Redirection. Pipes. Reading to and Writing from Files. Nonblocking I/O. The select call. FIFOs. Special Files—The Audio Device. Exercise: Traversing Directories. Exercise: proc Filesystem. Exercise: Audio. Exercise: Terminal Control. Additional Reading.

4. Project: The Token Ring.


Forming a Ring. Simple Communication. Mutual Exclusion with Tokens. Mutual Exclusion by Voting. Leader Election on an Anonymous Ring. Token Ring for Communication. A Pipelined Preprocessor. Parallel Ring Algorithms. The Flexible Ring. Additional Reading.

II. ASYNCHRONOUS EVENTS.

5. Signals.


Sending Signals. The Signal Mask and Signal Sets. Catching and Ignoring Signals—sigaction. Waiting for Signals—pause and sigsuspend. An Example—biff. System Calls and Signals. siglongjmp and sigsetjmp. Realtime Signals. Asynchronous I/O. Exercise: Dumping Statistics. Exercise: proc Filesystem II. Exercise: Spooling a Slow Device. Additional Reading.

6. Project: Timers.


Times in UNIX. Interval Timers. Project Overview. Simple Timers. Setting One of Five Single Timers. Multiple Timers. A Robust Implementation of Multiple Timers. mycron, a Small Cron Facility. POSIX Timer Implementation. Additional Reading.

7. Project: Cracking Shells.


A Simple Shell. Redirection. Pipelines. Signals. Process Groups, Sessions, and Controlling Terminals. Handling Background Processes in ush. Job Control. Job Control for ush. Additional Reading.

III. CONCURRENCY.

8. Critical Sections and Semaphores.


Atomic Operations. Semaphores. Semaphores in POSIX. Semaphores in System V (Spec 1170). Semaphores and Signals. Exercise: POSIX Unnamed Semaphores. Exercise: POSIX Named Semaphores. Exercise: License Manager. Exercise: System V Shared Memory. Exercise: System V Message Queues. Additional Reading.

9. POSIX Threads.


A Motivating Problem: Monitoring File Descriptors. POSIX Threads. Basic Thread Management. User versus Kernel Threads. Thread Attributes. Exercise: Parallel File Copy. Additional Reading.

10. Thread Synchronization.


Mutexes. Semaphores. Condition Variables. Signal Handling and Threads. Exercise: Threaded Print Server. Additional Reading.

11. Project: The Not Too Parallel Virtual Machine.


The Not Too Parallel Virtual Machine. NTPVM Project Overview. I/O and Testing of Dispatcher. Single Task with No Input. Sequential Tasks. Concurrent Tasks. Broadcast and Barriers. Termination and Signals. Additional Reading.

IV. COMMUNICATION.

12. Client-Server Communication.


Client-Server Strategies. The Universal Internet Communication Interface (UICI). Network Communication. Socket Implementation of UICI. Transport Layer Interface (TLI). STREAMS. STREAMS implementation of UICI. Thread-Safe UICI. Exercise: Transmission of Audio. Exercise: Ping Server. Additional Reading.

13. Project: Internet Radio.


Overview of the Multiplexer. One-Way Communication. Two-Way Communication. The Transmit Buffer. Multiplexing the Transmit Buffer. Network Receivers. Tuning In and Out. Network Broadcaster. Signal Handling. Additional Reading.

14. Remote Procedure Calls.


Basic Operation. Converting a Simple Local Call to an RPC. An Improved Remote Pseudorandom-Number Service. Server State and Idempotent Requests. Remote Idempotent File Service. Binding and Naming of Services. Failures. NFS—Network File System. Threads and Remote Procedure Calls. Exercise: Stateless File Server. Additional Reading.

15. Project: Tuple Space.


Linda. Richard, a Simplified Linda. A Simple Richard Tuple Space. Blackboards: A Tuple Space Application. Active Tuples in Richard. Tuple Spaces as Tuples in Richard. A Multithreaded Server for Richard. Additional Reading.

Appendix A. UNIX Fundamentals.


Getting Help. Compilation. Makefiles. Header Files. Linking and Libraries. Debugging Aids. User Environment. Additional Reading.

Appendix B. UICI Implementation.


UICI Prototypes. Socket Implementation. TLI Implementation. Streams Implementation. Thread-safe UICI Implementation.

Bibliography.
Index.

Erscheint lt. Verlag 21.11.1995
Verlagsort Upper Saddle River
Sprache englisch
Maße 243 x 185 mm
Gewicht 1138 g
Themenwelt Informatik Betriebssysteme / Server Unix / Linux
ISBN-10 0-13-443706-3 / 0134437063
ISBN-13 978-0-13-443706-4 / 9780134437064
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
das umfassende Handbuch

von Dirk Deimeke; Daniel van Soest; Stefan Kania

Buch | Hardcover (2023)
Rheinwerk (Verlag)
69,90
das umfassende Handbuch

von Michael Kofler

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90
Die wichtigen Befehle

von Daniel J. Barrett

Buch | Softcover (2024)
O'Reilly (Verlag)
16,90