Internetworking with TCP/IP / Douglas E. Comer and David L.Stevens

By: Comer, DouglasMaterial type: TextTextPublication details: Englewood Cliffs, N.J. Prentice Hall, 1996Edition: 2nd edDescription: V.3 xxvi, 519 p. ill. ; 25 cmISBN: 978812032531 (pb); 0134722426 (v. 2); 0134742222 (v. 3)Subject(s): Computer networks | TCP/IP (Computer network protocol) | Data transmission systemsDDC classification: 004.6
Contents:
Chapter 1 Introduction And Overview 1.1 Use Of TCP/IP 1.2 Designing Applications For A Distributed Environment 1.3 Standard And Nonstandard Application Protocols 1.4 An Example Of Standard Application Protocol Use 1.5 An Example Connection 1.6 Using TELNET To Access An Alternative Service 1.7 Application Protocols And Software Flexibility 1.8 Viewing Services From The Provider's Perspective 1.9 The Remainder Of This Text Chapter 2 The Client Server Model And Software Design 2.1 Introduction 2.2 Motivation 2.3 Terminology And Concepts - 2.3.1 Clients And Servers 2.3.2 Privilege And Complexity 2.3.3 Standard Vs. Nonstandard Client Software 2.3.4 Parameterization Of Clients 2.3.5 Connectionless Vs. Connection-Oriented Servers 2.3.6 Stateless Vs. Stateful Servers 2.3.7 A Stateful File Server Example 2.3.8 Statelessness Is A Protocol Issue 2.3.9 Servers As Clients Chapter 3 Concurrent Processing In Client-Server Software 3.1 Introduction 3.2 Concurrency In Networks 3.3 Concurrency In Servers 3.4 Terminology And Concepts 3.4.1 The Process Concept 3.4.2 Programs vs. Processes 3.4.3 Procedure Calls 3.5 An Example Of Concurrent Process Creation 3.5.1 A Sequential C Example 3.5.2 A Concurrent Version 3.5.3 Timeslicing . 3.5.4 Making Processes Diverge 3.6 Executing New Code 3.7 Context Switching And Protocol Software Design 3.8 Concurrency And Asynchronous 1/0 Chapter 4 Program Interface To Protocols 4.1 Introduction 4.2 Loosely Specified Protocol Software Interface 4.2.1 Advantages And Disadvantages 4.3 Interface Functionality 4.4 Conceptual Interface Specification 4.5 System Calls 4.6 Two Basic Approaches To Network Communication 4.7 The Basic I/O Functions Available In UNIX 4.8 Using UNIX I/O With TCP/IP Chapter 5 The Socket Interface 5.1 Introduction 5.2 Berkeley Sockets 5.3 Specifying A Protocol Interface 5.4 The Socket Abstraction 45 5.4.1 Socket Descriptors And File Descriptors 45 5.4.2 System Data Structures For Sockets 46 5.4.3 Using Sockets 47 5.5 Specifying An Endpoint Address 47 5.6 A Generic Address Structure 48 5.7 Major System Calls Used With Sockets 49 5.7.1 The Socket Call 49 5.7.2 The Connect Call 50 5.7.3 The Write Call 50 5.7.4 The Read Call 50 5.7.5 The Close Call 50 5.7.6 The Bind Call 51 5.7.7 The Listen Call 51 5.7.8 The Accept Call 51 5.7.9 Summary Of Socket Calls Used With TCP 51 5.8 Utility Routines For Integer Conversion 52 5.9 Using Socket Calls In A Program 53 5.10 Symbolic Constants For Socket Call Parameters 54 5.11 Summary 54 Chapter 6 Algorithms And Issues In Client Software Design • 6.1 Introduction 57 6.2 Learning Algorithms Instead Of Details 57 6.3 Client Architecture 58 6.4 Identifying The Location Of A Server 58 6.5 Parsing An Address Argument 60 6.6 Looking Up A Domain Name 61 §.7 Looking Up A Well-Known Port By Name 62 6.8 Port Numbers And Network Byte Order 62 6.9 Looking Up A Protocol By Name 63 6.10 The TCP Client Algorithm 63 6.11 Allocating A Socket 64 6.12 Choosing A Local Protocol Port Number 65 6.13 A Fundamental Problem In Choosing A Local IP Address 65 6.14 Connecting A TCP Socket To A Server 66 6.15 Communicating With The Server Using TCP 66 6.16 Reading A Response From A TCP Connection 67 6.17 Closing A TCP Connection 68 6./»7.7 The Need For Partial Close 68 6.17.2 A Partial Close Operation 68 6.18 Programming A UDP Client 69 6.19 Connected And Unconnected UDP Sockets 69 6.20 Using Connect With UDP 70 6.21 Communicating With A Server Using UDP 70 6.22 Closing A Socket That Uses UDP 70 6.23 Partial Close For UDP 71 6.24 A Warning About UDP Unreliability 71 6.25 -Summary 71 Chapter 7 Example Client Software 7.1 Introduction 75 7.2 The Importance Of Small Examples 75 7.3 Hiding Details 76 7.4 An Example ^ocedure Library For Client Programs 76 7.5 Implementation Of ConnectTCP 77 7.6 Iihplementation Of ConnectUDP 78 7.7 A Procedure That Forms Connections 79 7.8 Using The Example Library 81 7.9 The DAYTIME Service 82 7.10 Implementation Of A TCP Client For DAYTIME 82 7.11 Reading From A TCP Connection 84 7.72 The TIME Service 84 7.13 Accessing The TIME Service 85 7.14 Accurate Times And Network Delays 85 7.75 A UDP Client For The TIME Service 86 7.76 The ECHO Service 88 7.77 A TCP Client For The ECHO Service 88 7.18 A UDP Client For The ECHO Service 90 7.79 Summary 92 Chapter 8 Algorithms And Issues In Server Software Design 8.7 IntradubtioH 95 , 8.2 The Conceptual Server Algorithm 95 8.3 Concurrent Vs. Iterative.Servers 96 ■ 8.4 Connection-Oriented Vs. Connectionless Access 96 8.5 Connection-Oriented Servers 97 8.6 Connectionless Servers 91 ' 8.7 Failure, Reliability, And Statelessness 98 8.8 Optimizing Stateless Servers 99 8.9 Four Basic Types Of Servers 101 8.10 Request Processing Time 102 8.11 Iterative Server Algorithms 102 8.12 An Iterative, Connection-Oriented Server Algorithm 103 8.13 Binding To A Well-Known Address Using 1NADDR_ANY 103 8.14 Placing The Socket In Passive Mode 104 8.15 Accepting Connections And Using Them 104 8.16 An Iterative, Connectionless Server Algorithm 104 8.17 Forming A Reply Address In A Connectionless Server 105 8.18 Concurrent Server Algorithms 106 8.19 Master And Slave Processes 106 8.20 A Concurrent, Connectionless Server Algorithm 107 8.21 A Concurrent, Connection-Oriented Server Algorithm 107 8.22 Using Separate Programs As Slaves 108 8.23 Apparent Concurrency Using A Single Process 109 8.24 When To Use Each Server Type 110 8.25 A Summary of Server Types 111 8.26 The Important Problem Of Server Deadlock 112 8.27 Alternative Implementations 112 8.28 Summary 113 Chapter 9 Iterative. Connectionless Servers (UDP) 9.1 Introduction 115 9.2 Creating A Passive Socket 115 9.3 Process Structure 119 9.4 An Example TIME Server 119 9.5 Summary 121 Chapter 10 iterative, Connection-Oriented Servers (TCP) 10.1 Introduction 123 10.2 Allocating A Passive TCP Socket 123 10.3 A Server For The DAYTIME Service 124 10.4 Process Structure 124 10.5 An Example DAYTIME Server 125 10.6 Closing Connections 128 10.7 Connection Termination And Server Vulnerability 128 10.8 Summary 129 Chapter 11 Concurrent, Connection-Oriented Servers (TCP) 77.7 Introduction 131 77.2 Concurrent ECHO 131 11.3 Iterative Vs. Concurrent Implementations 132 11.4 Process Structure 132 77.5 An Example Concurrent ECHO Server 133 11.6 -Cleaning Up Errant Processes 137 77.7 Summary 138 Chapter 12 Single-Process, Concurrent Servers (TCP) 72.7 Introduction 139 72.2 Data-driven Processing In A Server 139 12.3 Data-Driven Processing With A Single Process 140 12.4 Process Structure Of A Single-Process Server 141 12.5 An.Example Single-Process ECHO Server 142 72.6 Summary 144 Chapter 13 Multiprotocol Servers (TCP, UDP) 75.7 Introduction 147 13.2 The Motivation For Reducing The Number Of Servers 147 13.3 Multiprotocol Server Design 148 13.4 Process Structure 148 13.5 An Example Multiprotocol DAYTIME Server 149 13.6 The Concept Of Shared Code 153 13.7 Concurrent Multiprotocol Servers 153 13.8 Summary 153 Chapter 14 Multiservice Servers (TCP, UDP) 14.1 Introduction 155 14.2 Consolidating Servers 155 14.3 A Connectionless, Multiservice Server Design 156 14.4 A Connection-Oriented, Multiservice Server Design 157 14.5 A Concurrent, Connection-Oriented, Multiservice Server 158 14.6 A Single-Process, Multiservice Server Implementation 158 14.7 Invoking Separate Programs From A Multiservice Server 159 14.8 Multiservice, Multiprotocol Designs 160 14.9 An Example Multiservice Server 161 14.10 Static and Dynamic Server Configuration 168 14.11 The UNIX Super Server, Inetd 169 14.12 An Example Inetd Server 171 14.13 Summary 173 Chapter 15 Uniform, Efficient Management Of Server Concurrency 15.1 Introduction 175 15.2 Choosing Between An Iterative And A Concurrent Design 175 15.3 Level Of Concurrency 176 15.4 Demand-Driven Concurrency 177 15.5 The Cost Of Concurrency 177 15.6 Overhead And Delay 177 15.7 Small Delays Can Matter 178 15.8 Process Preallocation 179 15.8.1 Preallocation In UNIX 180 15.8.2 Preallocation In A Connection-Oriented Server 180 15.8.3 Preallocation In A Connectionless Server 181 15.8.4 Preallocation, Bursty Traffic, And NFS 182 15.8.5 Process Preallocatipn On A Multiprocessor 183 15.9 Delayed Process Allocation 183 15.10 The Uniform Basis For Both Techniques 184 15.11 Combining Techniques 185 15.12 Summary 185- Chapter 16 Concurrency in Clients 16.1 Introduction 187 16.2 The Advantages Of Concurrency 187 16.3 The Motivation For Exercising Control 188 16.4 Concurrent Contact With Multiple Servers 189 16.5 Implementing Concurrent Clients 189 16.6 Single-Process Implementations 191 16.7 An Example Concurrent Client That Uses ECHO 192 16.8- Execution Of The Concurrent Client 196 16.9 Concurrency In The Example Code 197 16.10 Summary 198 Chapter 17 Tunneling At The Transport And Application Levels 17.1 Introduction 199 17.2 Multiprotocol Environments 199 17.3 Mixing Network Technologies 201 17.4 Dynamic Circuit Allocation 202 17.5 Encapsulation And Tunneling 203 -17.6 Tunneling Through An IP Internet 203 17.7 Application-Level Tunneling Between Clients And Servers 204 17.8 Tunneling, Encapsulation, And Dialup Phone Lines 205 17.9 Summary 206 Chapter 18 Application Level Gateways 18.1 Introduction 209 18.2 Clients And Servers In Constrained Environments 209 18.2.1 The Reality Of Multiple Technologies 209 18.2.2 Computers With Limited Functionality 210 18.2.3 Connectivity Constraints That Arise From Security 210 18.3 Using Application Gateways 211 18.4 Interoperability Through A Mail Gateway 212 18.5 Implementation Of A Mail Gateway 213 18.6 A Comparison Of Application Gateways And Tunneling 213 18.7 Application Gateways And Limited Functionality Systems 215 18.8 Application Gateways Used For Security 216 18.9 Application Gateways And The Extra Hop Problem 217 18.10 An Example Application Gateway 219 18.11 Implementation Of An Application Gateway 220 18.12 Code For The Application Gateway 221 18.13 An Example Gateway Exchange 223 18.14 Using Rfcd With UNIX's.forward 223 18.15 A General-Purpose Application Gateway 224 18.16 Operation Of SLIRP 224 18.17 How SURP Handles Connections 225 18.18 IP Addressing And SURP 225 18.19 Summary 226 Chapter 19 External Data Representation (XDR) 19.1 Introduction 229 19.2 Representations For Data In Computers 229 19.3 The N-Squared Conversion Problem 230 19.4 Network Standard Byte Order 231 19.5 A De Facto Standard External Data Representation 232 19.6 XDR Data Types 233 19.7, Implicit Types 234 19.8 Software Support For Using XDR 234 19.9 XDR Library Routines 234 19.10 Building A Message One Piece At A Time 234 19.11 Conversion Routines In The XDR Library 236 19.12 XDR Streams, 1/0, and TCP 238 19.13 Records, Record Boundaries, And Datagram 1/0 239 19.14 Summary 239 Chapter 20 Remote Procedure Call Concept (RPC) 20.1 Introduction 241 20.2 Remote Procedure Call Model 241 20.3 Two Paradigms For Building Distributed Programs 242 20.4 A Conceptual Model For Conventional Procedure Calls 243 20.5 An Extension Of the Procedural Model 243 20.6 Execution Of Conventional Procedure Call And Return 20.7 The Procedural Model In Distributed Systems 245 20.8 Analogy Between Client-Server And RPC 246 20.9 Distributed Computation As A Program 247 20.10 Sun Microsystems' Remote Procedure Call Definition 20.11 Remote Programs And Procedures 248 20.12 Reducing The Number Of Arguments 249 20.13 Identifying Remote Programs And Procedures 249 . 20.14 Accommodating Multiple Versions Of A Remote Program 250 20.15 Mutual Exclusion For Procedures In A Remote Program 251 20.16 Communication Semantics 252 20.17 At Least Once Senumtics 252 20.18 RPC Retransmission 253 20.19 Mapping A Remote Program To A Protocol Port 253 20.20 Dynamic Port Mapping 254 20.21 RPC Port Mapper Algorithm 255 20.22 ONC RPC Message Format 257 20.23 Marshaling Arguments For A Remote Procedure 258 20.24 Authentication 258 20.25 An Example Of RPC Message Representation 259 20.26 An Example Of The UNIX Authentication Field 260 20.27 Summary 261 244 248 Chapter 21 Distributed Program Generation (Rpcgen Concept) 21.1 Introduction 265 21.2 Using Remote Procedure Calls 266 21.3 Programming Mechanisms To Support RPC 267 21.4 Dividing A Program Into Local And Remote Procedures 268 21.5 Adding Code For RPC 269 21.6 Stub Procedures 269 21.7 Multiple Remote Procedures And Dispatching 270 21.8- Name Of The Client-Side Stub Procedure 271 21.9 Using Rpcgen To Generate Distributed Programs 272 21.10 Rpcgen Output And Interface Procedures 272 21.11 Rpcgen Input And Output 273 21.12 Using Rpcgen To Build A Client And Server 274 21.13 Summary 274 Chapter 22 Distributed Program Generation (Rpcgen Example) 22.1 Introduction 277 22.2 An Example To Illustrate Rpcgen 278 22.3 Dictionary Look Up 278 22.4 Eight Steps To A Distributed Application 279 22.5 Step '1: Build A Conventional Application Program 280 22.6 Step 2: Divide The Program Into Two Parts 284 22.7 Step 3: Create An Rpcgen Specification 290 22.8 Step 4: Run Rpcgen 292 22.9 The .h File Produced By Rpcgen 292 22.10 The XDR Conversion File Produced By Rpcgen 293 22.11 The Client Code Produced By Rpcgen 294 22.12 The Server Code Produced By Rpcgen 296 22.13 Step 5: Write Stub Interface Procedures 299 22.13.1 Client-Side Interface Routines 299 22.13.2 Server-Side Interface Routines 301 22.14 Step 6; Compile And Link The Client Program 303 22.15 Step 7: Compile And Link The Server Program 307 22.16 Step 8: Start The Server And Execute The Client 309 ,22.17 Using The UNIX Make Utility 309 22.18 Summary 311 Chapter 23 Network File System Concepts (NFS) 23.1 Introduction 315 23.2 Remote File Access Vs. Transfer 315 23.3 Operations On Remote Files 316 23.4 File Access Among Heterogeneous Computers 31.6 23.5 Stateless Servers 317 23.6 NFS And UNIX File Semantics 317 23.7 Review Of The UNIX File System 317 23.7.1 Basic Definitions 317 23.7.2 A Byte Sequence Without Record Boundaries 318 23.7.3 A File's Owner And Group Identifiers 318 23.7.4 Protection And Access 318 23.7.5 The Open-Read-Write-Close Paradigm 320 23.7.6 Data Transfer 321 23.7.7 Permission To Search A Directory 321 23.7.8 Random Access 321 23.7.9 Seeking Beyond The End Of File 322 23.7.10 File Position And Concurrent Access 323 23.7.11 Semantics Of Write During Concurrent Access 324 23.7.12 File Names And Paths 324 23.7.13 Inode: Information Stored With A File 325 23.7.14 Stat Operation 326 23.7:15 The File Naming Mechanism 327 23.7.16 File System Mounts 328 23.7.17 UNIX File Name Resolution 330 23.7. IS Symbolic Links 331 23.8 Files Under NFS 331 23.9 NFS File Types 332 23.10 NFS File Modes 332 23.11 NFS File Attributes 333 23.12 NFS Client And Server 334 23.13 NFS Client Operation 335 23.14 NFS Client And UNIX 336 23.15 NFS Mounts 337 23.16 File Handle 338 23.17 Handles Replace Path Names 338 23.18 An NFS Client In UNIX 340 23.19 File Positioning With A Stateless Server 340 23.20 Operations On Directories 341 23.21 Reading A Directory Statelessly 341 23.22 Multiple Hierarchies In An NFS Server 342 23.23 The Mount Protocol 342 23.24 Summary 343 Chapter 24 Network File System Protocol (NFS, Mount) 24.1 Introduction 345 24.2 Using RFC To Define A Protocol 345 24.3 Defining A Protocol With Data Structures And Procedures 346 24.4 NFS Constant, Type, And Data Declarations 347 24.4.1 NFS Constants 347 24.4.2 NFS Typedef Declarations 348 24.4.3 NFS Data Structures 348 24.5 NFS Procedures 350 24.6 Semantics Of NFS Operations 351 24.6.1 NFSPROC_NULL (Procedure 0) 352 24.6.2 NFSPROC_GETATTR (Procedure 1) 352 24.6.3 NFSPROC_SETATTR (Procedure 2) 352 24.6.4 NFSPROC_ROOT (Procedure 3) [Obsolete in NFS3] 352 24.6.5 NFSPROC_LOOKUP (Procedure 4) 352 24.6.6 NFSPR0C_READL1NK (Procedure 5) 352 24.6.7 NFSPROC_READ (Procedure 6) 352 24.6.8 NFSPR0C_WR1TECACHE (Procedure 7) [Obsolete in NFS3] 352 24.6.9 NFSPROCJVRITE (Procedure 8) 353 24.6.10 NFSPROCJCREATE (Procedure 9) 353 24.6.11 NFSPROC_REMOVE (Procedure 10) 353 24.6.12 NFSPROC_RENAME (Procedure 11) 353 24.6.13 NFSPROC_UNK (Procedure 12) 353 24.6.14 NFSPR0C_SYML1NK (Procedure 13) 353 24.6.15 NFSPR0C_MKD1R (Procedure 14) 354 24.6.16 NFSPR0C_RMD1R (Procedure 15) 354 24.6.17 NFSPR0C_READD1R (Procedure 16) 354 24.6.18 NFSPROC_STATFS (Procedure 17) 354 24.7 The Mount Protocol 355 24.7.1 Mount Constant Definitions 355 24.7.2 Mount Type Definitions 355 24.7.3 Mount Data Structures 356 24.8 Procedures In The Mount Protocol 357 24.9 Semantics of Mount Operations 357 24.9.1 MNTPROC_NULL (Procedure 0) 357 24.9.2 MNTPROC_MNT (Procedure 1) 357 24.9.3 MNTPROC_DUMP (Procedure 2) 358 24.9.4 MNTPROC_UMNT (Procedure 3) 358 24.9.5 MNTPROCJJMNTALL (Procedure 4) 358 24.9.6 MNTPR0C_EXP0RT (Procedure 5) 358 24.10 NFS And Mount Authentication 358 24.11 Changes In NFS Version 3 360 24.12 Summary 361 Chapter 25 A TELNET Client (Program Structure) 25.1 Introduction 363 25.2 Overview 364 25.2.1 The User's Terminal 364 25.2.2 Command Arul Control Information 364 25.2.3 Terminals, Windows, and Files 364 25.2.4 The Need For Concurrency 365 25.2.5 A Process Model For A TELNET Client 366 25.3 A TELNET Client Algorithm 366 25.4 Terminal 1/0 In UNIX 367 25.4.1 Controlling A Device Driver 368 25.5 Establishing Terminal Modes 369 25.6 Global Variable Used For Stored State 371 25.7 Restoring Terminal Modes Before Exit 372 25.8 Client Suspension And Resumption 373 25.9 Finite State Machine Specification 374 25.10 Embedding Commands In A TELNET Data Stream 375 25.11 Option Negotiation 376 25.12 Request/Offer Symmetry 376 25.13 TELNET Character Definitions 376 25.14 A Finite State Machine For Data From The Server 378 25.15 Transitions Among States 379 25.16 A Finite State Machine Implementation 381 25.17 A Compact FSM Representation 381 25.18 Keeping The Compact Representation At Run-Time 383 25.19 Implementation Of A Compact Representation 383 25.20 Building An FSM Transition Matrix 385 25.21 The Socket Output Finite State Machine 387 25.22 Definitions For The Socket Output FSM 390 25.23 The Option Subnegotiation Finite State Machine 391 25.24 Definitions For The Option Subnegotiation FSM 392 25.25 FSM Initialization 393 25.26 Arguments For The TELNET Client 394 25.27 The Hfart Of The TELNET Client 395 25.28 Implementation Of The Main FSM 399 25.29 Surhmary 401 Chapter 26 A TELNET Client (Implementation Details) 26.1 Introduction 403 26.2 The FSM Action Procedures 403 26.3 Recording The Type Of An Option Request 404 26.4 Performing No Operation 405 26.5 Responding To WILL/WONT For The Echo Option 405 26.6 Responding To WILL/WONT For Unsupported Options 407 26.7 Responding To WILL/WONT For The No Go-Ahead Option 407 26.8 Generating DO/DONT For Binary Transmission 409 26.9 Responding To DO/DONT For Unsupported Options 410 26.10- Responding To DO/DONT For Transmit Binary Option 410 26.11 Responding To DO/DONT For The Terminal Type Option 412 26.12 Option Subnegotiation 413 26.13 Sending Terminal Type Information 414 26.14 Terminating Subnegotiation 416 26.15 Sending A Character To The Server 416 26.16 Displaying Incoming Data On The User's Terminal 418 26.17 Using Termcap To Control The User's Terminal 421 26.18 Writing A Block Of Data To The Server 422 26.19 Interacting With The Client Process 424 26.20 Responding To Illegal Commands 424 26.21 Scripting To A File 425 26.22 Implementation Of Scripting 425 26.23 Initialization Of Scripting 426 26.24 Collecting Characters Of The Script File Name 427 26.25 Opening A Script File 428 26.26 Terminating Scripting 430 26.27 Printing Status Information 431 26.28 Summary 432 Chapter 27 Practical Hints And Techniques For UNIX Servers 27.7 Introduction 435 27.2 Operating In Background 435 27.3 Programming A Server To Operate In Background 436 27.4 Open Descriptors And Inheritance 437 27.5 Programming A Server To Close Inherited Descriptors 438 27.6 Signals From The Controlling TTY 438 27.7 Programming A Server To Change Its Controlling TTY 438 27.8. Moving To A Safe And Known Directory 439 27.9 Programming A Server To Change Directories 439 27.10 The UNIX Umask 440 27.11 Programming A Server To Set Its Umask 440 27.72 Process Groups 440 27.13 Programming A Server To Set Its Process Group 441 27.14 Descriptors For Standard I/O 441 27.15 Programming A Server To Open Standard Descriptors 441 27.16 Mutual Exclusion For The Server 442 27.17 Programming A Server To Avoid Multiple Copies 442 27.18 Recording A Server's Process ID 443 27.19 Programming A Server To Record Its Process ID 443 27.20 Waiting For A Child Process To Exit 444 27.21 Programming A Server To Wait For Each Child To Exit 444 27.22 Extraneous Signals 444 27.23 Programming A Server To Ignore Extraneous Signals 445 27.24 Using A System Log Facility 445 27.24.1 Generating Log Messages 445 27.24.2 The Advantage Of Indirection And Standard Error 445 27.24.3 Limitations Of 1/0 Redirection 446 27.24.4 A Client-Server Solution 446 27.24.5 The Syslog Mechanism 447 27.24.6 Syslog Message Classes 447 27.24.7 Syslog Facilities 447 27.24.8 Syslog Priority Levels 448 27.24.9 Using Syslog 448 27.24.10An Example Syslog Configuration File 449 27.25 Summary 450 Chapter 28 Deadlock And Starvation In Client-Server Systems • 28.1 Introduction 453 28.2 Definition Of Deadlock 454 28.3 Difficulty Of Deadlock Detection 454 28.4 Deadlock Avoidance 455 28.5 Deadlock Between A Client And Server 455 28.6 Avoiding Deadlock In A Single Interaction 456 28.7 Starvation Among A Set Of Clients And A Server 456 28.8 Busy Connections And Starvation 457 25.9 Avoiding Blocking Operations 458 28.10 Processes, Connections, And Other Limits 458 28.11 Cycles Of Clients And Servers 459 28.12 Documenting Dependencies 459 28.13 Summary 460
Tags from this library: No tags from this library for this title. Log in to add tags.
Star ratings
    Average rating: 0.0 (0 votes)
Holdings
Item type Current library Call number Status Date due Barcode Item holds
General Books General Books Central Library, Sikkim University
General Book Section
004.6 COM/I (Browse shelf(Opens below)) Available P33349
Total holds: 0

Vols. 2-3 by Douglas E. Comer and David L. Stevens.

Includes bibliographical references and indexes.

Chapter 1 Introduction And Overview
1.1 Use Of TCP/IP
1.2 Designing Applications For A Distributed Environment
1.3 Standard And Nonstandard Application Protocols
1.4 An Example Of Standard Application Protocol Use
1.5 An Example Connection
1.6 Using TELNET To Access An Alternative Service
1.7 Application Protocols And Software Flexibility
1.8 Viewing Services From The Provider's Perspective
1.9 The Remainder Of This Text
Chapter 2 The Client Server Model And Software Design
2.1 Introduction
2.2 Motivation
2.3 Terminology And Concepts -
2.3.1 Clients And Servers
2.3.2 Privilege And Complexity
2.3.3 Standard Vs. Nonstandard Client Software
2.3.4 Parameterization Of Clients
2.3.5 Connectionless Vs. Connection-Oriented Servers
2.3.6 Stateless Vs. Stateful Servers
2.3.7 A Stateful File Server Example
2.3.8 Statelessness Is A Protocol Issue
2.3.9 Servers As Clients
Chapter 3 Concurrent Processing In Client-Server Software
3.1 Introduction
3.2 Concurrency In Networks
3.3 Concurrency In Servers
3.4 Terminology And Concepts
3.4.1 The Process Concept
3.4.2 Programs vs. Processes
3.4.3 Procedure Calls
3.5 An Example Of Concurrent Process Creation
3.5.1 A Sequential C Example
3.5.2 A Concurrent Version
3.5.3 Timeslicing
. 3.5.4 Making Processes Diverge
3.6 Executing New Code
3.7 Context Switching And Protocol Software Design
3.8 Concurrency And Asynchronous 1/0
Chapter 4 Program Interface To Protocols
4.1 Introduction
4.2 Loosely Specified Protocol Software Interface
4.2.1 Advantages And Disadvantages
4.3 Interface Functionality
4.4 Conceptual Interface Specification
4.5 System Calls
4.6 Two Basic Approaches To Network Communication
4.7 The Basic I/O Functions Available In UNIX
4.8 Using UNIX I/O With TCP/IP
Chapter 5 The Socket Interface
5.1 Introduction
5.2 Berkeley Sockets
5.3 Specifying A Protocol Interface
5.4 The Socket Abstraction 45
5.4.1 Socket Descriptors And File Descriptors 45
5.4.2 System Data Structures For Sockets 46
5.4.3 Using Sockets 47
5.5 Specifying An Endpoint Address 47
5.6 A Generic Address Structure 48
5.7 Major System Calls Used With Sockets 49
5.7.1 The Socket Call 49
5.7.2 The Connect Call 50
5.7.3 The Write Call 50
5.7.4 The Read Call 50
5.7.5 The Close Call 50
5.7.6 The Bind Call 51
5.7.7 The Listen Call 51
5.7.8 The Accept Call 51
5.7.9 Summary Of Socket Calls Used With TCP 51
5.8 Utility Routines For Integer Conversion 52
5.9 Using Socket Calls In A Program 53
5.10 Symbolic Constants For Socket Call Parameters 54
5.11 Summary 54
Chapter 6 Algorithms And Issues In Client Software Design
• 6.1 Introduction 57
6.2 Learning Algorithms Instead Of Details 57
6.3 Client Architecture 58
6.4 Identifying The Location Of A Server 58
6.5 Parsing An Address Argument 60
6.6 Looking Up A Domain Name 61
§.7 Looking Up A Well-Known Port By Name 62
6.8 Port Numbers And Network Byte Order 62
6.9 Looking Up A Protocol By Name 63
6.10 The TCP Client Algorithm 63
6.11 Allocating A Socket 64
6.12 Choosing A Local Protocol Port Number 65
6.13 A Fundamental Problem In Choosing A Local IP Address 65
6.14 Connecting A TCP Socket To A Server 66
6.15 Communicating With The Server Using TCP 66
6.16 Reading A Response From A TCP Connection 67
6.17 Closing A TCP Connection 68
6./»7.7 The Need For Partial Close 68
6.17.2 A Partial Close Operation 68
6.18 Programming A UDP Client 69
6.19 Connected And Unconnected UDP Sockets 69
6.20 Using Connect With UDP 70
6.21 Communicating With A Server Using UDP 70
6.22 Closing A Socket That Uses UDP 70
6.23 Partial Close For UDP 71
6.24 A Warning About UDP Unreliability 71
6.25 -Summary 71
Chapter 7 Example Client Software
7.1 Introduction 75
7.2 The Importance Of Small Examples 75
7.3 Hiding Details 76
7.4 An Example ^ocedure Library For Client Programs 76
7.5 Implementation Of ConnectTCP 77
7.6 Iihplementation Of ConnectUDP 78
7.7 A Procedure That Forms Connections 79
7.8 Using The Example Library 81
7.9 The DAYTIME Service 82
7.10 Implementation Of A TCP Client For DAYTIME 82
7.11 Reading From A TCP Connection 84
7.72 The TIME Service 84
7.13 Accessing The TIME Service 85
7.14 Accurate Times And Network Delays 85
7.75 A UDP Client For The TIME Service 86
7.76 The ECHO Service 88
7.77 A TCP Client For The ECHO Service 88
7.18 A UDP Client For The ECHO Service 90
7.79 Summary 92
Chapter 8 Algorithms And Issues In Server Software Design
8.7 IntradubtioH 95 ,
8.2 The Conceptual Server Algorithm 95
8.3 Concurrent Vs. Iterative.Servers 96 ■
8.4 Connection-Oriented Vs. Connectionless Access 96
8.5 Connection-Oriented Servers 97
8.6 Connectionless Servers 91 '
8.7 Failure, Reliability, And Statelessness 98
8.8 Optimizing Stateless Servers 99
8.9 Four Basic Types Of Servers 101
8.10 Request Processing Time 102
8.11 Iterative Server Algorithms 102
8.12 An Iterative, Connection-Oriented Server Algorithm 103
8.13 Binding To A Well-Known Address Using 1NADDR_ANY 103
8.14 Placing The Socket In Passive Mode 104
8.15 Accepting Connections And Using Them 104
8.16 An Iterative, Connectionless Server Algorithm 104
8.17 Forming A Reply Address In A Connectionless Server 105
8.18 Concurrent Server Algorithms 106
8.19 Master And Slave Processes 106
8.20 A Concurrent, Connectionless Server Algorithm 107
8.21 A Concurrent, Connection-Oriented Server Algorithm 107
8.22 Using Separate Programs As Slaves 108
8.23 Apparent Concurrency Using A Single Process 109
8.24 When To Use Each Server Type 110
8.25 A Summary of Server Types 111
8.26 The Important Problem Of Server Deadlock 112
8.27 Alternative Implementations 112
8.28 Summary 113
Chapter 9 Iterative. Connectionless Servers (UDP)
9.1 Introduction 115
9.2 Creating A Passive Socket 115
9.3 Process Structure 119
9.4 An Example TIME Server 119
9.5 Summary 121
Chapter 10 iterative, Connection-Oriented Servers (TCP)
10.1 Introduction 123
10.2 Allocating A Passive TCP Socket 123
10.3 A Server For The DAYTIME Service 124
10.4 Process Structure 124
10.5 An Example DAYTIME Server 125
10.6 Closing Connections 128
10.7 Connection Termination And Server Vulnerability 128
10.8 Summary 129
Chapter 11 Concurrent, Connection-Oriented Servers (TCP)
77.7 Introduction 131
77.2 Concurrent ECHO 131
11.3 Iterative Vs. Concurrent Implementations 132
11.4 Process Structure 132
77.5 An Example Concurrent ECHO Server 133
11.6 -Cleaning Up Errant Processes 137
77.7 Summary 138
Chapter 12 Single-Process, Concurrent Servers (TCP)
72.7 Introduction 139
72.2 Data-driven Processing In A Server 139
12.3 Data-Driven Processing With A Single Process 140
12.4 Process Structure Of A Single-Process Server 141
12.5 An.Example Single-Process ECHO Server 142
72.6 Summary 144
Chapter 13 Multiprotocol Servers (TCP, UDP)
75.7 Introduction 147
13.2 The Motivation For Reducing The Number Of Servers 147
13.3 Multiprotocol Server Design 148
13.4 Process Structure 148
13.5 An Example Multiprotocol DAYTIME Server 149
13.6 The Concept Of Shared Code 153
13.7 Concurrent Multiprotocol Servers 153
13.8 Summary 153
Chapter 14 Multiservice Servers (TCP, UDP)
14.1 Introduction 155
14.2 Consolidating Servers 155
14.3 A Connectionless, Multiservice Server Design 156
14.4 A Connection-Oriented, Multiservice Server Design 157
14.5 A Concurrent, Connection-Oriented, Multiservice Server 158
14.6 A Single-Process, Multiservice Server Implementation 158
14.7 Invoking Separate Programs From A Multiservice Server 159
14.8 Multiservice, Multiprotocol Designs 160
14.9 An Example Multiservice Server 161
14.10 Static and Dynamic Server Configuration 168
14.11 The UNIX Super Server, Inetd 169
14.12 An Example Inetd Server 171
14.13 Summary 173
Chapter 15 Uniform, Efficient Management Of Server Concurrency
15.1 Introduction 175
15.2 Choosing Between An Iterative And A Concurrent Design 175
15.3 Level Of Concurrency 176
15.4 Demand-Driven Concurrency 177
15.5 The Cost Of Concurrency 177
15.6 Overhead And Delay 177
15.7 Small Delays Can Matter 178
15.8 Process Preallocation 179
15.8.1 Preallocation In UNIX 180
15.8.2 Preallocation In A Connection-Oriented Server 180
15.8.3 Preallocation In A Connectionless Server 181
15.8.4 Preallocation, Bursty Traffic, And NFS 182
15.8.5 Process Preallocatipn On A Multiprocessor 183
15.9 Delayed Process Allocation 183
15.10 The Uniform Basis For Both Techniques 184
15.11 Combining Techniques 185
15.12 Summary 185-
Chapter 16 Concurrency in Clients
16.1 Introduction 187
16.2 The Advantages Of Concurrency 187
16.3 The Motivation For Exercising Control 188
16.4 Concurrent Contact With Multiple Servers 189
16.5 Implementing Concurrent Clients 189
16.6 Single-Process Implementations 191
16.7 An Example Concurrent Client That Uses ECHO 192
16.8- Execution Of The Concurrent Client 196
16.9 Concurrency In The Example Code 197
16.10 Summary 198
Chapter 17 Tunneling At The Transport And Application Levels
17.1 Introduction 199
17.2 Multiprotocol Environments 199
17.3 Mixing Network Technologies 201
17.4 Dynamic Circuit Allocation 202
17.5 Encapsulation And Tunneling 203
-17.6 Tunneling Through An IP Internet 203
17.7 Application-Level Tunneling Between Clients And Servers 204
17.8 Tunneling, Encapsulation, And Dialup Phone Lines 205
17.9 Summary 206
Chapter 18 Application Level Gateways
18.1 Introduction 209
18.2 Clients And Servers In Constrained Environments 209
18.2.1 The Reality Of Multiple Technologies 209
18.2.2 Computers With Limited Functionality 210
18.2.3 Connectivity Constraints That Arise From Security 210
18.3 Using Application Gateways 211
18.4 Interoperability Through A Mail Gateway 212
18.5 Implementation Of A Mail Gateway 213
18.6 A Comparison Of Application Gateways And Tunneling 213
18.7 Application Gateways And Limited Functionality Systems 215
18.8 Application Gateways Used For Security 216
18.9 Application Gateways And The Extra Hop Problem 217
18.10 An Example Application Gateway 219
18.11 Implementation Of An Application Gateway 220
18.12 Code For The Application Gateway 221
18.13 An Example Gateway Exchange 223
18.14 Using Rfcd With UNIX's.forward 223
18.15 A General-Purpose Application Gateway 224
18.16 Operation Of SLIRP 224
18.17 How SURP Handles Connections 225
18.18 IP Addressing And SURP 225
18.19 Summary 226
Chapter 19 External Data Representation (XDR)
19.1 Introduction 229
19.2 Representations For Data In Computers 229
19.3 The N-Squared Conversion Problem 230
19.4 Network Standard Byte Order 231
19.5 A De Facto Standard External Data Representation 232
19.6 XDR Data Types 233
19.7, Implicit Types 234
19.8 Software Support For Using XDR 234
19.9 XDR Library Routines 234
19.10 Building A Message One Piece At A Time 234
19.11 Conversion Routines In The XDR Library 236
19.12 XDR Streams, 1/0, and TCP 238
19.13 Records, Record Boundaries, And Datagram 1/0 239
19.14 Summary 239
Chapter 20 Remote Procedure Call Concept (RPC)
20.1 Introduction 241
20.2 Remote Procedure Call Model 241
20.3 Two Paradigms For Building Distributed Programs 242
20.4 A Conceptual Model For Conventional Procedure Calls 243
20.5 An Extension Of the Procedural Model 243
20.6 Execution Of Conventional Procedure Call And Return
20.7 The Procedural Model In Distributed Systems 245
20.8 Analogy Between Client-Server And RPC 246
20.9 Distributed Computation As A Program 247
20.10 Sun Microsystems' Remote Procedure Call Definition
20.11 Remote Programs And Procedures 248
20.12 Reducing The Number Of Arguments 249
20.13 Identifying Remote Programs And Procedures 249 .
20.14 Accommodating Multiple Versions Of A Remote Program 250
20.15 Mutual Exclusion For Procedures In A Remote Program 251
20.16 Communication Semantics 252
20.17 At Least Once Senumtics 252
20.18 RPC Retransmission 253
20.19 Mapping A Remote Program To A Protocol Port 253
20.20 Dynamic Port Mapping 254
20.21 RPC Port Mapper Algorithm 255
20.22 ONC RPC Message Format 257
20.23 Marshaling Arguments For A Remote Procedure 258
20.24 Authentication 258
20.25 An Example Of RPC Message Representation 259
20.26 An Example Of The UNIX Authentication Field 260
20.27 Summary 261
244
248
Chapter 21 Distributed Program Generation (Rpcgen Concept)
21.1 Introduction 265
21.2 Using Remote Procedure Calls 266
21.3 Programming Mechanisms To Support RPC 267
21.4 Dividing A Program Into Local And Remote Procedures 268
21.5 Adding Code For RPC 269
21.6 Stub Procedures 269
21.7 Multiple Remote Procedures And Dispatching 270
21.8- Name Of The Client-Side Stub Procedure 271
21.9 Using Rpcgen To Generate Distributed Programs 272
21.10 Rpcgen Output And Interface Procedures 272
21.11 Rpcgen Input And Output 273
21.12 Using Rpcgen To Build A Client And Server 274
21.13 Summary 274
Chapter 22 Distributed Program Generation (Rpcgen Example)
22.1 Introduction 277
22.2 An Example To Illustrate Rpcgen 278
22.3 Dictionary Look Up 278
22.4 Eight Steps To A Distributed Application 279
22.5 Step '1: Build A Conventional Application Program 280
22.6 Step 2: Divide The Program Into Two Parts 284
22.7 Step 3: Create An Rpcgen Specification 290
22.8 Step 4: Run Rpcgen 292
22.9 The .h File Produced By Rpcgen 292
22.10 The XDR Conversion File Produced By Rpcgen 293
22.11 The Client Code Produced By Rpcgen 294
22.12 The Server Code Produced By Rpcgen 296
22.13 Step 5: Write Stub Interface Procedures 299
22.13.1 Client-Side Interface Routines 299
22.13.2 Server-Side Interface Routines 301
22.14 Step 6; Compile And Link The Client Program 303
22.15 Step 7: Compile And Link The Server Program 307
22.16 Step 8: Start The Server And Execute The Client 309
,22.17 Using The UNIX Make Utility 309
22.18 Summary 311
Chapter 23 Network File System Concepts (NFS)
23.1 Introduction 315
23.2 Remote File Access Vs. Transfer 315
23.3 Operations On Remote Files 316
23.4 File Access Among Heterogeneous Computers 31.6
23.5 Stateless Servers 317
23.6 NFS And UNIX File Semantics 317
23.7 Review Of The UNIX File System 317
23.7.1 Basic Definitions 317
23.7.2 A Byte Sequence Without Record Boundaries 318
23.7.3 A File's Owner And Group Identifiers 318
23.7.4 Protection And Access 318
23.7.5 The Open-Read-Write-Close Paradigm 320
23.7.6 Data Transfer 321
23.7.7 Permission To Search A Directory 321
23.7.8 Random Access 321
23.7.9 Seeking Beyond The End Of File 322
23.7.10 File Position And Concurrent Access 323
23.7.11 Semantics Of Write During Concurrent Access 324
23.7.12 File Names And Paths 324
23.7.13 Inode: Information Stored With A File 325
23.7.14 Stat Operation 326
23.7:15 The File Naming Mechanism 327
23.7.16 File System Mounts 328
23.7.17 UNIX File Name Resolution 330
23.7. IS Symbolic Links 331
23.8 Files Under NFS 331
23.9 NFS File Types 332
23.10 NFS File Modes 332
23.11 NFS File Attributes 333
23.12 NFS Client And Server 334
23.13 NFS Client Operation 335
23.14 NFS Client And UNIX 336
23.15 NFS Mounts 337
23.16 File Handle 338
23.17 Handles Replace Path Names 338
23.18 An NFS Client In UNIX 340
23.19 File Positioning With A Stateless Server 340
23.20 Operations On Directories 341
23.21 Reading A Directory Statelessly 341
23.22 Multiple Hierarchies In An NFS Server 342
23.23 The Mount Protocol 342
23.24 Summary 343
Chapter 24 Network File System Protocol (NFS, Mount)
24.1 Introduction 345
24.2 Using RFC To Define A Protocol 345
24.3 Defining A Protocol With Data Structures And Procedures 346
24.4 NFS Constant, Type, And Data Declarations 347
24.4.1 NFS Constants 347
24.4.2 NFS Typedef Declarations 348
24.4.3 NFS Data Structures 348
24.5 NFS Procedures 350
24.6 Semantics Of NFS Operations 351
24.6.1 NFSPROC_NULL (Procedure 0) 352
24.6.2 NFSPROC_GETATTR (Procedure 1) 352
24.6.3 NFSPROC_SETATTR (Procedure 2) 352
24.6.4 NFSPROC_ROOT (Procedure 3) [Obsolete in NFS3] 352
24.6.5 NFSPROC_LOOKUP (Procedure 4) 352
24.6.6 NFSPR0C_READL1NK (Procedure 5) 352
24.6.7 NFSPROC_READ (Procedure 6) 352
24.6.8 NFSPR0C_WR1TECACHE (Procedure 7) [Obsolete in NFS3] 352
24.6.9 NFSPROCJVRITE (Procedure 8) 353
24.6.10 NFSPROCJCREATE (Procedure 9) 353
24.6.11 NFSPROC_REMOVE (Procedure 10) 353
24.6.12 NFSPROC_RENAME (Procedure 11) 353
24.6.13 NFSPROC_UNK (Procedure 12) 353
24.6.14 NFSPR0C_SYML1NK (Procedure 13) 353
24.6.15 NFSPR0C_MKD1R (Procedure 14) 354
24.6.16 NFSPR0C_RMD1R (Procedure 15) 354
24.6.17 NFSPR0C_READD1R (Procedure 16) 354
24.6.18 NFSPROC_STATFS (Procedure 17) 354
24.7 The Mount Protocol 355
24.7.1 Mount Constant Definitions 355
24.7.2 Mount Type Definitions 355
24.7.3 Mount Data Structures 356
24.8 Procedures In The Mount Protocol 357
24.9 Semantics of Mount Operations 357
24.9.1 MNTPROC_NULL (Procedure 0) 357
24.9.2 MNTPROC_MNT (Procedure 1) 357
24.9.3 MNTPROC_DUMP (Procedure 2) 358
24.9.4 MNTPROC_UMNT (Procedure 3) 358
24.9.5 MNTPROCJJMNTALL (Procedure 4) 358
24.9.6 MNTPR0C_EXP0RT (Procedure 5) 358
24.10 NFS And Mount Authentication 358
24.11 Changes In NFS Version 3 360
24.12 Summary 361
Chapter 25 A TELNET Client (Program Structure)
25.1 Introduction 363
25.2 Overview 364
25.2.1 The User's Terminal 364
25.2.2 Command Arul Control Information 364
25.2.3 Terminals, Windows, and Files 364
25.2.4 The Need For Concurrency 365
25.2.5 A Process Model For A TELNET Client 366
25.3 A TELNET Client Algorithm 366
25.4 Terminal 1/0 In UNIX 367
25.4.1 Controlling A Device Driver 368
25.5 Establishing Terminal Modes 369
25.6 Global Variable Used For Stored State 371
25.7 Restoring Terminal Modes Before Exit 372
25.8 Client Suspension And Resumption 373
25.9 Finite State Machine Specification 374
25.10 Embedding Commands In A TELNET Data Stream 375
25.11 Option Negotiation 376
25.12 Request/Offer Symmetry 376
25.13 TELNET Character Definitions 376
25.14 A Finite State Machine For Data From The Server 378
25.15 Transitions Among States 379
25.16 A Finite State Machine Implementation 381
25.17 A Compact FSM Representation 381
25.18 Keeping The Compact Representation At Run-Time 383
25.19 Implementation Of A Compact Representation 383
25.20 Building An FSM Transition Matrix 385
25.21 The Socket Output Finite State Machine 387
25.22 Definitions For The Socket Output FSM 390
25.23 The Option Subnegotiation Finite State Machine 391
25.24 Definitions For The Option Subnegotiation FSM 392
25.25 FSM Initialization 393
25.26 Arguments For The TELNET Client 394
25.27 The Hfart Of The TELNET Client 395
25.28 Implementation Of The Main FSM 399
25.29 Surhmary 401
Chapter 26 A TELNET Client (Implementation Details)
26.1 Introduction 403
26.2 The FSM Action Procedures 403
26.3 Recording The Type Of An Option Request 404
26.4 Performing No Operation 405
26.5 Responding To WILL/WONT For The Echo Option 405
26.6 Responding To WILL/WONT For Unsupported Options 407
26.7 Responding To WILL/WONT For The No Go-Ahead Option 407
26.8 Generating DO/DONT For Binary Transmission 409
26.9 Responding To DO/DONT For Unsupported Options 410
26.10- Responding To DO/DONT For Transmit Binary Option 410
26.11 Responding To DO/DONT For The Terminal Type Option 412
26.12 Option Subnegotiation 413
26.13 Sending Terminal Type Information 414
26.14 Terminating Subnegotiation 416
26.15 Sending A Character To The Server 416
26.16 Displaying Incoming Data On The User's Terminal 418
26.17 Using Termcap To Control The User's Terminal 421
26.18 Writing A Block Of Data To The Server 422
26.19 Interacting With The Client Process 424
26.20 Responding To Illegal Commands 424
26.21 Scripting To A File 425
26.22 Implementation Of Scripting 425
26.23 Initialization Of Scripting 426
26.24 Collecting Characters Of The Script File Name 427
26.25 Opening A Script File 428
26.26 Terminating Scripting 430
26.27 Printing Status Information 431
26.28 Summary 432
Chapter 27 Practical Hints And Techniques For UNIX Servers
27.7 Introduction 435
27.2 Operating In Background 435
27.3 Programming A Server To Operate In Background 436
27.4 Open Descriptors And Inheritance 437
27.5 Programming A Server To Close Inherited Descriptors 438
27.6 Signals From The Controlling TTY 438
27.7 Programming A Server To Change Its Controlling TTY 438
27.8. Moving To A Safe And Known Directory 439
27.9 Programming A Server To Change Directories 439
27.10 The UNIX Umask 440
27.11 Programming A Server To Set Its Umask 440
27.72 Process Groups 440
27.13 Programming A Server To Set Its Process Group 441
27.14 Descriptors For Standard I/O 441
27.15 Programming A Server To Open Standard Descriptors 441
27.16 Mutual Exclusion For The Server 442
27.17 Programming A Server To Avoid Multiple Copies 442
27.18 Recording A Server's Process ID 443
27.19 Programming A Server To Record Its Process ID 443
27.20 Waiting For A Child Process To Exit 444
27.21 Programming A Server To Wait For Each Child To Exit 444
27.22 Extraneous Signals 444
27.23 Programming A Server To Ignore Extraneous Signals 445
27.24 Using A System Log Facility 445
27.24.1 Generating Log Messages 445
27.24.2 The Advantage Of Indirection And Standard Error 445
27.24.3 Limitations Of 1/0 Redirection 446
27.24.4 A Client-Server Solution 446
27.24.5 The Syslog Mechanism 447
27.24.6 Syslog Message Classes 447
27.24.7 Syslog Facilities 447
27.24.8 Syslog Priority Levels 448
27.24.9 Using Syslog 448
27.24.10An Example Syslog Configuration File 449
27.25 Summary 450
Chapter 28 Deadlock And Starvation In Client-Server Systems
• 28.1 Introduction 453
28.2 Definition Of Deadlock 454
28.3 Difficulty Of Deadlock Detection 454
28.4 Deadlock Avoidance 455
28.5 Deadlock Between A Client And Server 455
28.6 Avoiding Deadlock In A Single Interaction 456
28.7 Starvation Among A Set Of Clients And A Server 456
28.8 Busy Connections And Starvation 457
25.9 Avoiding Blocking Operations 458
28.10 Processes, Connections, And Other Limits 458
28.11 Cycles Of Clients And Servers 459
28.12 Documenting Dependencies 459
28.13 Summary 460

There are no comments on this title.

to post a comment.
SIKKIM UNIVERSITY
University Portal | Contact Librarian | Library Portal

Powered by Koha