NETWORK SOFTWARE APPLICATILON

1 . Socket – Application programming Interface.

2 . Protocal Implementationn

Network Software

For a success of the Internet, network architectures and protocol specification are the important factors.

Number of users are go on increasing, day by day. At the same time, computing power is also increasing. The computer networks have always been capable in

principle of transporting any kind of information.

Socket-Application Programming Interface

.Socket is the interface between the application layer and transport layer within a host. It is communication end points.

application and the network.

Socket is also referred to as application programming interface (API) between the

Each operating system defines its own network API User has control of everything on the application layer side of the socket has little control of the transport layer side of the socket.

Clients and servers establish connections and communicate via socket. Sockets are the end points of internet communication. application also use socket to communicate. Client create client socket and connect them to server sockets.

Server programs use the well known port number associated with their application protocol. A chent communicate with server by establishing a connection to the socket of the server. The client and server then exchange data over the connections

Before an application program can transfer any data, it must first create an end point for communication by calling socket Socket facilities are provided in C Language To use these facilities, the header files ctypes.h> and <socket.h> must be included in the program Its prototype is

int scket fint family, int type, int protocol); where the tamils identifies the family by address or protocol. The address family

identities a collection of protocol with the same address format, while the protocol family identifies a collection of protocols having the same architecture The type identifies the semantics of communication. A SOCK-STREAM is one type and provides data delivery service as a sequence of bytes and does not preserve message boundaries The protocol identifies the specific protocol to be used. Normally, only one protocol available for each family and type, so the value for the protocol argument is usually set

to 0 (zero) to indicate the default protocol After a socket is created, the bind system call can be used to assign an address to

the socket. Its prototype is int bind (int sd, struct sockaddr name, int namelen);

where sd is the socket descriptor returned by the socket call, name is a pointer to an address structure that contains the local IP address and port number, and nameless is the size of the address structure in bytes. The bind system call returns 0 on success and – 1 on failure

A client establishes a connection on a socket by calling connect. The prototype is int connect (int sd, structure sockaddr name, int namelen), parameter functions of connect prototype is same as bind For connection-oriented, connect attempts to establish a virtual circuit between chent and a server. A connection-oriented server indicates its response to receive connection request by calling listen the prototype is

int listen fint sd, int backlog

where sd is socket descriptor returned by the socket call and backlog specifies the maximum number of connection requests that the system should queue while it waits for the server to accept them.

Server can accept the connection request after listen call. The prototype for accept is

int accept int sd, struct sockaddr “addr, int “addrlen

When OS recieve a message from network it allocate process for it.

This model is more efficient than process-per-protocol model. Context switching not used in this model.

For outgoing messages, the application process invokes the required procedure calls until the message is delivered.

Message Buffers

Send and receive system call uses buffer for storing messages. The message is copied from the application buffer to a network buffer by a topmost protocol. Fig. 1.7.4 shows a message buffer

In each layer, message data is copied from one buffer to another buffer. But this method increases load on CPU.

After this client and server transmit data using write and read system calls. If the socket is not used for long time, socket is closed by using close system call The prototype used for close call is: int close (int sd).

If socket is closed successfully, it returns 0 otherwise-1 for failure.

Protocol Implementation

Operating system uses process or thread for communication. Process executes without affecting other process Operating system allocates hardware as well as software resource to the process

OS allocates CPU cycles, address space, memory and 1/O devices to the process.

Process on the server to send a message to a process of another server, the sending process must identity the receiving process Network designer consider the position of the process in the server.

per-protocol

per-message

Controlled by user

Fig 1.7.1 shows the relation between process, socket and OS with transport protocol.

Controlled by operating system

When process stops execution by Fig. 1.7.1 Relation between process and OS

Message moves up and down the protocol stack. Fig 1.7.2 shows process-per-protocol model.

Rate :CBDC digital currency and Blockchain

Process-per-message model

It consider each protocol as a static piece of code.

Fig 1.7.3 shows process-per-message model.

Operating system solve this problem by defining an abstract data type for thessages.

Performance

The network performance is measured i various parameters such as: bandwidth, throughput, bandwidth delay product and jitter.

Bandwidth

is a characteristic of network: Bandwidth can be measured in hertz and

in bits per seconds

Bandwidth in Hertz

refers to the range of frequencies in a composite signal or the range of frequencies that a transmission channel can pass

Bandwidth in bps

refers to speed of bit transmission in a channel or link.

Throughput

is an actual measurement of how fast data can be transmitted where as bandwidth is a potential measurement of link

is usually less than bandwidth.

Search

Latency

It has four components. propagation time, transmission time, queuing time and processing delay

Bandwidth – Delay Product

The bandwidth and delay are two performance parameters of a link. The bandwidth delay product defines the number of bits that can fill the link

Jitter

parameter related to delay.  is introduced since different packets of data encounter delays. The data packets reaching at receiver at different times causing jitter.

 

 

Leave a Reply