Wednesday, 4 December 2013

C program to demonstrate working of Turing Machine

Leave a Comment
        Turing machine is a imaginary device with infinite tape which manipulates the symbols on tape to get required result on the basis of specified rule. Instead of going in a theoretical detail we will concentrate on practical implementation of it.         Here we are going to demonstrate "n mod 2" implementation using Turing machine. In this example we take...
Read More...

Friday, 25 October 2013

Calculate time in C or CPP program

Leave a Comment
      There are many methods to calculate time taken by part of execution or whole program in gcc as mention below.        Out of this time() function gives the accuracy up-to seconds. But generally we require accuracy in micro or nano seconds to check the little difference. So we are going to see the time calculation using clock_gettime() and gettimeofday() function for well known...
Read More...

Tuesday, 15 October 2013

Matrix Multiplication in MPI

1 comment
         Message Passing Interface (MPI) is used for distributed computing. MPI is not a language it is library used to fork multiple processes and communicate between them using efficient protocols. MPI has many distributions such as MPICH, MVAPICH, OpenMPI etc.          The program below explains simple matrix multiplication using point to point communication...
Read More...

Monday, 14 October 2013

Demonstrate Dispatcher Worker model using pthread

Leave a Comment
        Dispatcher Worker model also called as Boss worker model. In this model there is a server process which contain one dispatcher or boss thread and multiple worker threads. Dispatcher thread continuously check the status of the worker threads and assign job to the thread which is free or idle. Working of this model can be shown in the figure shown below.        ...
Read More...

Friday, 11 October 2013

Apache Thrift Tutorial

1 comment
Introduction        Apache thrift is a tool developed at Facebook which is used for automatically creating remote servers in Remote Procedure Call (RPC) in different languages. Thrift means economical, since it is saving time and cost for creating remote servers in RPC.  Apache thrift support many different languages . Apache thrift won't create client, you require to create the client program...
Read More...