Sei sulla pagina 1di 6

Practical 1

Objective: Study of High Performance Computing Concept:


High-performance computing (HPC) is the use of parallel processing for running advanced application programs efficiently, reliably and quickly. The term applies especially to systems that function above a teraflop or 1012 floating-point operations per second. The term HPC is occasionally used as a synonym for supercomputing, although technically a supercomputer is a system that performs at or near the currently highest operational rate for computers. Some supercomputers work at more than a petaflop or 1015 floating-point operations per second.

Output/ Screen Shots: It gives a introduction to the high performance computing and brief
overview of the High Performance Computing

Practical 2
Objective:Study of Globus as case study of grid computing. Concept:
In Grid Computing grid usually refers to a federation of multiple resources (including computation, storage, etc.) across different administrative domains. In other words, instead of proposing that multiple sites should merge to create a superorganization (with a central authority to rule them all), Grid Computing is based on allowing each site to retain local control over its resources, while establishing standard protocols for sharing resources, overlaying a virtual organization (or VO) on top of existing organizations (the term virtual organization and grid -lower case g- are sometimes used interchangeably). The Globus Toolkit was one of the earliest pieces of software to implement protocols that enabled sites in a grid to securely share resources. For a long time, the Globus Toolkit was the de-facto standard for Grid Computing and, in fact, some of the protocols developed in Globus, such as proxy certificates and GridFTP, became community-driven standards in their own right. the toolkit is fairly large, the components listed below are (broadly) the main components of the toolkit. Dont worry if these still seem a bit abstract, or if you dont fully understand how they relate to each other and to Globus Online. In the next chapter well take a deep dive into how these components work together specifically in the case of a GO-Transfer endpoint. GridFTP: A server implementing the standard GridFTP protocol, a high-performance, secure, reliable data transfer protocol optimized for high-bandwidth wide-area networks.

GO-Transfer endpoints are an abstraction for one or more GridFTP servers. SimpleCA: An easy to use Certificate Authority. we can use a CA like SimpleCA to generate certificates for our users and services. MyProxy: A server for managing PKI credentials (or, the proxy certificate server). More specifically, we can use MyProxy as both a credential repository (where user credentials are stored, with users requesting proxy certificates from MyProxy) or as an online certificate authority that uses SimpleCA to generate user credentials on the fly. Grid Security Infrastructure (GSI): A collection of tools and libraries for managing authentication, authorization and certificates. Nearly the entire toolkit is built on top of these libraries. Grid Resource Allocation and Management (GRAM5): This is actually a component that is not currently used in Globus Online. In a nutshell, GRAM is actually the component that does the heavy lifting when it comes to sharing computational resources. If a site has a supercomputer or a compute cluster, that system will typically have a very specific interface (e.g., Condor, PBS, etc. all have different interfaces) and site-specific security policies. GRAM provides a layer of abstraction over these systems, providing a single interface for users to request usage of a sites computational resources, with authorization and authentication handled with GSI.

Output/ Screen Shots: It gives a idea about the globus tool kit and its component which is
used in Grid Computing

Practical 3
Objective: Study and Practice socket library calls. Platform / Software environment: Linux Platform Concept:
The term sockets refers to the Application Program Interface (API) implemented for the Berkeley Software Distribution (BSD) of UNIX. The socket interface is used by processes executing under control of the UNIX operating system to access network services in a generalized manner. Sockets support process-to-process communications using a variety of transport mechanisms, including UNIX pipes and Internet and XNS protocols. Socket support is being extended to include ISO protocols a. socket() - create a new socket and return its descriptor

b. c. d. e. f. g.

bind() - associate a socket with a port and address listen() - establish queue for connection requests accept() - accept a connection request connect() - initiate a connection to a remote host recv() - receive data from a socket descriptor send() - send data to a socket descriptor

h. close()-close of a socket descriptor

Output/ Screen Shots: It gives a Introduction to Socket Programming and basic functions of
socket

Practical 4
Objective:Implement client-server communication using socket programming. Concept: a Socket is an end point of communication between two systems on a network. To be
a bit precise, a socket is a combination of IP address and port on one system. So on each system a socket exists for a process interacting with the socket on other system over the network. A combination of local socket and the socket at the remote system is also known a Four tuple or 4-tuple. Each connection between two processes running at different systems can be uniquely identified through their 4-tuple. There are two types of network communication models: 1. OSI 2. TCP/IP While OSI is more of a theoretical model, the TCP/IP networking model is the most popular and widely used., The communication over the network in TCP/IP model takes place in form of a client
server architecture. ie, the client begins the communication and server follows up and a connection is established.

Sockets can be used in many languages like Java, C++ etc but here in this article, we will understand the socket communication in its purest form (i.e in C programming language)

Procedure:
Client: #include <sys/socket.h> #include <sys/types.h>

#include <netinet/in.h> #include <netdb.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <arpa/inet.h> int main(int argc, char *argv[]) { int sockfd = 0, n = 0; char recvBuff[1024]; struct sockaddr_in serv_addr; printf(argc); if(argc != 2) { printf("\n Usage: %s <ip of server> \n",argv[0]); return 1; } memset(recvBuff, '0',sizeof(recvBuff)); if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { printf("\n Error : Could not create socket \n"); return 1; } memset(&serv_addr, '0', sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(5000); if(inet_pton(AF_INET, argv[1], &serv_addr.sin_addr)<=0) { printf("\n inet_pton error occured\n"); return 1; } if( connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { printf("\n Error : Connect Failed \n"); return 1; } while ( (n = read(sockfd, recvBuff, sizeof(recvBuff)-1)) > 0) { recvBuff[n] = 0; if(fputs(recvBuff, stdout) == EOF) { printf("\n Error : Fputs error\n");

} } if(n < 0) { printf("\n Read error \n"); } return 0; } Server: #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <time.h> int main(int argc, char *argv[]) { int listenfd = 0, connfd = 0; struct sockaddr_in serv_addr; char sendBuff[1025]; time_t ticks; listenfd = socket(AF_INET, SOCK_STREAM, 0); memset(&serv_addr, '0', sizeof(serv_addr)); memset(sendBuff, '0', sizeof(sendBuff)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); serv_addr.sin_port = htons(5000); bind(listenfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); listen(listenfd, 10); while(1) { connfd = accept(listenfd, (struct sockaddr*)NULL, NULL); ticks = time(NULL);

snprintf(sendBuff, sizeof(sendBuff), "%.24s\r\n", ctime(&ticks)); write(connfd, sendBuff, strlen(sendBuff)); close(connfd); sleep(1); } } How to Run: 1.Compile Client file with gcc o client client.c 2. Compile server file with gcc o server server.c 3. First run the server by writing ./server 4000. 4. Open new Terminal 5. Run the client in new Terminal by writing ./client 127.0.0.1 4000

Output/ Screen Shots: You can see the System date and time on client terminal sent by the
server. Wednesday 22 September 10.50 Am

Potrebbero piacerti anche