Free Downloads
Programming With POSIX Threads

With this practical book, you will attain a solid understanding of threads and will discover how to put this powerful mode of programming to work in real-world applications. The primary advantage of threaded programming is that it enables your applications to accomplish more than one task at the same time by using the number-crunching power of multiprocessor parallelism and by automatically exploiting I/O concurrency in your code, even on a single processor machine. The result: applications that are faster, more responsive to users, and often easier to maintain. Threaded programming is particularly well suited to network programming where it helps alleviate the bottleneck of slow network I/O.   This book offers an in-depth description of the IEEE operating system interface standard, POSIXAE (Portable Operating System Interface) threads, commonly called Pthreads. Written for experienced C programmers, but assuming no previous knowledge of threads, the book explains basic concepts such as asynchronous programming, the lifecycle of a thread, and synchronization. You then move to more advanced topics such as attributes objects, thread-specific data, and realtime scheduling. An entire chapter is devoted to "real code," with a look at barriers, read/write locks, the work queue manager, and how to utilize existing libraries. In addition, the book tackles one of the thorniest problems faced by thread programmers-debugging-with valuable suggestions on how to avoid code errors and performance problems from the outset.   Numerous annotated examples are used to illustrate real-world concepts. A Pthreads mini-reference and a look at future standardization are also included.

Paperback: 400 pages

Publisher: Addison-Wesley Professional (May 26, 1997)

Language: English

ISBN-10: 0201633922

ISBN-13: 978-0201633924

Product Dimensions: 7.4 x 1 x 8.9 inches

Shipping Weight: 1.4 pounds (View shipping rates and policies)

Average Customer Review: 4.4 out of 5 stars  See all reviews (27 customer reviews)

Best Sellers Rank: #595,819 in Books (See Top 100 in Books) #16 in Books > Computers & Technology > Programming > APIs & Operating Environments > Device Drivers #219 in Books > Computers & Technology > Operating Systems > Unix #637 in Books > Textbooks > Computer Science > Operating Systems

This book has got what you want to know about pthreads. If that was all it had, and it had that in the right order, then it would be perfect. Instead, this is a very frustrating book to read.Take 'mutexes' as an example. A useful explanation for a beginner might be as follows... (1) Where the word 'mutex' comes from (2) What a memory conflict is (3) How a mutex can avoid it (4) How it works (simplified) (5) Some good examples in programsOn page 6 we first meet a mutex in a bit about putchar - we turn 'putchar into a 'critical section' (unexplained) because 'putchar might lock a "putchar mutex" '.Don't bother trying to understand it. Next paragraph, we find 'the correct solution is to associate the mutex with the stream', so it was a bad idea in the first place. Oh.Two chapters later, on page 47, you get to know what a 'mutex' is. It's mutual exclusion using a special form of Edsger Dijkstra's semaphore, you dummy. Well, if you've read Edsger Dijkstra's 1968 paper, then you aren't likely to be reading this book, says I.Confused? Keep going. Finally on page 90, there is a neat tabular description of one thread reading a variable before the other one has written it, and how you can stop this with a mutex. Clear and simple, this should have been on page 6. The following section (marked "You may want to skip this explanation...") then describes the sorts of problem you get with real hardware - surely a 'must read' if you are going to do this sort of stuff.There is a noble tradition of giving a bad coding example in one chapter, so you can show how cleverly you can fix it in the next. Look at any Stroustrop book.

Programming with POSIX Threads Programming #8:C Programming Success in a Day & Android Programming In a Day! (C Programming, C++programming, C++ programming language, Android , Android Programming, Android Games) Programming #57: C++ Programming Professional Made Easy & Android Programming in a Day (C++ Programming, C++ Language, C++for beginners, C++, Programming ... Programming, Android, C, C Programming) Programming #45: Python Programming Professional Made Easy & Android Programming In a Day! (Python Programming, Python Language, Python for beginners, ... Programming Languages, Android Programming) Internetworking with TCP/IP, Vol. III: Client-Server Programming and Applications, Linux/Posix Sockets Version Real Time Systems and Programming Languages: Ada 95, Real-Time Java and Real-Time C/POSIX (3rd Edition) Programming: Computer Programming for Beginners: Learn the Basics of Java, SQL & C++ - 3. Edition (Coding, C Programming, Java Programming, SQL Programming, JavaScript, Python, PHP) Raspberry Pi 2: Raspberry Pi 2 Programming Made Easy (Raspberry Pi, Android Programming, Programming, Linux, Unix, C Programming, C+ Programming) Android: Programming in a Day! The Power Guide for Beginners In Android App Programming (Android, Android Programming, App Development, Android App Development, ... App Programming, Rails, Ruby Programming) DOS: Programming Success in a Day: Beginners guide to fast, easy and efficient learning of DOS programming (DOS, ADA, Programming, DOS Programming, ADA ... LINUX, RPG, ADA Programming, Android, JAVA) ASP.NET: Programming success in a day: Beginners guide to fast, easy and efficient learning of ASP.NET programming (ASP.NET, ASP.NET Programming, ASP.NET ... ADA, Web Programming, Programming) C#: Programming Success in a Day: Beginners guide to fast, easy and efficient learning of C# programming (C#, C# Programming, C++ Programming, C++, C, C Programming, C# Language, C# Guide, C# Coding) FORTRAN Programming success in a day:Beginners guide to fast, easy and efficient learning of FORTRAN programming (Fortran, Css, C++, C, C programming, ... Programming, MYSQL, SQL Programming) Prolog Programming; Success in a Day: Beginners Guide to Fast, Easy and Efficient Learning of Prolog Programming (Prolog, Prolog Programming, Prolog Logic, ... Programming, Programming Code, Java) R Programming: Learn R Programming In A DAY! - The Ultimate Crash Course to Learning the Basics of R Programming Language In No Time (R, R Programming, ... Course, R Programming Development Book 1) Parallel Programming: Success in a Day: Beginners' Guide to Fast, Easy, and Efficient Learning of Parallel Programming (Parallel Programming, Programming, ... C++ Programming, Multiprocessor, MPI) Programming With Threads Programming with UNIX Threads MYSQL Programming Professional Made Easy 2nd Edition: Expert MYSQL Programming Language Success in a Day for any Computer User! (MYSQL, Android programming, ... JavaScript, Programming, Computer Software) Programming Raspberry Pi 3: Getting Started With Python (Programming Raspberry Pi 3, Raspberry Pi 3 User Guide, Python Programming, Raspberry Pi 3 with Python Programming)