Tuesday, September 9, 2014

Example -Telephone System

EXAMPLE-Telephone System

o    Input to the Telephone is a message 'm' in the form of sound waves
o    The  sound  waves  are  converted  by  telephone  into  electric  signals  of  the  same
frequency
o    These signals are transmitted w/o any modification over the telephone line
o    Hence g(t) and s(t) are identical
o    S(t) will suffer some distortion so that r(t) will not be the same as s(t)
o    R(t)   is   converted   back   to   sound   waves   with   no   attempt   of   correction   or
improvement of signal quality
o    Thus m' is not an exact replica of m

An Actual Digital Data Communication System Key Data
Communication Terminology


   Session: communication dialog between network users or applications
Different Types of this session for Info Exchange
   Network: interconnected group of computers and communication devices
We will look into it in a little bit
   Node: a network-attached device
Node can be any device in the network

Transmission Media


Transmission Media


Medium                     Speed                        Cost

Twisted Wire            300bps-10Mbps        Low
Microwave                 256Kbps-100Mbps  Low
Coaxial Cable            56Kbps-200Mbps    Low
Fiber Optic Cable     500Kbps-10Gbps     High

PROTOCOL

A system of digital rules for data exchange within or between computers.                  

EXAMPLE:   Consider   the   communication   between   two
individuals. They can only communicate provided they both
speak the same language.

A little more complex Comm. System
Example Electronic Mail

In Terms of a little more complex Comm. System

   SENDER SIDE

Input device and transmitter are components of a Personal Computer
User of a PC wishes to send a message 'm'
User activates electronic mail package e.g. hotmail
Enters the message via input device (keyboard)
Character string is buffered in main memory as a sequence of bits 'g'
PC is connected to some trans system such as a Telephone Network via an I/O Transmitter                    like Modem
Transmitter converts incoming stream 'g' into a signal 's'

   RECEIVER SIDE

The  transmitted  signal  's'  is  subject  to  a  number  of  impairments depending upon the                       medium
Therefore, received signal 'r' may differ from 's'.
Receiver  attempts  to  estimate  original  's'  based  on  its  knowledge  of the medium and                      received signal 'r'
Receiver produces a bit stream g'(t)
Briefly buffered in the memory
Data  is  presented  to  the  user  via  an  output  device  like  printer,  screen etc.
The data viewed by user m' will usually be an exact copy of the data sent 'm'



Monday, September 8, 2014

Components of Data Com Systems

Components of Data Com Systems


A basic communication model consists of five components: the sender and receiver, the medium that carries the message, contextual factors, the message itself, and feedback. To target your messages effectively, you need to consider the variables that can affect each of the components in the model. Following are the five components of communication skills training model.

 Message
 Sender
 Receiver
 Medium
 Protocol

MESSAGE
 Information or Data to be communicated

Data Communication Messages
 Files
 Can be text, numbers, video or any combin
 In short anything that can be represented using binary bits
(meaningful collections of records)
 Data/information requests (database queries, Web page requests,
etc.) Respo to requests and commands or error messages
 Status messages (about the network’s functional status)
 Control messages transmitted between network devices to control
network traffic
Correspondenc among network users
MESSAGE TYPES
SENDER
Can be a Computer , Workstation,
Device that sends the data message
Video camera etc

RECEIVER
Can be a Computer , Workstation,
Video camera etc

MEDIUM
Physical path that a message uses to travel from the Sender to the
receiver
Can be a Copper Cable (Telephone), Coaxial Cable (Cable TV),
Fiber Optic Cable, LASERS or Radio Waves (Wireless Medium)
Transmission Media


Vague Definitions

Vague Definitions

We will clarify
Data Communication System
For Data Communication to occur, the communicating devices must be a part of a communication system made up of some specific kind of hardware and software
This type of a system is known as a

“DATA COMMUNICATION SYSTEM”

Effectiveness of Data Comm. System
Effectiveness depends upon three fundamental characteristics:

     Delivery
     Accuracy
     Timeliness (Better NEVER than LATE)
Example of the POSTAL MAIL
Components of Data Comm. Systems





TODAY’S EVERGHANGING & BUSY WORLD

TODAY’S EVERGHANGING & BUSY WORLD

o Today’s fast world demands better, secure and most of all FAST ways of communication
o Gone are the days when you had to wait a couple of weeks to get a letter from USA
o Why wait ONE week when you can get the information you require in just a split of a second, using what we know by the name of “DATA COMMUNICATION”.
HOW TO ACHIEVE THIS?
o How to achieve this ACCURACY, SECURITY and SPEED for the transfer of this information?
o What HARDWARE and the SOFTWARE is needed?
o And, what should be the MEANS of sending this info?
ARE SOME OF TOPIC WE WILL BE EXPLORING DURING THE COURSE OF OUR STUDY
DATA COMMUNICATION
o When we communicate , we share information
o Information can be LOCAL or REMOTE
o Between Individuals LOCAL communication occurs face to face
o REMOTE communication occurs over a long distance
o When we refer to COMPUTER SYSTEMS, Data is represented in the form of Binary Units (Bits) in the form of Zeros (0’s) and One’s (1’s)
o Also the entities can most of the times be considered to be COMPUTERS
Data Communication Definition (Modified)
Therefore, our earlier definition can easily be modified to:
“Data Communication is the exchange of data (in the form of 0’s and 1’s) between two devices (computers) via some form of the transmission medium.”
LOCAL and REMOTE Data Communication
 LOCAL
Data communication is considered to be local if the communicating devices are present in the same building or a similarly restricted geographical area
REMOTE
Data Communication is considered remote, if the devices are farther apart.

INTRODUCTION TO DATA COMMUNICATION

Introduction to Data Communication



“Data Communication is the exchange of Information from one entity to the other using a Transmission Medium”.

DEFINITION OF DATA COMMUNICATION (Cont’d)

As you can clearly notice, the definition of Data Communication although Simple leaves many questions unanswered:

    Exchange
    Information
    Entities
   Transmission
   Medium

We will try to answer all these Questions in this Course
History of Data Communication

Data communications history represents a blend of histories, including:
  The history of the telecommunications industry
  The history of data communications, and
  The history of the Internet
  Telegraph 1837 Samuel Morse
Modern telecommunication industry began in 1837 with the invention of the telegraph by Samuel Morse
This led to building a telecommunications infrastructure of poles and wires as well as to the development of communication hardware and protocols

 Telephone 1876 Alexander Graham Bell
Invention of telephone by Alexander Graham Bell in 1876 and the development of wireless communication technology by Guglielmo Marconi in the 1890s set the stage for today’s communication industry
  By 1950’s
By 1950s, telephone and telegraph companies had developed a network of communication facilities throughout the industrialized world
  1970’S
Although development of databases, languages, operating systems, and hardware was strong from 1950s to 1970s, large-scale data communication systems did not emerge until the 1970s.
This was stimulated by 3 major developments:
  Large-scale integration of circuits reduced cost and size of terminals and communication equipment
   New software systems that facilitated the development of data communication networks
   Competition among providers of transmission facilities reduced the cost of data circuits

Friday, August 15, 2014

Network File System (NFS)

Network File System (NFS)

Network File System ( NFS ) is a distributed file system ( DFS ) developed by Sun Microsystems. This allows directory structures to be spread over the net- worked computing systems.
A DFS is a file system whose clients, servers and storage devices are dis- persed among the machines of distributed system. A file system provides a set of file operations like read, write, open, close, delete etc. which forms the file services. The clients are provided with these file services. The basic features of DFS are multiplicity and autonomy of clients and servers.
NFS follows the directory structure almost same as that in non-NFS system but there are some differences between them with respect to:
  • Naming
  • Path Names
  • Semantics

Naming

Naming is a mapping between logical and physical objects. For example, users refers to a file by a textual name, but it is mapped to disk blocks. There are two notions regarding name mapping used in DFS.
  • Location Transparency: The name of a file does not give any hint of file's physical storage location.
  • Location Independence: The name of a file does not need to be changed when file's physical storage location changes.
A location independent naming scheme is basically a dynamic mapping. NFS does not support location independency.
There are three major naming schemes used in DFS. In the simplest approach, files are named by some combination of machine or host name and the path name. This naming scheme is neither location independent nor location transparent. This may be used in server side. Second approach is to attach or mount the remote directories to the local directories. This gives an appearance of a coherent directory. This scheme is used by NFS. Early NFS allowed only previously mounted remote directories. But with the advent of automount , remote directories are mounted on demand based on the table of mount points and file structure names. This has other advantages like the file-mount table size is much smaller and for each mount point, we can specify many servers. The third approach of naming is to use name space which is identical to all machines. In practice, there are many special files that make this approach difficult to implement.

Mounting

The mount protocol is used to establish the initial logical connection between a server and a client. A mount operation includes the name of the remote directory to be mounted and the name of the server machine storing it. The server maintains an export list which specifies local file system that it exports for mounting along with the permitted machine names. Unix uses /etc/exports for this purpose. Since, the list has a maximum length, NFS is limited in scalabilty. Any directory within an exported file system can be mounted remotely on a machine. When the server receives a mount request, it returns a file handle to the client. File handle is basically a data-structure of length 32 bytes. It serves as the key for further access to files within the mounted system. In Unix term, the file handle consists of a file system identifier that is stored in super block and an inode number to identify the exact mounted directory within the exported file system. In NFS, one new field is added in inode that is called the generic number.
Mount can be is of three types -
  1. Soft mount: A time bound is there.
  2. Hard mount: No time bound.
  3. Automount: Mount operation done on demand.

NFS Protocol and Remote Operations

The NFS protocol provides a set of RPCs for remote operations like lookup, create, rename, getattr, setattr, read, write, remove, mkdir etc. The procedures can be invoked only after a file handle for the remotely mounted directory has been esta- blished. NFS servers are stateless servers. A stateless file server avoids to keep state informations by making each request self-contained. That is, each request iden- tifies the file and the position of the file in full. So, the server needs not to store file pointer. Moreover, it needs not to establish or terminate a connection by opening a file or closing a file, repectively. For reading a directory, NFS does not use any file pointer, it uses a magic cookie.
Except the opening and closing a file, there is almost one-to-one mapping between Unix system calls for file operations and the NFS protocol RPCs. A remote file operation can be translated directly to the corresponding RPC. Though conceptu- ally, NFS adheres to the remote service paradigm, in practice, it uses buffering and caching. File blocks and attributes are fetched by RPCs and cached locally. Future remote operations use the cached data, subject to consistency constraints.
Since, NFS runs on RPC and RPC runs on UDP/IP which is unreliable, operations should be idempotent.

Cache Update Policy

The policy used to write modified data blocks to the server's master copy has critical effect on the system performance and reliability. The simplest policy is to write through the disk as soon as they are placed on any cache. It's advantageous because it ensures the reliability but it gives poor performance. In server site this policy is often followed. Another policy is delayed write. It does not ensure reliability. Client sites can use this policy. Another policy is write-on-close. It is a variation of delayed write. This is used by Andrews File System (AFS).
In NFS, clients use delayed write. But they don't free delayed written block until the server confirms that the data have been written on disk. So, here, Unix semantics are not preserved. NFS does not handle client crash recovery like Unix. Since, servers in NFS are stateless, there is no need to handle server crash recovery also.

Time Skew

Because of differences of time at server and client, this problem occures. This may lead to problems in performing some operations like " make ".

Performance Issues

To increase the reliability and system performance, the following things are generally done.
  1. Cache, file blocks and directory informations are maintained.
  2. All attributes of file / directory are cached. These stay 3 sec. for files and 30 sec. for directory.
  3. For large caches, bigger block size ( 8K ) is benificial.
This is a brief description of NFS version 2. NFS version 3 has already been come out and this new version is an enhancement of the previous version. It removes many of the difficulties and drawbacks of NFS 2.

Andrews File System (AFS)

AFS is a distributed file system, with scalability as a major goal. Its efficiency can be attributed to the following practical assumptions (as also seen in UNIX file system):
  • Files are small (i.e. entire file can be cached)
  • Frequency of reads much more than those of writes
  • Sequential access common
  • Files are not shared (i.e. read and written by only one user)
  • Shared files are usually not written
  • Disk space is plentiful
AFS distinguishes between client machines (workstations) and dedicated server machines. Caching files in the client side cache reduces computation at the server side, thus enhancing performance. However, the problem of sharing files arises. To solve this, all clients with copies of a file being modified by another client are not informed the moment the client makes changes. That client thus updates its copy, and the changes are reflected in the distributed file system only after the client closes the file. Various terms related to this concept in AFS are:
  • Whole File Serving: The entire file is transferred in one go, limited only by the maximum size UDP/IP supports
  • Whole File Caching: The entire file is cached in the local machine cache, reducing file-open latency, and frequent read/write requests to the server
  • Write On Close: Writes are propagated to the server side copy only when the client closes the local copy of the file
In AFS, the server keeps track of which files are opened by which clients (as was not in the case of NFS). In other words, AFS has stateful servers, whereas NFS has stateless servers. Another difference between the two file systems is that AFS provides location independence (the physical storage location of the file can be changed, without having to change the path of the file, etc.) as well as location transparency (the file name does not hint at its physical storage location). But as was seen in the last lecture, NFS provides only location transparency. Stateful servers in AFS allow the server to inform all clients with open files about any updates made to that file by another client, through what is known as a callback. Callbacks to all clients with a copy of that file is ensured as a callback promise is issued by the server to a client when it requests for a copy of a file.
The key software components in AFS are:
  • Vice: The server side process that resides on  top of the unix kernel, providing shared file services to each client
  • Venus: The client side cache manager which acts as an interface between the application program and the Vice

All the files in AFS are distributed among the servers. The set of files in one server is referred to as a volume. In case a request can not be satisfied from this set of files, the vice server informs the client where it can find the required file.
The basic file operations can be described more completely as:
  • Open a file: Venus traps application generated file open system calls, and checks whether it can be serviced locally (i.e. a copy of the file already exists in the cache) before requesting ×Vice for it. It then returns a file descriptor to the calling application. Vice, along with a copy of the file, transfers a callback promise, when ×Venus requests for a file.
  • Read and Write: Reads/Writes are done from/to the cached copy.
  • Close a file: Venus traps file close system calls and closes the cached copy of the file. If the file had been updated, it informs the ×Vice server which then replaces its copy with the updated one, as well as issues callbacks to all clients holding callback promises on this file. On receiving a callback, the client discards its copy, and works on this fresh copy.
The server wishes to maintain its states at all times, so that no information is lost due to crashes. This is ensured by the Vice which writes the states to the disk. When the server comes up again, it also informs all the servers about its crash, so that information about updates may be passed to it.
A client may issue an open immediately after it issued a close (this may happen if it has recovered from a crash very quickly). It will wish to work on the same copy. For this reason, ×Venus waits a while (depending on the cache capacity) before discarding copies of closed files. In case the application had not updated the copy before it closed it, it may continue to work on the same copy. However, if the copy had been updated, and the client issued a file open after a certain time interval (say 30 seconds),  it will have to ask the server the last modification time, and accordingly, request for a new copy. For this, the clocks will have to be synchronized.