Parallel and Distributed Computing

13 Mar 2011 by

Parallel and Distributed Computing

Parallel and Distributed Computing

Parallel and Distributed computing can be confused. This article will show you the simplest way to identify.

Parallel Computing

  • Shared memory system
  • Multiprocessor (multiple processors share a single bus and memory unit)
  • Symmetric Multiprocessing (SMP) supports in Operating System
  • Much simpler than distributed system
  • Limited scalability

Distributed Computing

  • Distributed memory system
  • Multicomputer (Autonomous computer nodes connected via network)
  • Share many of challenges
  • Better scalability and cheaper
  • Distributed computing in local network is also called cluster computing while in wide-area networks is referred to grid computing


One response so far

Performance Evaluation on Java Thread and .NET Thread

01 Mar 2011 by

Performance evaluation on Java single thread and multi-thread has already been discussed in the previous post. So I will show you all the performance of .NET thread comparable to Java thread. We did the same scenario and experimental environment as my last post. The overall Java performs much better than .NET both single thread and multi-thread.

Continue Reading »

No responses yet

Performance Evaluation on Single Thread and Multi-Thread

27 Feb 2011 by

Threading could eventually improve system capacity as multi-core and multi-processor are more common in commodity computer. We can spend less than USD 1000 to get Core-i3, Core-i5 or even Core-i7. So threading technique for enabling-threading tasks could maximize the overall system performance. Be remember that not all tasks could take advantage of multi-threading. And multi-thread is not always good since its overhead and cost in coordinating data. I will discuss this scenario in the later post.

Continue Reading »

One response so far

How to Return a Value from Thread

26 Feb 2011 by

Thread implementation in Java is never easier if you do following my 3 steps strictly. However, there might be a lot of question regarding return value from a thread since run() method returns void. So I will show you how to get return value from a thread.
Just to review how to implement java thread, the 3 steps are:

  1. Extends Thread class or Implements Runnable interface
  2. Override run() method
  3. In main thread, initialize thread class and then call start() method

Continue Reading »

5 responses so far

Process vs. Thread

24 Feb 2011 by

Process and Thread are two unit of executions that are not the same in the sense of executing environment. These two terms often are used confusingly. This article will clear all the doubts.


Process is a compiled program requires CPU to execute its instructions and also requires its own memory space for storing its executing environment. If we peep into the memory of computer, Process can be divided at least into 3 segments:

  • Text segment: storing program code
  • Heap: storing global data
  • Stack: storing local data
Process segmentation in computer memory

Process Segmentation

The purpose of segmentation in memory is to distinguish between instruction and data. Let’s say 0xA2 in hexadecimal. If it is stored in Text Segment, it is MOV instruction. On the hand, if it is stored in Heap or Stack, it equals 162 in decimal.

Some main feature of Process:

  • Has its own memory space
  • Has its own unique process ID
  • Creating and destroying Process is cost heavily
  • Communication between processes is done based on Inter-Process Communication (IPC) or pipe (UNIX-like system)


Thread sometimes is called light weight process. However, it has some unique features making it differences from Process.

Some main feature of Thread:

  • Thread exists within a process
  • Every process has at least one thread called main thread
  • The main thread has an ability to create additional threads
  • Thread share process’s resources, including memory, open files, socket. This makes efficient in communication among each other but giving some sorts of potential problematic. This problem will be discussed in Mutual Exclusion.
Threads exist in a Process and share Process's resources

Process and Thread

2 responses so far