Wednesday, December 13, 2006

Java Multi-threading Vs Dual Core Processor

Multithreading could be categorized in two kinds:

1. Temporal multithreading where operating systems simulate doing many things at once by rapidly time-slicing between threads.
2. Simultaneous multithreading (SMT) when multiple threads executes instructions during the same clock cycle.

The java multithreading which we have known so far is actually temporal multithreading as most processors so far has been capable of executing only a single thread in a given time-slice.

True concurrency could actually be termed as Simultaneous multithreading (SMT). In past, SMT has been possible only on high-end multiprocessor systems. There arrives the Intel Dual Core Processor.

Intel dual core processor consists of two complete execution cores in one physical processor, both running at the same frequency. This is intended to provide immediate advantages to people looking to buy systems that boosts multitasking computing power and improve the throughput of multithreaded applications. To read more about dual core processors, refer http://www.intel.com/technology/computing/dual-core/.

Running Java program on a dual core processor does not immediately inherit advantages provided by SMT. One has to adapt the algorithms such that time consuming sections are performed by multiple threads designed to run simultaneously.

The java concurrency API should be used in such cases to speed up time-consuming tasks on dual core processors. The package java.util.concurrent classes could be used to achieve true concurrency. A simple approach for multithreading follows:
1. Develop a single-threaded, sequential, robust, and clearly organized version of your algorithm.
2. Identify the subtasks.
3. Benchmark the algorithm.
4. Delegate the most time-consuming subtasks to a thread pool.

For detail reading on java hyper-threading, visit http://www.javaworld.com/javaworld/jw-11-2006/jw-1121-thread.html?fsrc=rss-index


3 Comments:

Blogger Unknown said...

I have had some problem with the processor of my computer and i was looking information wich help me to solve this particular issue. I must to say in my search i found this blog resulting vere attractive for all the useful information contained here . I found another blog called costa rica investment opportunities very interesting. I wanted share it with you.

10:44 AM  
Blogger Unknown said...

This whole information is absolutely useful and interesting. i like this blog because this blog is easily understandable, and that is invaluable to the readers. I wanted to buy viagra online, and i saw this blog. I think this information will be useful for me, because i want to know more about processors.

11:25 AM  
Blogger Unknown said...

Hello, sir i would like to ask that what is the scope of java training, what all topics should be covered and it is kinda bothering me … and has anyone studies from this course http://www.wiziq.com/course/1779-core-and-advance-java-concepts of core and advance java online ?? or tell me any other guidance...
would really appreciate help… and Also i would like to thank for all the information you are providing on java concepts.

5:51 AM  

Post a Comment

<< Home