You are on page 1of 134

Chapter 1

Distributed Systems

Topics To Be Covered
Definition Of Distributed Systems, Network Systems, And
Middleware
Network Topologies And Features
ISO/OSI Network Protocol And TCP/IP Protocol
Distributed Computing Models
Client/Server Model
Network Operating Systems vs. Distributed Operating Systems
Parallel (Distributed) System Architectures
2

Definition Of Distributed Systems


What Is A Distributed System?
- A Collection Of Homogeneous Computers + A Network
- A Collection Of Independent Computers Appearing As A
Single System
- Tightly Coupled From Software Perspective
- The Computers Cooperate To Perform A Specific Task
- A Distributed Operating System (DTOS) Runs On Top Of The
Computers
3

Distributed Systems (Cont'd)


General Architecture
machine A

machine B

machine C

Distributed Applications

Distributed Operating System Services

kernel

kernel

kernel

Distributed Systems (Cont'd)


A Distributed Operating System (DTOS) Contains A Microkernel On Bottom
And A Collection Of System Management Components On Top
The Two Entities Work Together And Support The Global System's Goal Of
Integrating All Network-Connected Resources
The Two Entities Also Process Functionality Into An Efficient, Available,
And Unified System
The Integration Of Individual Nodes Into A Global System Is Referred To As
Transparency Or Single System Image
Transparency Describes The Illusion Provided To Users Of The Global
System's Appearance As A Singular And Local Computational Entity
5

Examples Of Distributed Applications


Distributed Database Systems
Distributed Transaction Systems

Distributed Database
A Distributed Database Consists Of Two Or More
Data Files Located At Different Sites On A Computer
Network
So Different Users Can Access It Without Interfering
With One Another
But The DBMS Must Periodically Synchronize The
Scattered Databases To Make Sure That They All
Have Consistent Data
7

Distributed Transactions
A Distributed Transaction Includes One Or More Statements
That Update Data On Two Or More Distinct Nodes Of A
Distributed Database

Distributed Transactions (Cont'd)


An Example: Scott Updates The Local Sales Database, The
Remote HQ Database, And The Remote MAINT
Database
UPDATE scott.dept
SET loc = 'REDWOOD STORES'
WHERE deptno = 10;
UPDATE scott.emp
SET deptno = 11
WHERE deptno = 10;
UPDATE scott.bldg
SET room = 1225
WHERE room = 1163;
COMMIT;
9

Distributed Systems (Cont'd)


An

Example: A Network Of Workstations In Department Of


Computer Science

- Each User Has A PC


- There Is Also A Pool Of Processors In A Machine Room
- There Is A Single File System
* All Users Have The Same View Of The File System (e.g. Same
Pathname, etc.)

- A Command Typed Can Be Executed Locally, On Another Remote PC, Or


On A Processor In The Pool
* This Is Hidden From The User
10

Definition Of Network Systems


What Is A Network System?
- A Collection Of Heterogeneous Computers + A
Network
- The Computers Do Not Necessarily Cooperate To
Perform A Specific Task
- A Network Operating System (NOS) Runs On Top
Of The Computers
11

Network Systems (Cont'd)


General Architecture
machine A

machine B

machine C

Distributed Applications
NOS
services

NOS
services

NOS
services

kernel

kernel

kernel

12

Network Systems (Cont'd)


A Network Operating System (NOS) Is A Software That Enhances A Basic
Operating System By Adding Networking Features
So An NOS Is An Operating System That Includes Special
For Connecting Computers And Devices Into A LAN

Functions

Some Examples
- UNIX /Linux
- Mac OS
- Novell Netware
- Microsoft Windows Server
- Microsoft Windows Vista/7/8

13

Novell Netware
Netware Is A Network Operating System Developed By Novell, Inc.
It Evolved From A Simple Concept: File Sharing (High Level)
(Low Level)

Instead Of Disk Sharing

- Disk Sharing (Disk Service Model (Comes Back For SANs)) (Block Level)
* Read First Block Of Directory
* Continue Reading Subsequent Directory Blocks Until The Directory Block
File Is Found
* Read Through Multiple File Entry Blocks Until The Block Containing The
* Read The Desired Data Block

Containing The Information On The Desired


Location Of The Desired File Block Is Found

- File Sharing (File Service Model (Contemporary Technique)) (File Level)


* Send an "Open File" Request
* Send A Request (e.g. READ) For The Desired Data From The File

14

The Scott Example Revisited


The Example: Scott Updates The Local Sales Database, The
Remote HQ Database, And The Remote
MAINT Database
UPDATE scott.dept@hq.us.acme.com
SET loc = 'REDWOOD STORES'
WHERE deptno = 10;
UPDATE scott.emp
SET deptno = 11
WHERE deptno = 10;
UPDATE scott.bldg@maint.us.acme.com
SET room = 1225
WHERE room = 1163;
COMMIT;
15

Network Systems (Cont'd)


Examples Of Distributed Applications
- FTP (File Transfer Protocol)
- rlogin (remote login)
- rcp (remote copy)
- mounting
16

File Transfer Protocol (FTP)


A Standard Network Protocol Used To Copy A File From One
Host To Another Over A TCP/IP-Based Network, Such As The
Internet
Built On A Client-Server Architecture
Works The Same Way As HTTP For Transferring Web Pages
From A Server To A User's Browser
Also Works The Same Way As SMTP For Transferring E-Mail
Across The Internet
Commonly Used To Download A File From A Server Using
The Internet Or To Upload A File To A Server
- But .rhosts Files Are Not Needed (See rlogin And rcp Slides Below)
17

Remote Login (rlogin)


A Software Utility For Unix-Like Computer Operating Systems That Allows
(Authorized) Users To Log In On Another Host via A Network
rlogin Communicates With "rlogind" Daemon On The Remote Host
rlogin Is Similar To Telnet But The Former Can Only Connect To Unix
Hosts
The .rhosts File Residing On The Host Can Be Used To Login Without A
Password
- The File Provides The "Remote Authentication'' Database For Remote Operations
(e.g. rlogin And rcp)
- The File Specifies Remote Hosts And Users That Are Considered Trusted
- Trusted Users Are Allowed To Access The Local System Without Supplying
Password

slogin Is The Secure Version Of rlogin


18

Remote Copy (rcp)


The Unix Command Copies One Or More Files From One
Computer System To Another
It Uses The TCP/IP Protocol And The .rhosts File For
Authentication
Not A Secure Command For Network Use Because It Sends
Unencrypted Information Over The Network
It Has Largely Been Replaced By The Command scp

19

Mounting
A Process Of Making A File System Ready For Use By The
Operating System
Mount Point
- A Physical Location In The Partition Where A File System Can Be
Mounted
i.e. The Actual Location From Which The File System Is Mounted
And
Accessed

20

Definition Of Middleware
What Is A Middleware?
- A Service Interface Between Distributed Applications And An NOS
- A Software Providing A Link Between Separate Software Applications
Running On Different Operating Systems
- Also Called "Plumbing" Because It Connects Two Applications
- A Software Sitting "In The Middle" Between Application Software
- A Software Serving To "Glue Together" Or Mediate Between Two Separate
Programs Or Applications

21

Middleware (Cont'd)
General Architecture
machine A

machine B

machine C

Distributed Applications
Middleware Services
NOS
services

NOS
services

NOS
services

kernel

kernel

kernel

22

Middleware (Cont'd)
Examples Of Middleware Services
- RPCs and ROI/RMI
- Message Oriented Middleware (Nonblocking Send)
- Distributed File Systems
- Distributed Transactions
- Distributed Security
- Object Request Broker (Object Sending/Request)
- SQL-Oriented Data Access (Between Applications And
Database Server)
- Embedded Middleware (Interface Between Applications And
Embedded Operating Systems)
23

Comparison Of The Three Systems


Comparison
system
DTOS
NOS
middleware

description

main goal

tightly-coupled OS for
multiprocessors and
homogeneous
multicomputers

hide and manage


hardware resources

loosely-coupled OS for
heterogeneous
multicomputers (LAN
& WAN)

offer local services to


remote clients

additional layer atop of


NOS implementing
general-purpose
services

provide distribution
(access) transparency
24

Network Topologies And Features


LANs Or WANs (Collection Of LANs)
Components In/Among LANs
- Repeaters
- Bridges
- Routers

25

Repeaters
Used To Regenerate Incoming Electrical (Copper Wire), Wireless (Wi-Fi), Or
Optical (Fiber Optics) Signals
e.g. Wired Ethernet And Wireless Network Repeater (To Sit In Between Two
Office Routers Located At Two Different Floors)
Also Known As Active Hubs, Multiport Repeaters, Or Just Hubs
Used To Connect Two Or More LANs (e.g. Ethernet Networks)
The LANs Support The Same Protocol
Signals Received Are Amplified And Transmitted
LANs Are Extended By Repeaters Working Only At The Physical Layer
Collision Or Electrical Interference Are Also Transmitted
26

Repeaters (Cont'd)
An Example: Connecting Two LANs

LAN 1

LAN 2

R
Repeater

27

Repeaters (Cont'd)
Another Example: Connecting LANs On 3 Floors
LAN on floor 3
R1
LAN on floor 2
vertical
segment

R2
LAN on floor 1
R3
28

Bridges
A Forwarding Technique Used In Packet-Switched Computer Networks
A Bridge Makes No Assumption About Where In A Network A Particular

Address Is Located (But A Router Does)


- Flooding/Broadcasting Is Used To Locate A Device
- Once Response Is Received, It Records The MAC Address Of The Location In A
Table (For Future Use)
A Bridge Connects Multiple Network Segments At The Data Link Layer

(Layer 2) Of The OSI Model


A Switch Is A Bridge With Numerous Ports
Repeaters And Network Hubs Are Devices Connecting Network Segments At

The Physical Layer (Layer 1) Of The OSI Model


29

Bridges (Cont'd)
Also Used To Connect Two Or More LANs
LANs Are Also Extended By Bridges
But Bridges Do Not Forward Collision Or Electrical Interference
Complete/Correct Frames Or Packets Are Forwarded
Smarter Than Repeaters
- A CPU + A Memory + Code In A ROM
- A Special-Purpose Computer
Computers On LANs Can Be Located via Flooding/Broadcasting (The Very First Time)
LANs Still Support The Same Protocol Using Bridges
30

Bridges (Cont'd)
An Example: Connecting LANs In Two Different
Buildings
building 1

bridge

fiber
modem

building 2

optical
fibers

fiber
modem
31

Advantages Of Bridges
Self-Configuration (e.g. Routing Tables Set-Up)
Simple Bridges Are Inexpensive
Isolate Collision Domain
Transparent To Protocols Above The MAC Layer
Helps To Minimize Bandwidth Usage (After
Broadcasting)
32

Disadvantages Of Bridges
Do Not Limit The Scope Of Broadcasts
- Broadcast Domain Cannot Be Controlled
Do Not Scale To Extremely Large Networks (e.g. Collision)
Buffering And Processing Introduce Delays
More Expensive Than Repeaters And Hubs
A Complex Network Topology Can Pose A Problem
- Multiple Paths Between Bridges And LANs Can Result In Bridge Loops
33

Bridge Loops
Two Bridges (1 And 2) Connecting To Each Other
- The Redundancy Of Bridges Provides System Robustness

34

Bridge Loops (Cont'd)


Suppose Station A Sends A Message To Station B
- Both Bridge 1 And Bridge 2 Will Receive The Message

35

Bridge Loops (Cont'd)


Suppose Bridge 1 Loads The Message Onto Bottom Half First
- So The Message Goes To Both Station B And Bridge 2

36

Bridge Loops (Cont'd)


Bridge 2 Then Forwards The Message To Station B And
Bridge 1 By Loading The Message Onto The Bottom Half
- Bridge 1 Then Forwards The Message To Station A And Bridge 2 By
Loading The Message Onto The Top Half

37

Routers
An Electronic Device That Intercepts Packets On A Computer
Network And Determines Where It Has To Go
- The Packet Contains IP Address Information The Router Uses To Divert
Packets Properly
- Routers Exchange Information So That Each One Can Build Up A
Reference/Routing Table Showing The Preferred Paths Between Any Two
Systems On The Interconnected Networks

A Router Can Have Many (Different) Interface Connections


e.g. Copper Cables, Fiber Optic, Wireless Transmission, etc.

A Router May Contain Firmware For Different Networking


Protocol Standards
38

Routers (Cont'd)
Similar To Bridges But Work At Network Layer (3rd Layer)
Using IP Addresses To Locate Computers Among Networks
A Router Is Located At Any Place Where One Network Meets
Another
Each Router Is A Special-Purpose Computer
Networks Can Support Different Protocols
- Different Media, Physical Addressing Schemes, Frame Formats, etc.
Smarter Than Bridges
39

Routers (Cont'd)
The Architecture
network 2

network 1

router

40

Routers (Cont'd)
Packets Routed By Routers To Their Destinations

41

Bridging vs. Routing


Bridging Takes Place At OSI Model Layer 2 (Data Link Layer)
- So A Bridge Directs Packets According To Hardware Assigned MAC Addresses
- So A Bridge Is Not Concerned With And Is Unable To Distinguish Networks (But
Routers Can)
- A Host Does Not Have To Reconfigure Anything If It Is Moved Within A
Bridged Network (But A New IP Address Is Needed If It Is Moved To Another
Routed Network)

Routing Takes Place At The OSI Model Layer 3 (Network


Layer)
- So A Router Makes Its Decisions According To Arbitrarily Assigned IP
Addresses
42

Types Of LANs
Wired LANs (With Cables)
- Ethernet (Bus Based)
- Token Ring (Ring Based)
- FDDI (Ring Based)
- ATM (Star Based)
- Frame Relay (For WANs)

Wireless LANs (Without Cables)


- Radio Frequency Based
- Infrared Light Based
43

Ethernet
The Architecture

Ethernet
cable
(a shared
bus)
sender

receiver

44

Ethernet (Cont'd)
Only One Computer Can Transmit Data At A Time
CSMA/CD Is Used To Handle Collision
- CSMA/CD = Carrier Sense Multiple Access/Collision
Detection
- "Exponential Backoff" Technique Is Used For CSMA/CD
- CSMA/CD Is A Type Of Contention Protocol

45

Exponential Backoff
Used To Schedule Retransmission After Collisions
Retransmission Is Delayed By An Amount Of Time Derived
From The Slot Time And The Number Of Attempts To
Retransmit
The Algorithm
- After c Collisions, A Random Number Of Slot Times Between 0
And 2c 1
Is Chosen
- 1st Collision: Each Sender Waits 0 Or 1 Slot Time
- 2nd Collision: Each Sender Waits From 0 To 3 Slot Times
- 3rd Collision: Each Sender Waits From 0 To 7 Slot Times
- etc.

As The Number Of Retransmission Attempts Increases, The


Number Of Possibilities For Delay Increases Exponentially
46

Token Ring
The Architecture
tok
en

transmitting data
receiver

sender
receiving data

47

Token Ring (Cont'd)


A Token Is A Special Series Of Bits That Travels Around A
Token-Ring Network
- As The Token Circulates, Computers Attached To The Network Can Capture
It
* So The Token Acts Like A Ticket

- Only The Node Holding The Token Can Transmit Data


- The Token Is Released After Data Is Transmitted
- There Is Only One Token For Each Network
* So Only One Computer Can Transmit Data At A Time

Reliability Is Highly Ring Dependent


48

Token Ring (Cont'd)


A Token Ring Is A LAN Protocol Residing At The Data Link
Layer Of The OSI Model
A Token Ring Prevents The Collision Of Data When More
Than One Computer In A Network Attempts To Send Messages
Simultaneously (But Not Efficient)
A Token Ring Network Is The Second Most Popular Type Of
LAN Protocol (Ethernet Is The Most Popular Now)
- Steadily Declined Due To The Popularity Of Ethernet

A Token Ring Network Can Deliver Data At A Speed Of 100


Mbps
49

FDDI
Stands For Fiber Distributed Data Interface
FDDI = A Protocol Based On Token Ring Protocol
FDDI Uses Fiber Lines In A LAN Up To 200 KM (or 124
Miles)
So Thousands Of Users Can Be Supported

FDDI Is Also Used As A Backbone For A WAN


Effectively Obsolete By Fast And Gigabit Ethernet
50

FDDI (Cont'd)
FDDI-2 (An Extension Of FDDI)
- Also Supports The Transmission Of Voice And Video
Information As Well As Data
FFDT (FDDI Full Duplex Technology)
- Uses The Same Network Infrastructure As FDDI
- But Can Potentially Support Data Rates Up To 200 Mbps

51

FDDI (Cont'd)
Two Counter Rotating Rings Are Supported
The Architecture
tok
e

outer ring
failure occurs
inner
ring

52

FDDI (Cont'd)
A Self-Healing Network
More Robust Than Token Ring
Outer Ring
- Up To 100 Mbps

Inner Ring
- Normally Not Used (But As A Backup And Secondary Token)
- Up To 200 Mbps

A Single Ring Can Extend The Maximum Distance (200 KM)


- A Dual Ring Can Extend 100 KM (i.e. 62 Miles) Up To 500 Stations

53

ATM (Asynchronous Transfer Mode)


Star Based Topology
The Architecture
computer
sending
ATM switch

receiving
ATM switch

Ethernet

54

ATM (Cont'd)
Nodes In An ATM Are Independent Of Each Other For Failure
Used To Support Efficient Real-Time And Multimedia Voice
And Video As Well As Data Transmission In LANs And
WANs

- Quality of Service (QoS) Is Supported


Data Transmitted Are Fixed-Length, 53-Byte Cells
- So Faster Than Variable-Size Packets
Works At Layer 2 Of The OSI Model (i.e. Data Link Layer)
Using Station (i.e. MAC) Address

Less Popular After Gigabit Ethernet Was Put On Market

55

ATM (Cont'd)
Different From Telephone Switches Due To Its Capability Of
Using Idle Bandwidth (via Packet Switching)
ATM Transmits Data Using Virtual Circuits (VCs)
- The Transmission Path Consists Of The Physical Cable Connected To A
Particular Port Of An ATM Switch
- The Cable Has A Defined Bandwidth, Such As 155 Megabits Per Second
For An Optical Carrier-3 (OC-3) Optical Fiber Link
- The Bandwidth Of The Transmission Path Is Logically Divided Into
Separate Virtual Channels
- The Bandwidth Of A Virtual Channel Is Logically Divided Into Separate
Virtual Paths
56

ATM (Cont'd)
Paths Within A Channel Within The Transmission Medium

The Transmission Path Consists Of the Physical Cable


Connected To A Particular Port Of An ATM Switch
The Bandwidth Of A Virtual Path Is Logically Divided Into
Separate Virtual Channels
The Bandwidth Of The Transmission Path Is Logically Divided
Into Separate Virtual Paths
57

Frame Relay
Used For WANs (Based On The Older X.25 Packet-Switching Technology)
Used To Transmit Blocks Of Data In Variable-Size Units Called Frames
Cheap And Fast Relay Of Frames Using Virtual Circuits (Packet Switching)
- No Error Correction Is Made During Transmission
- A Frame With Error Detected Is Simply Dropped
- So It Does Not Process Packets (But Just Relay Them From Node To Node)
Also Used To Bridge LANs
- An Example: Offices In Two Different Cities
Becoming Less Popular Due To Cable Modem And DSL
- But Still Used In Remote Area Without Cable Modem Or DSL
e.g. A Retail Chain Using Frame Relay For Connecting Rural Stores To Their
Corporate WAN
58

Frame Relay (Cont'd)


An Example: A Frame Relay Network
- FRAD = Frame Relay Access Device
- UNI = User-to-Network Interface

59

Radio Frequency
Signals Are Broadcast By Antennas
- Examples: Airport (Apple), WaveLAN (Lucent), etc.

Short Distance Protocol: Bluetooth


- An Example: Cellular Phone And Headset

60

Infrared Light
Used For Remote Controls For TVs, Stereo Systems,
etc.
No Antenna Is Needed
Usually Need To Point Toward The Receiver (New
Devices Don't)

61

Message Passing Paradigms In WANs


Circuit Switching
- An Example: Telephone Systems
- High Set-Up Time But Reliable/Predictable Transmission Delay

Packet Switching
- Messages Are Divided Into Packets And Routed Through Different Paths
- Two Types
* Virtual Circuit (Connection Based, Handshaking, More Reliable): TCP
* Datagram (Connectionless, Less Reliable): UDP
62

ISO/OSI Network Protocol


A Total Of Seven Layers
- Physical Layer (Lowest)
- Data Link Layer
- Network Layer
- Transport Layer
- Session Layer
- Presentation Layer
- Application Layer (Highest)

The Bottom 3 Layers Are Point-To-Point


- All Intermediate Nodes Have To Check Them

The Top 4 Layers Are Peer-To-Peer


- Only Initiator And Receiver Check Them
63

Physical Layer
The First And Lowest Layer
It Defines The Means Of Transmitting Raw Bits Over A Physical
Link Connecting Network Nodes
The Layer Provides An Electrical, Mechanical, And Procedural
Interface To The Transmission Medium
- An Example Of Electrical Specification: RS-232-C Protocol
* A Serial Port Built Into The UART Chip On The Motherboard

It Pumps Out And Receives Data Bits (Bit-By-Bit Transfer)


It Supports Both Unidirectional And Bi-Directional Transmission
64

Data Link Layer


Used To Transfer Frames Between Adjacent Network
Nodes In A LAN Or WAN

Error Detection And Correction Occurring In The


Physical Layer
- Done via Checksum Appended To A Frame
- Message Is Resent If Checksums (Before & After) Don't
Match

65

Data Link Layer (Cont'd)


Like A Neighborhood Traffic Cop Responsible For Local
Delivery Of Frames On The Same LAN (i.e. Intra-Network)
- MAC Address Is Used To Locate Devices

Handling Frame Collision When Multiple Devices Attempt To


Use A Medium Simultaneously
e.g. CSMA/CD For Ethernet

Some Examples
- Ethernet For LANs
- Point-to-Point Protocol (PPP)
66

Network Layer
A Routing Based Layer Responsible For Routing Packets
The Lowest Layer In The OSI Model That Recognizes Network
Boundary (i.e. Inter-Network Packet Transfer)
- Data Link Layer Is For Intra-Network Data Transfer

An Example: IP (Internet Protocol)


- Each Packet Is Routed Independently Using IP (Network) Address
IPv4: 32-Bit IP Address (4 Fields) (232 Addresses) (Current)
IPv6: 128-Bit IP Address (8 fields) (2128 Addresses) (Future Trend)

- No Internal Path Is Selected


67

Transport Layer
The Layer Provides Reliable Connection And Transmission,
Flow Control, Congestion Control, And Multiplexing (Sender)
And Demultiplexing (Receiver)
The Layer Also Supports "The Same Order Delivery"
- Divide A Message Into Packets (Sender)
- Assign Each Packet A Sequence Number (Sender)
- Send Each Packet Out (Sender)
- When Received, Reorder/Reassemble Them (Receiver)

Reliable Transmission: Through ACK Messages


Flow Control: To Prevent Buffer Overrun Or Underrun
Congestion Control: To Prevent Network Traffic Congestion
- Congestion Indication: When ACK Messages Are Lost
68

Transport Layer (Cont'd)


Multiplexing/Demultiplexing
- A Single Node Can Support Multiple Ports/Sockets
- Applications/Processes (On Receiver) Each Can Listen For Information On
Their Own Ports/Sockets, Enabling The Use Of More Than One Network
Service At The Same Time
* Multiplexing At Send Host: Gathering Data From Multiple Sockets
* Demultiplexing At Receive Host: Delivering Segments To Correct Sockets

Example 1: TCP (Transmission Control Protocol)


Example 2: RTP (Real-Time Transport Protocol)
Transport Layer vs. Network Layer
- Network Layer: Logical Communication Between Hosts
- Transport Layer: Logical Communication Between Processes
* Relies On and Enhances Network Layer Services
69

Transport Layer (Cont'd)


Multiplexing/Demultiplexing

70

Transport Layer (Cont'd)


Household Analogy: 5 Kids Sending Letters To 5 Kids
- Processes = Kids
- Application Messages = Letters In Envelops
- Hosts = Houses
- Transport Protocol = Ann And Bill (At Process/Kid Level)
- Network-Layer Protocol = Postal Service (At Host/House level)

71

Session Layer
A Layer Providing The Mechanism For Opening, Closing, And Managing A
Session Between End-User Processes
- It Consists Of Requests And Responses Occurring Between Applications Using
RPCs

The Protocol Tries To Recover The Connection If It's Lost


- The Protocol Closes The Connection And Re-Opens It If It Is Not Used For A Long
Time

The Layer Allows Information Of Different Streams To Be Properly


Combined Or Synchronized
- e.g. Web Conferencing (Synchronous Audio & Video Streams To Avoid Lip Synch)
- e.g. Live TV (Audio & Video Streams Are Properly Merged To Avoid Silent
Airtime (i.e. Slow Audio) Or Excessive Overlap (i.e. Fast Video))
72

Presentation Layer
Data Or Format Conversion
- ASCII EBCDIC And Vise Versa
- Compression
- Encryption
- Serialization Of Complex Data Structures Into Flat Byte-Strings
e.g. Using EXtensible Markup Language (XML) Mechanism
* A Set Of Rules For Encoding Documents In Machine-Readable Form

Also Used To Define Meaning Of Bits (e.g. Using XML)


- An Example: Records Containing Names, Addresses, etc.

An Example: The HTTP Daemon


73

Application Layer
Some Examples
- HTTP (Hyper Text Transfer Protocol)
WWW

* A Network Protocol Used For Data Communication For The


(World Wide Web)

- Telnet (Protocol For Remote Computer Logon And


Access)
Oriented

* A Client-Server Protocol, Based On A Reliable ConnectionTransport (e.g. TCP)

- FTP (File Transfer Protocol)


- SMTP (Simple Mail Transfer Protocol)
* An Internet Standard For E-Mail Transmission Across IP
Networks
74

TCP/IP Protocol
Developed By Department of Defense (DoD) To Connect A
Number Of Different Networks Into A Network Of Networks
(The Internet)
Uses The Client-Server Model Of Communication
- Primarily Point-To-Point Model (Between Client Host And Server Host)

Major Layers: TCP And IP


- TCP
* Verifying The Correct Delivery Of Data From Client To Server
* Detecting Errors Or Lost Data And Triggering Retransmission

- IP
* Moving Packet Of Data From Node To Node Using IP Addresses (4 Bytes)
75

TCP/IP Protocol (Cont'd)


A Total Of Four Layers
Layer

- Link Layer (Lowest) = Data Link Layer + Physical


- Network Layer = Network Layer (Basically, IP)

UDP)
+

- Transport Layer = Transport Layer (Basically, TCP Or


- Application Layer = Session Layer + Presentation Layer
Application Layer
76

TCP/IP Protocol (Cont'd)


Graphical Correspondence
TCP/IP
application program

application
TCP/UDP
IP
link

ISO/OSI
application program

application
presentation
session
transport
network
data link
physical
77

Distributed Computing Models


Client/Server Model
- Request-Reply Behavior
Peer-To-Peer Model
- Each Workstation = A Client + A Server

78

Client/Server Model
Workstation Model
- The Architecture

WS1

WS2

WS3

WS4

WS5

diskful or
diskless
(more
popular)

a LAN
79

Client/Server Model
Processor Pool Model (e.g. Amoeba Operating System)
- The Architecture
CPU pool

x terminal 1

xt 2

xt 3

FS

a LAN
80

Client/Server Model (In Details)


Approach 1: A Vertical Distribution Approach
Approach 2: A Horizontal Distribution Approach

81

Vertical Distribution Approach


Applications Are Divided Vertically
- Case 1: Two-Tiered Architecture
* An Example: A File Server

- Case 2: Three-Tiered Architecture


* An Example: A Database Server

82

File Server
The Architecture
wait for result

client
request

reply

server
provide service

time

83

Database Server
The Architecture
user interface
(presentation)
application
server
real server

wait for result


request
operation

return
result

wait for data


request
data

return
data
provide
data

time

84

Database Server (Cont'd)


Client Part = User Interface + Application Server
An Example Of Application Server
- Transaction Monitor Coordinating All Transactions

An Example Of Real Server


- Database Server

85

Horizontal Distribution Approach


For Load Balancing In Client And Server
An Example: A Web Server Replicated Across
Several Machines

86

Web Server
The Architecture
replicated web servers, each containing the
same web pages

front end handling


incoming requests
requests
in RR

disk

RR
LAN

The Internet

87

Peer-To-Peer (P2P) Model


No Clear Notion Of Clients And Servers In P2P Network
Each Node In A P2P Network Is Both Functioning As A Client And A Server
At The Same Time

Other

- Peers Are Equally Privileged


- Peers Make A Portion Of Their Resources (CPU, Disk, etc.) Available To
Participants (With/Without Central Coordination)
- Peers Are Both Suppliers And Consumers (vs. Client-Server Model)
- Peers Distribute Work Load And Bandwidth Of The Server To Several Nodes

Commonly Used In Media Streaming And File Sharing (e.g. Napster)


Often Implemented As An Abstract Overlay Network, Built At Application
Layer, On Top Of The Physical Network Topology
88

P2P Model (Cont'd)


How Does Internet P2P Work?
- Download And Execute A Peer-To-Peer Networking
Program
e.g. Gnutella
* Decentralized And Allows Users To Exchange All Types Of Files

- After Launching The Program, Enter The IP Address Of


Another Computer Belonging To The Network
- Users Can Determine Which Files To Share Or Password
Protect
89

Network vs. Distributed Operating Systems

Location Transparency

Access Transparency

Migration Transparency

Relocation Transparency

Replication Transparency

Concurrency Transparency

Failure Transparency

Persistence Transparency
90

Location Transparency
It Hides Where A Resource Is Located
- So Resources Can Be Accessed By A User From Anywhere On The Network
Without Knowing Where They Are Located

A User Can Not Tell Where The Resource Is Located


Naming Plays An Important Role
By

- The Relationship Of Logical Names To Physical Address Is Maintained


Indices

Only Global Names Can Be Assigned To Resources


No Local Information Can Be Encoded
An Example: /server1/dir1/dir3/prog1
- "server1" Does Not Bear Information About Where It Is In The Network
- "prog1" Does Not Bear Information About Where It Is On Disk
91

Access Transparency
It Hides Information In Data Representation
It Also Hides Information About How A Resource Is
Accessed By Users
An Example
- Sender: Little Endian
- Receiver: Big Endian

92

Migration Transparency
It Hides That A Resource May Move To
Another Location

93

Relocation Transparency
It Hides That A Resource May Be Moved To
Another Location While In Use
An Example: Mobile Users Moving When
Using A Cell Phone

94

Replication Transparency
It Hides That A Resource Is Replicated
It Hides The Fact That Several Copies Of A
Resource Exist

95

Concurrency Transparency
It Hides That A Resource May be Shared By
Several Competitive Users
Consistency Is An Issue Here
- Synchronization Can Be Achieved By Locking On
Transactions

96

Failure Transparency
It Hides The Failure And Recovery Of A
Resource

97

Persistence Transparency
It Hides Whether A Resource Is In Memory Or
On Disk

98

Parallel System Architectures (In General)


Type 1: Multiprocessors
- They All Share A Memory
- They Access The Same Physical Address Space

Type 2: Multicomputers
- They Have Their Own Memories

99

Interconnections Of The Two Kinds


Bus Based (Like Cable TV)
Switch Based (Like Telephone System)
- Different Wiring Patterns Exist To Connect Wires
- Decision Is Made At Each Switch Point

Some Examples
- Bus Based, Shared Memory Case
- Switch Based, Shared Memory Case
- Bus Based, Private Memory Case
- Switch Based, Private Memory Case
100

Bus Based, Shared Memory Case


The Architecture

memory

m1

m2

m3

or
P1

P2

P3

P4

P1

P2

P3

P4

101

Switch Based, Shared Memory Case


The Architecture
m2
m1

m3

P1

P5
P2

P4
P3

102

Bus Based, Private Memory Case


The Architecture

m1

m2

m3

m4

P1

P2

P3

P4

103

Switch Based, Private Memory Case


The Architecture
m1

m2

m3

m4

P1

P2

P3

P4

104

Parallel System Architectures (In Details)


Multiprocessor Systems
- Type 1: Memory Based
- Type 2: Module Based
- Type 3: Crossbar Switch Approach
- Type 4: Hyper Cube Approach
- Type 5: Omega Approach

Multicomputer Systems
- Type 1: Homogeneous Ones
- Type 2: Heterogeneous Ones
105

Memory-Based Multiprocessors
The Architecture
CPU1

CPU2

CPU3

CPU4

memory

106

Memory-Based Multiprocessors (Cont'd)


Memory Is The Bottleneck And Needs Synchronization
Cache Can Be Used To Improve Performance
Still Suffer From Limited Scalability Even Cache Is Used
Example 1: Encore's Multimax
- A Shared Memory Multiprocessor Running UNIX

Example 2: CMU's Cm*


- A Shared Memory, 50-Processor Multiprocessor
107

Module-Based Multiprocessors
The Architecture
CPU1

CPU2

m1

CPU3

m2

CPU4

m3

108

Module-Based Multiprocessors (Cont'd)


Cache Is Still Needed To Improve Performance
Still Suffer From Limited Scalability

109

Crossbar Switch Approach


It Connects Each Port To All Other Ports via The Backplane
(i.e. The Switch Needs NN Connections)
- So Traffic Can Be Forwarded Directly To Multiple Ports Simultaneously
- A Complex Bus Arbitration Algorithm Is Needed

A Problem: Head Of Line Blocking


- When Two Frames Enter The Switch At The Same Time Destined For
Different Ports (e.g. CPU2 to m3 and CPU4 to m2)
- One Of The Frames Is Blocked (In Buffer) While The Other Is Forwarded
- Packets Are Dropped If There Is Sufficient Traffic And Insufficient Buffer
Space On The Switch
110

Crossbar Switch Approach (Cont'd)


The Architecture
m1

m2

m3

a crosspoint
switch

CPU1
CPU2
CPU3
CPU4

111

Crossbar Switch Approach (Cont'd)


A Solution To The Scalability Problem

Number Of Switches = O(n2), n = Number Of


CPUs/Modules
An Example: Alliant's FX/8

112

Hyper Cube Approach


Case 1: Order 2 (i.e. Two Dimensional)
The Architecture
00

10

01

11

Number Of Nodes = 22 = 4
Farthest Distance = Minimum 2 Hops (i.e. log24)
113

Hyper Cube Approach (Cont'd)


Case 2: Order 3 (i.e. Three Dimensional)
Two Order-2 Hyper Cubes

114

Order 3 Hyper Cube (Cont'd)


The Architecture
100

110

101

111

000

010

001

011

115

Order 3 Hyper Cube (Cont'd)


Number Of Nodes = 23 = 8
Farthest Distance = Minimum 3 Hops (i.e. log28)
An Example: CM-2 Thinking Machine
A SIMD Processor Array Type
From Dimension 8 To Dimension 12

Another Example: Intel's iPSC/2


A 4-Dimensional Hyper Cube
116

Omega Approach
Used To Solve The O(n2) Problem For Crossbar

Switch Approach
A Real System: BBN Butterfly

117

Omega Approach (Cont'd)


An Example: 4 CPUs And 4 Memory Modules
- Number Of Stages = log2n, n = Number Of
Nodes
- Number Of Switches/Stage = n/2 (i.e. O(n))

118

The Example (Cont'd)


The Architecture
modules

CPUs
00

C0

stage 1

stage 2

m0

00

memory module ID
0: top output

01

C1

10

C2

11

C3

22

22

22

22

m1

01

m2

10

m3

11

1: bottom output

119

Omega Approach (Cont'd)


Another Example: 8 CPUs And 8 Memory
Modules
- Number Of Stages = log28 = 3
- Number Of Switches/Stage =
8/2 = 4

120

The Example (Cont'd)


The Architecture
stage 1

stage 2

stage 3

m0

000

C1

m1

001

010

C2

m2

010

011

C3

m3

011

100

C4

m4

100

101

C5

m5

101

110

C6

m6

110

111

C7

m7

111

000

C0

001

121

Multicomputer Systems
Two Types
- Homogeneous Ones
- Heterogeneous Ones

122

Homogeneous Ones
Also Known As SANs (System Area Networks)
- A SAN Is A High-Performance Network That Can Link A Cluster Of
Computers (PCs Or Workstations)
Latency

- A SAN Delivers High Bandwidth (1 Gbps Or Greater) With Low


- A SAN Is Typically Switched By Hubs Supporting 8 Or More Nodes

- The Cable Length Between Nodes On A SAN Ranges From A Few


Meters To A Few Kilometers

Two Architectures
- Bus-Based Clusters (Broadcast Based)
- Switch-Based SANs (Routing Based)
123

Bus-Based SANs
An Example: Fast Ethernet (100 Mbps) (Broadcast
Based)
- Limited Scalability

124

Switch-Based SANs
Two Approaches
- Mesh/Grid Approach
- Hyper Cube Approach

125

Mesh/Grid Approach
An Example: Intel Paragon XP (2D-Mesh)
- The Architecture

126

Hyper Cube Approach


An Example: Intel iPSC/860
- The Architecture: Same As The One Shown
Above
For Multiprocessors

127

Some Examples For Switch-Based SANs


Example 1: Massively Parallel Processors (MPPs)
- Real Systems: Intel iPSC/860 And Intel Paragon XP
- Expensive
- Each Node Is A Supercomputer Containing Thousands Of CPUs
- A High-Performance Interconnection Network Is Used
* Low Latency And High Bandwidth
- Fault Tolerance Is Enforced

Example 2: Clusters Of Workstations (COWs)


- Cheaper Than MPPs
- Cheap Off-The-Shelf Interconnection Is Used
- High Bandwidth Is Not Ensured
128

MPP Arrays (MPPAs)


Used To Develop High-Performance Embedded System
Applications
MPPA Is A MIMD Architecture, With Distributed Memory
Accessed Locally, Not Shared Globally
- Each Processor Accesses Only Its Own Code And Memory
- Point-To-Point Communication Between Processors Is Used

The Distributed Memory MIMD Architecture Is Different From


That Of Multicore
- The Latter Is For General-Purpose Computing
- The Latter Has Fewer Processors And An SMP Or Other Shared Memory
Architecture

The Basic Objects In An MPPA Application Run In Parallel,


Each On Their Own Processor
129

Applications Of MPPAs
Video Compression
- Reduce The Quantity (Loss) Of Data Used To Represent Digital Video
Images

Image Processing
(e.g.

- Any Form Of Signal Processing For Which The Input Is An Image


Photograph Or Video Frame)

Medical Imaging
- The Technique And Process Used To Create Images Of The Human
Body

Network Processing
Software-Defined Radio
- Analog-To-Digital Convert Chip Connected To An Antenna
130

SMP vs. MPP


The Comparison

131

COWs
Also Known As Network Of Workstations (NOWs)
A Computer Network Connecting Several Computer
Workstations Together With Special Software Forming
A Cluster
Normally Used As Supercomputers For Number
Crunching And Search Engine
e.g. Berkeley 10 Gigaflops COW On The LINPACK Benchmark
- A Software Library For Performing Numerical Linear Algebra On Digital
Computers (Written In Fortran)
132

Heterogeneous Ones
Computers Are Of Different Types
Interconnection Network Is Also Heterogeneous
Example 1: Four Clusters Of Multicomputers
Interconnected via A Wide-Area ATMSwitched Backbone
Example 2: Construction Of Multicomputers Using
Existing Networks And Backbone
133

Example 2 (Cont'd)
The Architecture
Campus-Wide Distributed System

Biology LAN

CPSC LAN

Physics LAN

Chemistry LAN

134

You might also like