SlideShare a Scribd company logo
1 of 12
Download to read offline
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 6
Mathematical foundations of Multithreaded programming
concepts in Java language
Manoj Kumar Srivastav
Indira Gandhi National Open University
St. Xavier’s College (Autonomous), Kolkata,
Pin Code-700016, India
Dr. Asoke Nath
Associate Professor, Department of Computer
Science, St. Xavier’s College (Autonomous),
Kolkata, Pin code-700016, India
Abstract-The mathematical description of object oriented language has already been developed by Srivastav et al. The
authors have already published papers where they have shown that it is possible to describe programming language
such as C, Java using simple mathematical sets and relations. The authors have established that it is possible to
describe object oriented language like Java and its various aspects such as object, class, inheritance using simple
mathematical models. In the present study the authors have proposed the mathematical modeling of Multi threaded
programming in java language. The authors have tried to explore the single threaded program and as well as multi
threaded program using simple mathematical modeling. The same idea may be applied to C# language also
Keyword---object oriented, modeling, multithreaded, java, C#
I. INTRODUCTION
The term ‘thread’ plays an important role in object oriented programming in Java. Actually a thread is ‘a single
sequential flow of control within a program.’ The concept of single thread is quite simple to understand and it becomes
somewhat complex when there are multithreads running simultaneously, each performing different tasks within a single
program. This can be enabled by multithreading where we can write program containing multiple path of execution,
running concurrently, within a single program .In other words we can say that “ a single program having multiple
threads , executing concurrently, can be termed as multithreaded program.”
Definition of Multithreading : Multithreading is a conceptual programming paradigm where a program (process) into
two or more subprogram (processes), which can be implemented at the same time in parallel. For example, one
subprogram can display animation on the screen while another may build the next animation to be displayed. This is
something similar to dividing tasks into subtasks and assigning them.
Main Thread
Main module method
start start start
switching switching
Thread CThread BThread A
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 7
It is important to remember that ‘thread running in parallel’ does not really mean that they actually run at the same time.
Since all the threads are running on a single processor, the flow of execution is shared between the threads.
Multithreading and memory space: Multithreading is a actually a form of multitasking. Multitasking can either be
process-based or thread-based. If we assume some programs as processes, the process-based multitasking is nothing but
execution of more than one program concurrently.
On the other hand, thread-based multitasking is executing a program having more than one thread, performing different
tasks simultaneously. Processes are heavyweight tasks, while threads are lightweight’s tasks. In process-based
multitasking, different processes are actually different programs, thus they share different address spaces. The context
switching of CPU from one process to another requires more overhead as different spaces are involved in the same. On
the contrary, the thread-based multitasking, different threads are part of the same program, thus they share the same
address space and context switching of CPU occurs within the program, i.e within the same address space.
Multitasking:
Multitasking is a process of executing multiple tasks simultaneously. We use multitasking to utilize the CPU.
Multitasking can be achieved by two ways:
(i)Process-based Multitasking(Multiprocessing)
(ii)Thread-based Multitasking(Multithreading)
(i)Process-based Multitasking (Multiprocessing)
 Each process have its own address in memory i.e. each process allocates separate memory area.
 Process is heavyweight.
 Cost of communication between the process is high.
 Switching from one process to another require some time for saving and loading registers, memory maps,
updating lists etc.
(ii) Thread-based Multitasking (Multithreading):
Threads share the same address space.
Thread is lightweight.
Cost of communication between the thread is low.
Note:At least one process is required for each thread.
II. MATHEMATICAL DESCRIPTION OF MULTITHREADING
Mathematical Description of class and object: Object-Oriented programming language is based on the following
properties:
(i) Class and Object
(ii) Data Abstraction and Encapsulation
(iii) Inheritance
(iv) Polymorphism.
Class is a collection of objects of similar type.
Set: A set is well- defined collection of distinct objects of our perception or our thought ,to be conceived as a whole.
Set of sets: we have defined a set as a collection of its elements. If the elements be set themselves, then we have a family
of sets, or set of sets. For example, the collection of all subsets of a non-empty set S is a set of sets. This set is said to be
the power set of S and is denoted by P(S). Class may be defined as follows: -
In set theory and its application throughout mathematics, a class is collection of sets where each set has some common
property. The members of a class are countable.
So therefore, class={ sets : where all members have some common property}
The basic form of a class in object –oriented programming is
class classname
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 8
{ parameter declaration;
Method declaration;
}
Object: The members of a class are called an object. Since the members of a class is a set .Therefore it should possesses
some property. Objects are real world entity such as pen, chair, tables,etc.
Similar comparision between set theory and object oriented language :
Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. Any entity
that has state and behavior is known as an object. For example: chair, pen, table, etc. It can be physical and logical.
Collection of objects is called class. It is a logical entity. Any programming problem is analyzed in terms of objects and
the nature of communication between them. An object takes up space in the memory and has an associated address
like structure in C.
Thus, class is a set of object and object is a set having some common feature. We can write the class by the symbol ,
, ……etc and object by X,Y, Z……. etc.
MEMORY SPACE :An object is in Java is essentially a block of memory that contains space to store all instance
variables. i.e each object of a class contain an address in memory space. Memory space for an object={address of the
instance variables: variables are members of class}
Creating an object is also referred to as instantiating an object. Objects in Java are created using the new operator .The
new operator creates an object of the specified class and returns a reference to that object. Therefore the address of the
new object is changed.
Initial object has an address New object have new address
Therefore we define a mapping f:(X,τ)  (Y,σ) such that f(address of object)=address of new object[ Here X and Y are
object set and τ are set of sets with respect to object X and σ are set of sets with respect to object Y. Actually τ represents
classes for domain and σ represents class for range in the above function and f represents main function.
Mathematical Explanation of Multithreading:
A unique property of Java is its support for multithreading .That is, Java enables us to use multiple flows of control in
developing program. Each flow of control may be thought of as a separate tiny program (or module ) known as thread
that runs in parallel to others.
Let (X1,τ1
), (X2,τ2
), (X3,τ3
), …….. (Xn, τ n
) be representing the n-threads and may be running parallel and are
subprogram of main threads/program (X,τ). Let (Y,τ) be representing new threads(objects).
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 9
(X1,τ1
)
(X2,τ2
) (X, τ) (Y,τ)
(X3,τ3
)
( Xn, τ n)
Mathematically, the function can occurs as follows:
Let f1 : (X1,τ1) (X,τ),
f2 : (X2,τ2) (X,τ),
f3 : (X3,τ3) (X,τ),
………………………………….
fn : (Xn,τn) (X,τ), and finally, the function f :(X, τ) (Y ,τ) ,i.e the address of the thread (X1,τ1) , (X2,τ2),
(X3,τ3) ………………………… (Xn ,τn) mapping to the thread (X ,τ) and finally the address of the thread (X ,τ)
maps to new object/thread (Y,τ).Thus we can say that f(f i) : (X ,τ) (Y ,τ),
i.e . f (f i( (Address of domain))=address of range ,for i=1,2,3,………,n.
Example :Illustrate with an example on multithreading in Java.
Class A extends Thread
{
public void run()
{
for(int i=1; i<=5; i++)
{
System.out.println(“t From Thread A : = “ +i);
}
System.out.println(“ Exit from A”);
}
}
Class B extends Thread
{
public void run()
{
for(int i=1; i<=5; i++)
{
System.out.println(“t From Thread A : = “ +i);
}
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 10
System.out.println(“ Exit from A”);
}
}
Class C extends Thread
{
public void run()
{
for(int i=1; i<=5; i++)
{
System.out.println(“t From Thread A : = “ +i);
}
System.out.println(“ Exit from A”);
}
}
Class ThreadTest
{
public static void main(String args[])
{
new A().start();
new B().start();
new C().start();
}
}
Let us explain the example mathematically:
Class A extends thread i.e Taking
the address of class A
Class B extends thread i.e Taking
the address of class B
Class C extends thread i.e Taking
the address of class C
III MATHEMATICAL PROPERTIES OF THE MULTITHREADING
Properties(i):The space (X1,τ1) , (X2,τ2), (X3,τ3) ………………………… (Xn ,τn) are disconnected space.All the
threads are disconnected.
[ Definition of disconnected space.Then a subset E of X is said to be disconnected iff there exist two non-empty
separated set A and B such that E=A B.
Separated Set : :Let ( X, τ ) be a topological space. Two non empty subset A and B of X are said to be separated if and
only if A ∩ Bc
= and AC
∩ B= ]
Properties (ii) :Two sets are separated if and only if they are disjoint and neither of them contains limit point of the
other. Similarly all threads runs separately and output given by each threads does not depends on any threads.
Properties (iii) Subset of separated sets are separated. The thing can be illustrated by the following diagram for the
multithreading.
Class
threadTest.i.e
taking the
address of
thread Test
New object is
created.i.e
taking the
address of new
object.
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 11
Thread1 some parts of threads running
Thread 2 all parts of the thread running Main Thread New object /class/thread created
Thread 3 some parts of threads are in the rest mode
//:class anthread _2: Write a program in java to implement
//multithreaded program : Use yield(), sleep(), stop() method
import java.io.*;
class thread_A extends Thread
{
public void run()
{
int i,s,n;
try
{
System.out.println("nEntered in thread_A");
n=4;
s=0;
for(i=1;i<=n;i++)
{
s=s+i;
System.out.println("i="+i+" s="+s);
if(i==3)
{
System.out.println("nthread_A goes to sleep mode");
sleep(1000);
System.out.println("nOut of sleep mode in thread_A");
}
}
}
catch(Exception e){}
}
}
class thread_B extends Thread
{
public void run()
{
int j,p,m;
System.out.println("nEntered in thread_B");
m=4;
________
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 12
p=1;
for(j=1;j<=m;j++)
{
p=p*j;
System.out.println("j="+j+" p="+p);
if(j==3)
{
System.out.println("nthread_A goes to yield() mode");
yield();
System.out.println("nOut of yield() mode in thread_B");
}
}
}
}
class thread_C extends Thread
{
public void run()
{
int k,s1,d,k1;
System.out.println("nEntered in thread_C");
k=1234;
k1=k;
s1=0;
while(k1 != 0)
{
d=k1%10;
s1=s1+d;
System.out.println("k1="+k1+" d="+d);
if(k1<100)
{
System.out.println("nthread_C goes to stop() mode");
stop();
System.out.println("nOut of stop() mode in thread_C");
}
k1=k1/10;
}
}
}
class anthread_2
{
public static void main(String args[])throws IOException
{
thread_A A=new thread_A();
thread_B B=new thread_B();
thread_C C=new thread_C();
System.out.println("Calling thread_A");
A.start();
System.out.println("Calling thread_B");
B.start();
System.out.println("Calling thread_C");
C.start();
System.out.println("nEnd of main thread");
}
}
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 13
Remarks : There may be the situation in which some threads are running and some are in the stop mode or some
parts of a thread are working..But in all the situation each threads are separated.
class thread_A extends Thread sleep() mode may be working in some parts here.
class thread_B extends Thread yield() mode may be working on the some stage of
thread
class thread_C extends Thread stop() mode is working on the some stage of thread
Thread Priority : In Java, each thread is assigned a priority, which affects the order in which it is scheduled for
running. Mathematically, thread priority are the set which assigned with some indexed number and having some fixed
probability value in all the situation.
//anthread_3.java: Write a program in java to implement
//multithreaded program: Use setPriority(), sleep(), stop()
//method
import java.io.*;
class thread_A extends Thread
{
public void run()
{
int i,s,n;
try
{
System.out.println("nEntered in thread_A");
n=4;
s=0;
for(i=1;i<=n;i++)
{
s=s+i;
System.out.println("i="+i+" s="+s);
if(i==3)
{
System.out.println("nthread_A goes to sleep mode");
sleep(1000);
System.out.println("nOut of sleep mode in thread_A");
}
}
}
catch(Exception e){}
}
}
class thread_B extends Thread
{
public void run()
{
int j,p,m;
System.out.println("nEntered in thread_B");
m=4;
p=1;
for(j=1;j<=m;j++)
{
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 14
p=p*j;
System.out.println("j="+j+" p="+p);
if(j==3)
{
System.out.println("nthread_A goes to yield() mode");
yield();
System.out.println("nOut of yield() mode in thread_B");
}
}
}
}
class thread_C extends Thread
{
public void run()
{
int k,s1,d,k1;
System.out.println("nEntered in thread_C");
k=1234;
k1=k;
s1=0;
while(k1 != 0)
{
d=k1%10;
s1=s1+d;
System.out.println("k1="+k1+" d="+d);
if(k1<100)
{
System.out.println("nthread_C goes to stop() mode");
stop();
System.out.println("nOut of stop() mode in thread_C");
}
k1=k1/10;
}
}
}
}
}
class anthread_3
{
public static void main(String args[])throws IOException
{
thread_A A=new thread_A();
thread_B B=new thread_B();
thread_C C=new thread_C();
System.out.println("Calling thread_A");
A.setPriority(Thread.MAX_PRIORITY);
B.setPriority(Thread.MIN_PRIORITY);
C.setPriority(Thread.NORM_PRIORITY);
System.out.println("Calling thread_C");
C.start();
System.out.println("Calling thread_B");
B.start();
System.out.println("Calling thread_A");
A.start();
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 15
System.out.println("nEnd of main thread");
}
}
Remarks :
Threads Probability
A.setPriority(Thread.
MAX_PRIORITY);
Thread has highest value of probability of running
B.setPriority(Thread.MI
N_PRIORITY);
Thread has lowest value of probability of running
C.setPriority(Thread.N
ORM_PRIORITY);
Thread has the value of probability that lies between highest value and lowest
value of probability of running of threads.
Definition of Probability of an Event: If there are n elementary events associated with a random experiment and m of
them are favourable to an event A, then the probability of happening or occurrence of A is denoted by P(A) and is
defined in the ratio m/n. Thus,P(A)=m/n, clearly, 0≤m≤n.
Therefore , 0≤m/n≤1
0≤P(A)≤ 1. If P(A)=1, then A is called certain events and A is called impossible events.
The value of thread priority lies between 1-10,The Min_Priority,Norm _Priority and Max_Priority have distinct value
and it are respectively 1,5 and 10 .
IV .LIFE CYCLE OF A THREAD (THREAD STATES)
A thread can be in one of the five states in the thread. According to sun, there is only 4 states new, runnable, non-
runnable and terminated. There is no running state. But for better understanding the threads, we are explaining it in the 5
states. The life cycle of the thread is controlled by JVM. The thread states are as follows:
1. New
2. Runnable
3. Running
4. Non-Runnable (Blocked)
5. Terminated
1)New :
The thread is in new state if you create an instance of Thread class but before the invocation of start() method.
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 16
2)Runnable
The thread is in runnable state after invocation of start() method, but the thread scheduler has not selected it to be the
running thread.
3)Running
The thread is in running state if the thread scheduler has selected it.
4)Non-Runnable (Blocked)
This is the state when the thread is still alive, but is currently not eligible to run.
5)Terminated
A thread is in terminated or dead state when its run() method exits.
Mathematical Description Of State Transition diagram of a thread :
Let (X,τ1) denotes the newborn thread where X is object and τ1 denotes the class (or thread) with respect to
object X.
Let (Y,τ2) denotes the runnable/running thread where Y is object and τ2 denotes the class (or thread) with
respect to object Y
Let (Z,τ3) denotes the Blocked thread where Z is object and τ3denotes the class (or thread) with respect to
object Z
Let (D,τ4) denotes the dead/ killed thread where D is object and τ4denotes the class (or thread) with respect to
object D
f1 f
g
f2 f3 h
Note : Let us assume the following mapping occurs in the different memory spaces.
Here f1 :(X,τ1) (Y,τ2)
f2 :(Y,τ2) (Z,τ3)
f3 :(Z,τ3) (Y,τ2)
f :(X,τ1) (D,τ4)
g : (Y,τ2) ( D,τ4)
h :(Z,τ3) (D,τ4)
Case 1:Newborn state to Dead state: Here ,we can define the function f :(X,τ1) (D,τ4)
Such that f(address value of newborn thread)=address value of killed thread. Actually ,we may use stop() as a function in
the stage.
Case 2:Newborn state to Dead state via running and runnable state: Here we can define the function f1
:(X,τ1) (Y,τ2) and g: (Y,τ2) (D,τ4) such that g(f) : :(X,τ1) (D,τ4)
i.e. g(f(address value of new born state))= address value of dead state.
Case 3: Newborn state to Dead state via running , runnable state and Blocked state::In this stage, we can
define the composite function as follows :
h(f2(f1)) :(X,τ1) ( D,τ4)
h(f2(f1 (address value of new born state)))= address value of dead state
or
g(f3(f2(f1))) : (X,τ1) ( D,τ4)
g(f3(f2(f1 (address value of new born state))))= address value of dead state.
(X,τ1 )
(Y,τ2)
(Z,τ3)
(D,τ4)
International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O)
Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P)
www.ijiris.com
_________________________________________________________________________________________________
© 2014, IJIRIS- All Rights Reserved Page - 17
V. CONCLUSION
Multithreading is a process where we can make the correlation between the multithreading and disconnected space of a
Topological scope. The embedding of the thread in to the main threads will be helpful to justify the memory space of
different threads. Life Cycle of a thread can also be described mathematically and it also obeys the properties of
disconnected space.
REFERENCES
[1] Manoj Kumar Srivastav , Asoke Nath Mathematical modeling of various statements of C-type Language, ,
International Journal of Advanced Computer Research(IJACR), Vol-3,Number-1, Issue-13, Page:79-87 Dec(2013).
[2] Manoj Kumar Srivastava, Asoke Nath Mathematical Description of variables, pointers, structures, Unions used in C-
type language, , Joiurnal of Global Research Computer Science, Vol-5, No-2, Page:24-29, Feb(2014)
[3] Manoj Kumar Srivastav, Asoke Nath, A Mathematical Modeling of Object Oriented Programming Language : a case
study on Java programming language, Current Trends in Technology and Science(CTTS) Vol-3, Issue-3, Page 134-
141,(2014).
[4] Manoj Kumar Srivastav, Asoke Nath, Analysis of Compilation Errors, Runtime Errors, Reliability and Validity of a
Program: A Case Study on C-language : IJISET - International Journal of Innovative Science, Engineering &
Technology, Vol. 1 Issue 3, May 2014. Page-281-288.
[5] E Balaguruswamy- Programming with Java-TataMcGrawHill EductionP rivate Limited.,2011
[6] Sachin Malhotra, Sourabh Choudhary- Programming in Java- OXFORD University Press,2012
[7] Herbert Schildt, Java TM 2: The Complete Reference, TataMcGraw-Hill Publishing Company Limited,2001
[8] Satish Jain,Vineeta Pillai,Kratika, Introduction to Object Oriented Programming through Java,BPB Publications,2011
[9] S.K.Mapa, Real Analysis , Asoke Prakasan 1998
[10] S.K.Mapa Higher Algebra, -Sarat Book Distribution,2000
[11] K.D.Joshi-Topology.New Age International Publiocation.
[12] J.N Sharma, "Topology", Krishna Prakashan Media(p)Ltd., Meerut, (2000)
[13]R.S.aggarwal-Topology-S.chand publication.
[14]James R Munkers-Topology- Pearson Education Asia, 2001
[15] www.javatpoint.com
[16] R.D.Sharma. Mathematics class xi-. Danapat Rai Publications(P) LTD.

More Related Content

What's hot

Deep Learning for Search
Deep Learning for SearchDeep Learning for Search
Deep Learning for SearchBhaskar Mitra
 
Cso gaddis java_chapter6
Cso gaddis java_chapter6Cso gaddis java_chapter6
Cso gaddis java_chapter6RhettB
 
Tdm probabilistic models (part 2)
Tdm probabilistic  models (part  2)Tdm probabilistic  models (part  2)
Tdm probabilistic models (part 2)KU Leuven
 
Text categorization
Text categorizationText categorization
Text categorizationKU Leuven
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistencePrem Lamsal
 
W3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed ArraysW3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed ArraysChanghwan Yi
 
Mapping Subsets of Scholarly Information
Mapping Subsets of Scholarly InformationMapping Subsets of Scholarly Information
Mapping Subsets of Scholarly InformationPaul Houle
 
Text classification-php-v4
Text classification-php-v4Text classification-php-v4
Text classification-php-v4Glenn De Backer
 
Text classification using Text kernels
Text classification using Text kernelsText classification using Text kernels
Text classification using Text kernelsDev Nath
 
Boolean,vector space retrieval Models
Boolean,vector space retrieval Models Boolean,vector space retrieval Models
Boolean,vector space retrieval Models Primya Tamil
 
Farthest Neighbor Approach for Finding Initial Centroids in K- Means
Farthest Neighbor Approach for Finding Initial Centroids in K- MeansFarthest Neighbor Approach for Finding Initial Centroids in K- Means
Farthest Neighbor Approach for Finding Initial Centroids in K- MeansWaqas Tariq
 
Data mining classifiers.
Data mining classifiers.Data mining classifiers.
Data mining classifiers.ShwetaPatil174
 
20070702 Text Categorization
20070702 Text Categorization20070702 Text Categorization
20070702 Text Categorizationmidi
 
Text Classification, Sentiment Analysis, and Opinion Mining
Text Classification, Sentiment Analysis, and Opinion MiningText Classification, Sentiment Analysis, and Opinion Mining
Text Classification, Sentiment Analysis, and Opinion MiningFabrizio Sebastiani
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingAyushiDubey19
 

What's hot (20)

Deep Learning for Search
Deep Learning for SearchDeep Learning for Search
Deep Learning for Search
 
Cso gaddis java_chapter6
Cso gaddis java_chapter6Cso gaddis java_chapter6
Cso gaddis java_chapter6
 
Tdm probabilistic models (part 2)
Tdm probabilistic  models (part  2)Tdm probabilistic  models (part  2)
Tdm probabilistic models (part 2)
 
Text categorization
Text categorizationText categorization
Text categorization
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistence
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
W3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed ArraysW3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed Arrays
 
Mapping Subsets of Scholarly Information
Mapping Subsets of Scholarly InformationMapping Subsets of Scholarly Information
Mapping Subsets of Scholarly Information
 
[ppt]
[ppt][ppt]
[ppt]
 
Text classification-php-v4
Text classification-php-v4Text classification-php-v4
Text classification-php-v4
 
Text classification using Text kernels
Text classification using Text kernelsText classification using Text kernels
Text classification using Text kernels
 
Boolean,vector space retrieval Models
Boolean,vector space retrieval Models Boolean,vector space retrieval Models
Boolean,vector space retrieval Models
 
Farthest Neighbor Approach for Finding Initial Centroids in K- Means
Farthest Neighbor Approach for Finding Initial Centroids in K- MeansFarthest Neighbor Approach for Finding Initial Centroids in K- Means
Farthest Neighbor Approach for Finding Initial Centroids in K- Means
 
Term weighting
Term weightingTerm weighting
Term weighting
 
Data mining classifiers.
Data mining classifiers.Data mining classifiers.
Data mining classifiers.
 
Oops slide
Oops slide Oops slide
Oops slide
 
20070702 Text Categorization
20070702 Text Categorization20070702 Text Categorization
20070702 Text Categorization
 
Text Classification, Sentiment Analysis, and Opinion Mining
Text Classification, Sentiment Analysis, and Opinion MiningText Classification, Sentiment Analysis, and Opinion Mining
Text Classification, Sentiment Analysis, and Opinion Mining
 
Fuzzy Clustering(C-means, K-means)
Fuzzy Clustering(C-means, K-means)Fuzzy Clustering(C-means, K-means)
Fuzzy Clustering(C-means, K-means)
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 

Viewers also liked

куаныш аманжолов+шиномонтажка+идея
куаныш аманжолов+шиномонтажка+идеякуаныш аманжолов+шиномонтажка+идея
куаныш аманжолов+шиномонтажка+идеяКуаныш аманжолов
 
Artilharia copas regionais
Artilharia copas regionaisArtilharia copas regionais
Artilharia copas regionaisRafael Passos
 
VANCL logistics operations mode selection analysis
VANCL logistics operations mode selection analysisVANCL logistics operations mode selection analysis
VANCL logistics operations mode selection analysisAM Publications,India
 
Artilharia brasileirão
Artilharia brasileirãoArtilharia brasileirão
Artilharia brasileirãoRafael Passos
 
Artilharia copas regionais
Artilharia copas regionaisArtilharia copas regionais
Artilharia copas regionaisRafael Passos
 
Life Cycle Cost Analysis
Life Cycle Cost AnalysisLife Cycle Cost Analysis
Life Cycle Cost Analysisimagstech
 
mohamed gamal elseidy cv
mohamed gamal elseidy cvmohamed gamal elseidy cv
mohamed gamal elseidy cvmohamed elseidy
 
New Logo Launch
New Logo LaunchNew Logo Launch
New Logo Launchcpack
 
Brief Introduction
Brief IntroductionBrief Introduction
Brief Introductionceilabb10
 
What next for Facebook
What next for FacebookWhat next for Facebook
What next for FacebookAndy Pemberton
 
Episode 55 : Conceptual Process Synthesis-Design
Episode 55 :  Conceptual Process Synthesis-DesignEpisode 55 :  Conceptual Process Synthesis-Design
Episode 55 : Conceptual Process Synthesis-DesignSAJJAD KHUDHUR ABBAS
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic)  : Dr. Purnima PanditSoft computing (ANN and Fuzzy Logic)  : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima PanditPurnima Pandit
 

Viewers also liked (15)

WooCommerce Development Company Dallas
WooCommerce Development Company DallasWooCommerce Development Company Dallas
WooCommerce Development Company Dallas
 
Socialmediacourse 1
Socialmediacourse 1Socialmediacourse 1
Socialmediacourse 1
 
куаныш аманжолов+шиномонтажка+идея
куаныш аманжолов+шиномонтажка+идеякуаныш аманжолов+шиномонтажка+идея
куаныш аманжолов+шиномонтажка+идея
 
Artilharia copas regionais
Artilharia copas regionaisArtilharia copas regionais
Artilharia copas regionais
 
VANCL logistics operations mode selection analysis
VANCL logistics operations mode selection analysisVANCL logistics operations mode selection analysis
VANCL logistics operations mode selection analysis
 
Artilharia brasileirão
Artilharia brasileirãoArtilharia brasileirão
Artilharia brasileirão
 
Artilharia copas regionais
Artilharia copas regionaisArtilharia copas regionais
Artilharia copas regionais
 
Life Cycle Cost Analysis
Life Cycle Cost AnalysisLife Cycle Cost Analysis
Life Cycle Cost Analysis
 
mohamed gamal elseidy cv
mohamed gamal elseidy cvmohamed gamal elseidy cv
mohamed gamal elseidy cv
 
Lol
LolLol
Lol
 
New Logo Launch
New Logo LaunchNew Logo Launch
New Logo Launch
 
Brief Introduction
Brief IntroductionBrief Introduction
Brief Introduction
 
What next for Facebook
What next for FacebookWhat next for Facebook
What next for Facebook
 
Episode 55 : Conceptual Process Synthesis-Design
Episode 55 :  Conceptual Process Synthesis-DesignEpisode 55 :  Conceptual Process Synthesis-Design
Episode 55 : Conceptual Process Synthesis-Design
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic)  : Dr. Purnima PanditSoft computing (ANN and Fuzzy Logic)  : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
 

Similar to Mathematical foundations of Multithreaded programming concepts in Java language

Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Languagedheva B
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEWONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEWijait
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW ijait
 
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxA Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxdaniahendric
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersSatyam Jaiswal
 
Analyzing a system and specifying the requirements
Analyzing a system and specifying the requirementsAnalyzing a system and specifying the requirements
Analyzing a system and specifying the requirementsvikramgopale2
 
Ingles proyecto traducido
Ingles proyecto traducidoIngles proyecto traducido
Ingles proyecto traducidoJoseph Manuelth
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptkaavyashruthi
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptRamadossSundaramoort1
 
Discussion forum unit 6 - Software Engineering 2.docx
Discussion forum unit 6 - Software Engineering 2.docxDiscussion forum unit 6 - Software Engineering 2.docx
Discussion forum unit 6 - Software Engineering 2.docxwilsonchandiga1
 

Similar to Mathematical foundations of Multithreaded programming concepts in Java language (20)

Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEWONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
 
General OOP concept [by-Digvijay]
General OOP concept [by-Digvijay]General OOP concept [by-Digvijay]
General OOP concept [by-Digvijay]
 
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxA Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Java notes jkuat it
Java notes jkuat itJava notes jkuat it
Java notes jkuat it
 
Java notes(OOP) jkuat IT esection
Java notes(OOP) jkuat IT esectionJava notes(OOP) jkuat IT esection
Java notes(OOP) jkuat IT esection
 
653 656
653 656653 656
653 656
 
Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & Answers
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
Analyzing a system and specifying the requirements
Analyzing a system and specifying the requirementsAnalyzing a system and specifying the requirements
Analyzing a system and specifying the requirements
 
Ingles proyecto traducido
Ingles proyecto traducidoIngles proyecto traducido
Ingles proyecto traducido
 
Java oo ps concepts
Java oo ps conceptsJava oo ps concepts
Java oo ps concepts
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.ppt
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.ppt
 
Discussion forum unit 6 - Software Engineering 2.docx
Discussion forum unit 6 - Software Engineering 2.docxDiscussion forum unit 6 - Software Engineering 2.docx
Discussion forum unit 6 - Software Engineering 2.docx
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

Mathematical foundations of Multithreaded programming concepts in Java language

  • 1. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 6 Mathematical foundations of Multithreaded programming concepts in Java language Manoj Kumar Srivastav Indira Gandhi National Open University St. Xavier’s College (Autonomous), Kolkata, Pin Code-700016, India Dr. Asoke Nath Associate Professor, Department of Computer Science, St. Xavier’s College (Autonomous), Kolkata, Pin code-700016, India Abstract-The mathematical description of object oriented language has already been developed by Srivastav et al. The authors have already published papers where they have shown that it is possible to describe programming language such as C, Java using simple mathematical sets and relations. The authors have established that it is possible to describe object oriented language like Java and its various aspects such as object, class, inheritance using simple mathematical models. In the present study the authors have proposed the mathematical modeling of Multi threaded programming in java language. The authors have tried to explore the single threaded program and as well as multi threaded program using simple mathematical modeling. The same idea may be applied to C# language also Keyword---object oriented, modeling, multithreaded, java, C# I. INTRODUCTION The term ‘thread’ plays an important role in object oriented programming in Java. Actually a thread is ‘a single sequential flow of control within a program.’ The concept of single thread is quite simple to understand and it becomes somewhat complex when there are multithreads running simultaneously, each performing different tasks within a single program. This can be enabled by multithreading where we can write program containing multiple path of execution, running concurrently, within a single program .In other words we can say that “ a single program having multiple threads , executing concurrently, can be termed as multithreaded program.” Definition of Multithreading : Multithreading is a conceptual programming paradigm where a program (process) into two or more subprogram (processes), which can be implemented at the same time in parallel. For example, one subprogram can display animation on the screen while another may build the next animation to be displayed. This is something similar to dividing tasks into subtasks and assigning them. Main Thread Main module method start start start switching switching Thread CThread BThread A
  • 2. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 7 It is important to remember that ‘thread running in parallel’ does not really mean that they actually run at the same time. Since all the threads are running on a single processor, the flow of execution is shared between the threads. Multithreading and memory space: Multithreading is a actually a form of multitasking. Multitasking can either be process-based or thread-based. If we assume some programs as processes, the process-based multitasking is nothing but execution of more than one program concurrently. On the other hand, thread-based multitasking is executing a program having more than one thread, performing different tasks simultaneously. Processes are heavyweight tasks, while threads are lightweight’s tasks. In process-based multitasking, different processes are actually different programs, thus they share different address spaces. The context switching of CPU from one process to another requires more overhead as different spaces are involved in the same. On the contrary, the thread-based multitasking, different threads are part of the same program, thus they share the same address space and context switching of CPU occurs within the program, i.e within the same address space. Multitasking: Multitasking is a process of executing multiple tasks simultaneously. We use multitasking to utilize the CPU. Multitasking can be achieved by two ways: (i)Process-based Multitasking(Multiprocessing) (ii)Thread-based Multitasking(Multithreading) (i)Process-based Multitasking (Multiprocessing)  Each process have its own address in memory i.e. each process allocates separate memory area.  Process is heavyweight.  Cost of communication between the process is high.  Switching from one process to another require some time for saving and loading registers, memory maps, updating lists etc. (ii) Thread-based Multitasking (Multithreading): Threads share the same address space. Thread is lightweight. Cost of communication between the thread is low. Note:At least one process is required for each thread. II. MATHEMATICAL DESCRIPTION OF MULTITHREADING Mathematical Description of class and object: Object-Oriented programming language is based on the following properties: (i) Class and Object (ii) Data Abstraction and Encapsulation (iii) Inheritance (iv) Polymorphism. Class is a collection of objects of similar type. Set: A set is well- defined collection of distinct objects of our perception or our thought ,to be conceived as a whole. Set of sets: we have defined a set as a collection of its elements. If the elements be set themselves, then we have a family of sets, or set of sets. For example, the collection of all subsets of a non-empty set S is a set of sets. This set is said to be the power set of S and is denoted by P(S). Class may be defined as follows: - In set theory and its application throughout mathematics, a class is collection of sets where each set has some common property. The members of a class are countable. So therefore, class={ sets : where all members have some common property} The basic form of a class in object –oriented programming is class classname
  • 3. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 8 { parameter declaration; Method declaration; } Object: The members of a class are called an object. Since the members of a class is a set .Therefore it should possesses some property. Objects are real world entity such as pen, chair, tables,etc. Similar comparision between set theory and object oriented language : Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. Any entity that has state and behavior is known as an object. For example: chair, pen, table, etc. It can be physical and logical. Collection of objects is called class. It is a logical entity. Any programming problem is analyzed in terms of objects and the nature of communication between them. An object takes up space in the memory and has an associated address like structure in C. Thus, class is a set of object and object is a set having some common feature. We can write the class by the symbol , , ……etc and object by X,Y, Z……. etc. MEMORY SPACE :An object is in Java is essentially a block of memory that contains space to store all instance variables. i.e each object of a class contain an address in memory space. Memory space for an object={address of the instance variables: variables are members of class} Creating an object is also referred to as instantiating an object. Objects in Java are created using the new operator .The new operator creates an object of the specified class and returns a reference to that object. Therefore the address of the new object is changed. Initial object has an address New object have new address Therefore we define a mapping f:(X,τ)  (Y,σ) such that f(address of object)=address of new object[ Here X and Y are object set and τ are set of sets with respect to object X and σ are set of sets with respect to object Y. Actually τ represents classes for domain and σ represents class for range in the above function and f represents main function. Mathematical Explanation of Multithreading: A unique property of Java is its support for multithreading .That is, Java enables us to use multiple flows of control in developing program. Each flow of control may be thought of as a separate tiny program (or module ) known as thread that runs in parallel to others. Let (X1,τ1 ), (X2,τ2 ), (X3,τ3 ), …….. (Xn, τ n ) be representing the n-threads and may be running parallel and are subprogram of main threads/program (X,τ). Let (Y,τ) be representing new threads(objects).
  • 4. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 9 (X1,τ1 ) (X2,τ2 ) (X, τ) (Y,τ) (X3,τ3 ) ( Xn, τ n) Mathematically, the function can occurs as follows: Let f1 : (X1,τ1) (X,τ), f2 : (X2,τ2) (X,τ), f3 : (X3,τ3) (X,τ), …………………………………. fn : (Xn,τn) (X,τ), and finally, the function f :(X, τ) (Y ,τ) ,i.e the address of the thread (X1,τ1) , (X2,τ2), (X3,τ3) ………………………… (Xn ,τn) mapping to the thread (X ,τ) and finally the address of the thread (X ,τ) maps to new object/thread (Y,τ).Thus we can say that f(f i) : (X ,τ) (Y ,τ), i.e . f (f i( (Address of domain))=address of range ,for i=1,2,3,………,n. Example :Illustrate with an example on multithreading in Java. Class A extends Thread { public void run() { for(int i=1; i<=5; i++) { System.out.println(“t From Thread A : = “ +i); } System.out.println(“ Exit from A”); } } Class B extends Thread { public void run() { for(int i=1; i<=5; i++) { System.out.println(“t From Thread A : = “ +i); }
  • 5. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 10 System.out.println(“ Exit from A”); } } Class C extends Thread { public void run() { for(int i=1; i<=5; i++) { System.out.println(“t From Thread A : = “ +i); } System.out.println(“ Exit from A”); } } Class ThreadTest { public static void main(String args[]) { new A().start(); new B().start(); new C().start(); } } Let us explain the example mathematically: Class A extends thread i.e Taking the address of class A Class B extends thread i.e Taking the address of class B Class C extends thread i.e Taking the address of class C III MATHEMATICAL PROPERTIES OF THE MULTITHREADING Properties(i):The space (X1,τ1) , (X2,τ2), (X3,τ3) ………………………… (Xn ,τn) are disconnected space.All the threads are disconnected. [ Definition of disconnected space.Then a subset E of X is said to be disconnected iff there exist two non-empty separated set A and B such that E=A B. Separated Set : :Let ( X, τ ) be a topological space. Two non empty subset A and B of X are said to be separated if and only if A ∩ Bc = and AC ∩ B= ] Properties (ii) :Two sets are separated if and only if they are disjoint and neither of them contains limit point of the other. Similarly all threads runs separately and output given by each threads does not depends on any threads. Properties (iii) Subset of separated sets are separated. The thing can be illustrated by the following diagram for the multithreading. Class threadTest.i.e taking the address of thread Test New object is created.i.e taking the address of new object.
  • 6. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 11 Thread1 some parts of threads running Thread 2 all parts of the thread running Main Thread New object /class/thread created Thread 3 some parts of threads are in the rest mode //:class anthread _2: Write a program in java to implement //multithreaded program : Use yield(), sleep(), stop() method import java.io.*; class thread_A extends Thread { public void run() { int i,s,n; try { System.out.println("nEntered in thread_A"); n=4; s=0; for(i=1;i<=n;i++) { s=s+i; System.out.println("i="+i+" s="+s); if(i==3) { System.out.println("nthread_A goes to sleep mode"); sleep(1000); System.out.println("nOut of sleep mode in thread_A"); } } } catch(Exception e){} } } class thread_B extends Thread { public void run() { int j,p,m; System.out.println("nEntered in thread_B"); m=4; ________
  • 7. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 12 p=1; for(j=1;j<=m;j++) { p=p*j; System.out.println("j="+j+" p="+p); if(j==3) { System.out.println("nthread_A goes to yield() mode"); yield(); System.out.println("nOut of yield() mode in thread_B"); } } } } class thread_C extends Thread { public void run() { int k,s1,d,k1; System.out.println("nEntered in thread_C"); k=1234; k1=k; s1=0; while(k1 != 0) { d=k1%10; s1=s1+d; System.out.println("k1="+k1+" d="+d); if(k1<100) { System.out.println("nthread_C goes to stop() mode"); stop(); System.out.println("nOut of stop() mode in thread_C"); } k1=k1/10; } } } class anthread_2 { public static void main(String args[])throws IOException { thread_A A=new thread_A(); thread_B B=new thread_B(); thread_C C=new thread_C(); System.out.println("Calling thread_A"); A.start(); System.out.println("Calling thread_B"); B.start(); System.out.println("Calling thread_C"); C.start(); System.out.println("nEnd of main thread"); } }
  • 8. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 13 Remarks : There may be the situation in which some threads are running and some are in the stop mode or some parts of a thread are working..But in all the situation each threads are separated. class thread_A extends Thread sleep() mode may be working in some parts here. class thread_B extends Thread yield() mode may be working on the some stage of thread class thread_C extends Thread stop() mode is working on the some stage of thread Thread Priority : In Java, each thread is assigned a priority, which affects the order in which it is scheduled for running. Mathematically, thread priority are the set which assigned with some indexed number and having some fixed probability value in all the situation. //anthread_3.java: Write a program in java to implement //multithreaded program: Use setPriority(), sleep(), stop() //method import java.io.*; class thread_A extends Thread { public void run() { int i,s,n; try { System.out.println("nEntered in thread_A"); n=4; s=0; for(i=1;i<=n;i++) { s=s+i; System.out.println("i="+i+" s="+s); if(i==3) { System.out.println("nthread_A goes to sleep mode"); sleep(1000); System.out.println("nOut of sleep mode in thread_A"); } } } catch(Exception e){} } } class thread_B extends Thread { public void run() { int j,p,m; System.out.println("nEntered in thread_B"); m=4; p=1; for(j=1;j<=m;j++) {
  • 9. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 14 p=p*j; System.out.println("j="+j+" p="+p); if(j==3) { System.out.println("nthread_A goes to yield() mode"); yield(); System.out.println("nOut of yield() mode in thread_B"); } } } } class thread_C extends Thread { public void run() { int k,s1,d,k1; System.out.println("nEntered in thread_C"); k=1234; k1=k; s1=0; while(k1 != 0) { d=k1%10; s1=s1+d; System.out.println("k1="+k1+" d="+d); if(k1<100) { System.out.println("nthread_C goes to stop() mode"); stop(); System.out.println("nOut of stop() mode in thread_C"); } k1=k1/10; } } } } } class anthread_3 { public static void main(String args[])throws IOException { thread_A A=new thread_A(); thread_B B=new thread_B(); thread_C C=new thread_C(); System.out.println("Calling thread_A"); A.setPriority(Thread.MAX_PRIORITY); B.setPriority(Thread.MIN_PRIORITY); C.setPriority(Thread.NORM_PRIORITY); System.out.println("Calling thread_C"); C.start(); System.out.println("Calling thread_B"); B.start(); System.out.println("Calling thread_A"); A.start();
  • 10. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 15 System.out.println("nEnd of main thread"); } } Remarks : Threads Probability A.setPriority(Thread. MAX_PRIORITY); Thread has highest value of probability of running B.setPriority(Thread.MI N_PRIORITY); Thread has lowest value of probability of running C.setPriority(Thread.N ORM_PRIORITY); Thread has the value of probability that lies between highest value and lowest value of probability of running of threads. Definition of Probability of an Event: If there are n elementary events associated with a random experiment and m of them are favourable to an event A, then the probability of happening or occurrence of A is denoted by P(A) and is defined in the ratio m/n. Thus,P(A)=m/n, clearly, 0≤m≤n. Therefore , 0≤m/n≤1 0≤P(A)≤ 1. If P(A)=1, then A is called certain events and A is called impossible events. The value of thread priority lies between 1-10,The Min_Priority,Norm _Priority and Max_Priority have distinct value and it are respectively 1,5 and 10 . IV .LIFE CYCLE OF A THREAD (THREAD STATES) A thread can be in one of the five states in the thread. According to sun, there is only 4 states new, runnable, non- runnable and terminated. There is no running state. But for better understanding the threads, we are explaining it in the 5 states. The life cycle of the thread is controlled by JVM. The thread states are as follows: 1. New 2. Runnable 3. Running 4. Non-Runnable (Blocked) 5. Terminated 1)New : The thread is in new state if you create an instance of Thread class but before the invocation of start() method.
  • 11. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 16 2)Runnable The thread is in runnable state after invocation of start() method, but the thread scheduler has not selected it to be the running thread. 3)Running The thread is in running state if the thread scheduler has selected it. 4)Non-Runnable (Blocked) This is the state when the thread is still alive, but is currently not eligible to run. 5)Terminated A thread is in terminated or dead state when its run() method exits. Mathematical Description Of State Transition diagram of a thread : Let (X,τ1) denotes the newborn thread where X is object and τ1 denotes the class (or thread) with respect to object X. Let (Y,τ2) denotes the runnable/running thread where Y is object and τ2 denotes the class (or thread) with respect to object Y Let (Z,τ3) denotes the Blocked thread where Z is object and τ3denotes the class (or thread) with respect to object Z Let (D,τ4) denotes the dead/ killed thread where D is object and τ4denotes the class (or thread) with respect to object D f1 f g f2 f3 h Note : Let us assume the following mapping occurs in the different memory spaces. Here f1 :(X,τ1) (Y,τ2) f2 :(Y,τ2) (Z,τ3) f3 :(Z,τ3) (Y,τ2) f :(X,τ1) (D,τ4) g : (Y,τ2) ( D,τ4) h :(Z,τ3) (D,τ4) Case 1:Newborn state to Dead state: Here ,we can define the function f :(X,τ1) (D,τ4) Such that f(address value of newborn thread)=address value of killed thread. Actually ,we may use stop() as a function in the stage. Case 2:Newborn state to Dead state via running and runnable state: Here we can define the function f1 :(X,τ1) (Y,τ2) and g: (Y,τ2) (D,τ4) such that g(f) : :(X,τ1) (D,τ4) i.e. g(f(address value of new born state))= address value of dead state. Case 3: Newborn state to Dead state via running , runnable state and Blocked state::In this stage, we can define the composite function as follows : h(f2(f1)) :(X,τ1) ( D,τ4) h(f2(f1 (address value of new born state)))= address value of dead state or g(f3(f2(f1))) : (X,τ1) ( D,τ4) g(f3(f2(f1 (address value of new born state))))= address value of dead state. (X,τ1 ) (Y,τ2) (Z,τ3) (D,τ4)
  • 12. International Journal of Innovative Research in Information Security (IJIRIS) ISSN: 2349-7017(O) Volume 1 Issue 4 (October 2014) ISSN: 2349-7009(P) www.ijiris.com _________________________________________________________________________________________________ © 2014, IJIRIS- All Rights Reserved Page - 17 V. CONCLUSION Multithreading is a process where we can make the correlation between the multithreading and disconnected space of a Topological scope. The embedding of the thread in to the main threads will be helpful to justify the memory space of different threads. Life Cycle of a thread can also be described mathematically and it also obeys the properties of disconnected space. REFERENCES [1] Manoj Kumar Srivastav , Asoke Nath Mathematical modeling of various statements of C-type Language, , International Journal of Advanced Computer Research(IJACR), Vol-3,Number-1, Issue-13, Page:79-87 Dec(2013). [2] Manoj Kumar Srivastava, Asoke Nath Mathematical Description of variables, pointers, structures, Unions used in C- type language, , Joiurnal of Global Research Computer Science, Vol-5, No-2, Page:24-29, Feb(2014) [3] Manoj Kumar Srivastav, Asoke Nath, A Mathematical Modeling of Object Oriented Programming Language : a case study on Java programming language, Current Trends in Technology and Science(CTTS) Vol-3, Issue-3, Page 134- 141,(2014). [4] Manoj Kumar Srivastav, Asoke Nath, Analysis of Compilation Errors, Runtime Errors, Reliability and Validity of a Program: A Case Study on C-language : IJISET - International Journal of Innovative Science, Engineering & Technology, Vol. 1 Issue 3, May 2014. Page-281-288. [5] E Balaguruswamy- Programming with Java-TataMcGrawHill EductionP rivate Limited.,2011 [6] Sachin Malhotra, Sourabh Choudhary- Programming in Java- OXFORD University Press,2012 [7] Herbert Schildt, Java TM 2: The Complete Reference, TataMcGraw-Hill Publishing Company Limited,2001 [8] Satish Jain,Vineeta Pillai,Kratika, Introduction to Object Oriented Programming through Java,BPB Publications,2011 [9] S.K.Mapa, Real Analysis , Asoke Prakasan 1998 [10] S.K.Mapa Higher Algebra, -Sarat Book Distribution,2000 [11] K.D.Joshi-Topology.New Age International Publiocation. [12] J.N Sharma, "Topology", Krishna Prakashan Media(p)Ltd., Meerut, (2000) [13]R.S.aggarwal-Topology-S.chand publication. [14]James R Munkers-Topology- Pearson Education Asia, 2001 [15] www.javatpoint.com [16] R.D.Sharma. Mathematics class xi-. Danapat Rai Publications(P) LTD.