Lecture #01 - Technion moodle

advertisement
046335 Design of Computer Networks
Prof. Ariel Orda
Room 914, ext 4646
4/16/2020
 A. Orda, R. Rom, A. Segall,
1
Introduction
•
Computer Network:
– A set of autonomous connected computers
• connected = can transmit information between computers
• autonomous = independent ( not Master-Slave)
– Related concepts:
• computerized communication = computers aid to communication of a
different type ( e. g. telephony )
• distributed system = the network is transparent to the user and the
operating system takes care of the communication ( the difference
between this and a computer network is minimal )
• communication system = there is exchange of information, but there is no
communication network ( e.g. Master -Slave )
4/16/2020
 A. Orda, R. Rom, A. Segall,
2
Computer Network: reasoning and usage
•
•
•
•
•
Information Sharing
Resource Sharing: Files, Databases, Printers, Applications.
Reliability: Resource backup
Efficiency: work in parallel on different parts of the problem.
Cost: changes in relative cost of computation / communication
•
Network versus point-to-point communication
– Most of the time no need for session between any two given users
– While a session is in progress, actual communication is not continuous
– Every node can connect to any other node
4/16/2020
 A. Orda, R. Rom, A. Segall,
3
•
Network Components:
– End systems and computers ( hosts ): network
users
– Communication sub-network:
• transmission of information between users
• does not generate information ( except to
support communication )
– Communication sub-network links:
• Point-to-Point: twisted pair, coaxial cable,
optical fiber, infra-red, wireless (Bluetooth,
WiFi, etc).
• Broadcast: radio, microwave, bus, satellite
– source-destination data transmission: switching
(to be explained later)
– other network examples:
• transportation network, phone network
– first part in network design is network topology
4/16/2020
 A. Orda, R. Rom, A. Segall,
4
Network types, by distance between switches
Distance
0.1m
1m
10m
100 m
1 km
10 km
100 km
1000 km
Geography
Circuit board
System
Room
Building
Campus
City
Country
Continent
Example
Parallel Processor
Multiprocessor
|
| Local Area Network (LAN)
|
Metropolitan Area Network
Long Haul (WAN)
Long Haul Inter-network
Note: Distance between switches normally determines the data transmission speed
4/16/2020
 A. Orda, R. Rom, A. Segall,
5
Network topology types
Point-to-Point Topologies
Broadcast Topologies
Z
S
B
A
E
F
C
J
G
H
I
K
M
L
D
N
Wireless Ad-Hoc
4/16/2020
 A. Orda, R. Rom, A. Segall,
6
Logical design of networks ( architecture )
•
•
•
4/16/2020
Layered architecture
– each layer is responsible for a
collection of functions and provides
service for upper layers
– Modular architecture facilitates
design and maintenance
Protocol: conversation between identical
layers at different locations
Interface: conversation between adjacent
layers at the same site
 A. Orda, R. Rom, A. Segall,
7
OSI Reference Model - layer description
•
•
•
•
•
•
•
•
Physical Layer - bit transmission, electrical and mechanical problems
Data Link (DLC) - Reliable data transmission on links, overcomes noise problems.
Normally uses data frames and ack frames.
Network Layer - Responsible for Operation of the Communication Sub-Network:
– Routing: data flow in the network
– Flow Control: stops network overflow
– Inter-network transmission
Transport Layer
– Reliable end-to-end data transmission
– Differentiates between types of traffic, provides for each: reliability, order,
delay
Session Layer
– Different types of machines can maintain a conversation
– Call control ( unidirectional or bi-directional), token control, synchronization
Presentation
– Encryption, compression, etc.
Application: everything else
In common channel networks, MAC layer, an additional sub-layer under DLC, to
control channel access
4/16/2020
 A. Orda, R. Rom, A. Segall,
8
Switching Methods
•
•
•
Circuit Switching
– Needs setup
– used in phone systems
– reserved fixed bandwidth
– no congestion problem
Message Switching
– messages are forwarded in one piece ( store & forward )
– no fixed path between source and destination
– maximum message size not specified
– no need for preparation phase in the network ( setup)
– large memory requirements ( to accommodate large messages)
Packet Switching
– packets are forwarded individually, possibly on different paths
– efficient bandwidth use
– low delay and low memory requirements
– may produce traffic jams
– packets may arrive out of order
4/16/2020
 A. Orda, R. Rom, A. Segall,
9
Switching methods ( continued )
•
Virtual Circuit Switching
– Circuit Switching + Packet Switching combination
– Packetized Data is being switched
– Path is established upon call setup and is fixed throughout the call
– No reserved Bandwidth
– Properties:
• Need for preparation phase
• Packets arrive in order
• There may be gaps because of losses if there is no DLC on links
• Fixed Path
• Congestion Problem can still arise
VC Switching is very popular in modern high-speed networks
4/16/2020
 A. Orda, R. Rom, A. Segall,
10
4/16/2020
 A. Orda, R. Rom, A. Segall,
11
A B C D
A B C D
Transm ission Time
Propaga tion Time
Processing Time
A B C D
1
Switching Methods
(continued)
2 1
Msg
Setup Time
3 2
1
3
2
End-To- End Propa gation
Msg
3
Data Exc hange Phase
Msg
Dismantle Time
Circuit Switc hing
4/16/2020
 A. Orda, R. Rom, A. Segall,
Me ssage Switching
Pac ket Switc hing
12
Design Problems
•
Design Problems
– Switch design
– Communication means type
– Switching method
– Use of communication means
– Topological Design
– Routing method
– Flow and Congestion Control
4/16/2020
•
Design Criteria
– Performance:
• Delay
– maximal or average
– per user or for entire
network
–
–
–
–
 A. Orda, R. Rom, A. Segall,
• Throughput
Cost
Reliability and Survivability
Adaptivity and Scaling
Simplicity of Protocols
13
Queues
•
•
•
•
•
Packets arrive randomly
Wait in line to be transmitted
Service time is the transmission time
Random elements:
– packet arrival time
– service time, if packets are not of
fixed length
Need for statistical specification
Communication link as a queue
4/16/2020
 A. Orda, R. Rom, A. Segall,
14
General queue specification
•
In this course we shall treat only M/M/n
queues.
Poisson arrivals
input
M / M /n
Exponential
service
4/16/2020
output
service
Number of servers
 A. Orda, R. Rom, A. Segall,
15
Exponential arrivals
•
Definition 1: Numbers of arrivals in non-overlapping intervals are independent
and probability of k arrivals during time interval t :
(t ) k t
Pk t  
e
k!
•

is the average arrival rate
Follows that:
– During a small time interval t holds:
Prob( one arrival during (t, t+ t)) =   t  o( t )
Prob ( no arrival during
lim x o
o( x )
0
x
(t , t  t ))  1    t  o(t )
namely o(x) goes down to 0 faster than x
probability of 2 or more arrivals during (t , t  t ) is o(t )
4/16/2020
 A. Orda, R. Rom, A. Segall,
16
Exponential service time (ST)
•
Probability that a user requires service time < t (service time cdf):
F (t )  1  e t
 - service rate
•
Probability that a user in service at time t is still in service at time
•
e  (t t )
 t
Pr ob( ST  t  t | ST  t ) 

e
 1    t  o(t )
e  t
Probability that a user in service at time t completes it by time (t  t )
(t  t )
  t  o(t )
4/16/2020
 A. Orda, R. Rom, A. Segall,
17
System State
Pk(t ) =
Probability that there are k users in the system
none has arrived
none has left
Pk(t + t) = Pk(t) [1 - t + o(t)] [1 - t + o(t)]
+Pk+1(t)[1 - t + o(t)] [t +o(t)]
+Pk-1(t)[t + o(t)] [1 - t + o(t)] + o(t)
k>0
Pk(t + t) - Pk(t) = [Pk-1(t) - ( + )Pk(t) +Pk+1(t)].t + o(t)
In the limit:
dPk t 
   Pk 1 t      Pk t     Pk 1 t 
dt
For k=0:
P0(t + t) = P0(t).[1 - t + o(t)]
+
P1(t).[1 - t + o(t)] [t +o(t)]
+
o(t)
dP0  t 
    P0  t     P1  t 
dt
4/16/2020
 A. Orda, R. Rom, A. Segall,
18
Example
  0; system empty at t  0
dP0 t 
   P0 t 
dt
dP0 (t )
   dt;
P0 (t )
 0
P0 (t )  P0 (0)  e  t =e  t ;
Now we can calculate P1 (t )
dP1 (t )
   P0 (t )  P1 (t )    et    P1 (t )
dt
This is a differential equation for P1 whose solution is :
P1 (t )  t  et
We can continue this way for every k
4/16/2020
 A. Orda, R. Rom, A. Segall,
19
Steady State ( t   )
P0  lim t  P0 (t )
Notation:
assuming the limit exists
dPn (t )
0
dt
In steady state holds
for each n
  P0    P1
Then
(   )  Pk    Pk 1    Pk 1
k 0
Solution

Pk  P0     P0   k

Calculation of P0 and Pk
k


k 0
k 0
1   Pk  P0    k  P0 
1
;
1 
P0  1   ;
The solution is valid if   1 . For   1
condition for existence of steady state is P0  0
4/16/2020
Pk  (1   )   k
 1
the system has no steady state. In general,
.
 A. Orda, R. Rom, A. Segall,
20
State Transition Diagram
•
•
•
•
Based on transition rates
State “ flow” conservation
Example: dashed circles. (   )  Pk    Pk 1    Pk 1
Example : ellipse:
  Pk    Pk 1
•
•
Steady state equations can be written directly from the state diagram
Can also write diagram for :
–
 as a function of the state
–
 as a function of the state
4/16/2020
 A. Orda, R. Rom, A. Segall,
k 0
21
Little’s formula
N   T
Average number
of users in the system
•
•
•
Average delay
Average arrival rate
Explanation:
– average user arrives to system and finds N users
– when he leaves, there are N users, therefore
while he was in the system N users arrived
– the period he was in the system is T and
during this period   T arrived
Little’s theorem holds also for more complicated
systems
Use for M/M/1



N   k  Pk   k (1   )  k 
k 0
k 0

T 
4/16/2020
N


1 

1 
1


1 
 A. Orda, R. Rom, A. Segall,
22
Download