Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Difference between Multithreading and Synchronized Mulitthreading

Share this post!
 Vote this!

Here, these two codes are used to shows the difference between normal MultiThreading and Synchronized Multithreading. Notice, see the difference in the starting and finishing of all the threads in both the code and try to find why every time when you run the program code, random thread starts first.

Usually a thread has three part :
  1. CPU : Its store the address of the entire path required.
  2. Data : It is the information carried by a thread during its life cycle.
  3. Code : It is the known as the property of thread.
Myth : A programmer relates "thread as process" but in real thread is not a process but "a part of process".

Thread can be created in two ways.
  1. By extending the thread class.
  2. By using / implementing the runnable interface.  more...

0 comments:

Post a Comment