Chapter 15

Application Layer and Client­Server Model

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

CONTENTS CONTENTS

•  CLIENT­SERVER MODEL •  CONCURRENCY •  PROCESSES

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­1

Comparison between OSI and TCP/IP

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

15.115.1

CLIENT-SERVER MODEL

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­2

Client-server model

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­3

Client-server relationship

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

15.215.2

CONCURRENCY

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­4

Server types

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­5

Connectionless iterative server

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­6

Connection-oriented concurrent server

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

15.315.3

PROCESSES

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­7

Programs and processes

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  14­8

Prototype for the getpid function

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­9

A program that prints its own processid

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  14­10

Prototype for the fork function

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  14­11

A program with one parent and one child

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­12

A program with two fork functions

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­13

The output of the program in Figure 15.12

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­14

A program that prints the processids of the parent and the child

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000

Figure  15­15 Example of a server program with parent and child processes

McGraw­Hill ©The McGraw­Hill Companies, Inc., 2000