Murakami Sale
 
 

Recently Viewed clear list


Original Essays | August 21, 2014

Richard Bausch: IMG Why Literature Can Save Us



Our title is, of course, a problem. "Why Literature Can Save Us." And of course the problem is one of definition: what those words mean. What is... Continue »
  1. $18.87 Sale Hardcover add to wish list

    Before, During, After

    Richard Bausch 9780307266262

spacer
Qualifying orders ship free.
$64.99
New Trade Paper
Ships in 1 to 3 days
Add to Wishlist
available for shipping or prepaid pickup only
Available for In-store Pickup
in 7 to 12 days
Qty Store Section
2 Remote Warehouse Software Engineering- Programming and Languages

More copies of this ISBN

Advanced Unix Programming 2ND Edition

by

Advanced Unix Programming 2ND Edition Cover

 

 

Excerpt

Preface

This book updates the 1985 edition of Advanced UNIX Programming to cover a few changes that have occurred in the last eighteen years. Well, maybe "few" isn't the right word! And "updates" isn't right either. Indeed, aside from a sentence here and there, this book is all new. The first edition included about 70 system calls; this one includes about 300. And none of the UNIX standards and imple-mentations discussed in this book--POSIX, Solaris, Linux, FreeBSD, and Darwin (Mac OS X)--were even around in 1985. A few sentences from the 1985 Preface, however, are among those that I can leave almost unchanged:The subject of this book is UNIX system calls--the interface between the UNIX kernel and the user programs that run on top of it. Those who interact only with commands, like the shell, text editors, and other application programs, may have little need to know much about system calls, but a thorough knowledge of them is essential for UNIX programmers. System calls are the only way to access kernel facilities such as the file system, the multitasking mechanisms, and the interprocess communication primitives.

System calls define what UNIX is. Everything else--subroutines and commands--is built on this foundation. While the novelty of many of these higher-level programs has been responsi-ble for much of UNIX's renown, they could as well have been programmed on any modern operating system. When one describes UNIX as elegant, simple, efficient, reliable, and porta-ble, one is referring not to the commands (some of which are none of these things), but to the kernel.That's all still true, except that, regrettably, the programming interface to the ker-nel is no longer elegant or simple. In fact, because UNIX development has splintered into many directions over the last couple of decades, and because the principal standards organization, The Open Group, sweeps up almost everything that's out there (1108 functions altogether), the interface is clumsy, inconsistent, redundant, error-prone, and confusing. But it's still efficient, reliably imple-mented, and portable, and that's why UNIX and UNIX-like systems are so successful. Indeed, the UNIX system-call interface is the only widely imple-mented portable one we have and are likely to have in our lifetime.

To sort things out, it's not enough to have complete documentation, just as the Yellow Pages isn't enough to find a good restaurant or hotel. You need a guide that tells you what's good and bad, not just what exists. That's the purpose of this book, and why it's different from most other UNIX programming books. I tell you not only how to use the system calls, but also which ones to stay away from because they're unnecessary, obsolete, improperly implemented, or just plain poorly designed.

Here's how I decided what to include in this book: I started with the 1108 func-tions defined in Version 3 of the Single UNIX Specification and eliminated about 590 Standard C and other library functions that aren't at the kernel-interface level, about 90 POSIX Threads functions (keeping a dozen of the most important), about 25 accounting and logging functions, about 50 tracing functions, about 15 obscure and obsolete functions, and about 40 functions for scheduling and other things that didn't seem to be generally useful. That left exactly 307 for this book. (See Appendix D for a list.) Not that the 307 are all good--some of them are use-less, or even dangerous. But those 307 are the ones you need to know.

This book doesn't cover kernel implementation (other than some basics), writing device drivers, C programming (except indirectly), UNIX commands (shell, vi, emacs, etc.), or system administration.

There are nine chapters: Fundamental Concepts, Basic File I/O, Advanced File I/O, Terminal I/O, Processes and Threads, Basic Interprocess Communication, Advanced Interprocess Communication, Networking and Sockets, and Signals and Timers. Read all of Chapter 1, but then feel free to skip around. There are lots of cross-references to keep you from getting lost.

Like the first edition, this new book includes thousands of lines of example code, most of which are from realistic, if simplified, applications such as a shell, a full- screen menu system, a Web server, and a real-time output recorder. The examples are all in C, but I've provided interfaces in Appendices B and C so you can pro-gram in C++, Java, or Jython (a variant of Python) if you like.

The text and example code are just resources; you really learn UNIX program-ming by doing it. To give you something to do, I've included exercises at the end of each chapter. They range in difficulty from questions that can be answered in a few sentences to simple programming problems to semester-long projects.I used four UNIX systems for nuts-and-bolts research and to test the examples: Solaris 8, SuSE Linux 8 (2.4 kernel), FreeBSD 4.6, and Darwin (the Mac OS X kernel) 6.8. I kept the source on the FreeBSD system, mounted on the others with NFS or Samba.

I edited the code with TextPad on a Windows system and accessed the four test systems with Telnet or SSH (PuTTY) or with the X Window System (XFree86 and Cygwin). Having the text editor and the four Telnet/SSH/Xterm windows open on the same screen turned out to be incredibly convenient, because it takes only a few minutes to write some code and check it out on the four systems. In*addition, I usually had one browser window open to the Single UNIX Specifi-cation and one to Google, and another window running Microsoft Word for editing the book. With the exception of Word, which is terrible for big documents like books (crashes, mixed-up styles, weak cross-referencing, flakey document- assembly), all of these tools worked great. I used Perl and Python for various things like extracting code samples and maintaining the database of system calls.

Product Details

ISBN:
9780131411548
Author:
Rochkind, Marc J
Publisher:
Addison-Wesley Professional
Author:
Rochkind, Marc J.
Location:
Boston, MA
Subject:
Operating Systems - UNIX
Subject:
Computer programming
Subject:
UNIX
Subject:
Unix-Unix Administration
Copyright:
Edition Number:
2
Edition Description:
Trade paper
Series:
Addison-Wesley Professional Computing Series
Series Volume:
no. 235
Publication Date:
April 2004
Binding:
TRADE PAPER
Grade Level:
Professional and scholarly
Language:
English
Illustrations:
Y
Pages:
736
Dimensions:
19.99 in.

Related Subjects

Computers and Internet » Operating Systems » General
Computers and Internet » Operating Systems » Unix » Unix Administration
Computers and Internet » Operating Systems » Unix » Unix and Linux Programming
Computers and Internet » Software Engineering » Programming and Languages

Advanced Unix Programming 2ND Edition New Trade Paper
0 stars - 0 reviews
$64.99 In Stock
Product details 736 pages Addison-Wesley Professional - English 9780131411548 Reviews:
"Synopsis" by , The long-awaited revision to one of the foundation titles in UNIX programming covers the latest POSIX standards, updated for Linux, FreeBSD, and Mac OS X. Includes a wide range of examples, including a Web browser, a Web server, a keystroke recorder/player and a real shell. Rochkind is regarded as one of the pioneers in UNIX programming, and this book is a true classic.

spacer
spacer
  • back to top
Follow us on...




Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and gifts — here at Powells.com.