Skip to main content

Posts

Showing posts from 2017

Parallel Programming In Java

Parallel Programming In Java In recent years, the multicore processors are commonplace and are used everywhere, so a new trend has emerged in the field of computing, a concept called Parallel Processing or Parallel Programming. Parallel Programming is the set of methods or techniques which are used to take advantages of the computers that contain two or more processors (also called multicore processors), to speed up the performance of applications. Prior to parallel programming, threads were being created to make concurrent programs, but threads were not actually being executed simultaneously (at the same time) because of the single-core processors, and they used to share CPU-time, to utilize the idle CPU time. But in parallel programming, two or more threads can actually execute simultaneously because of the multi-core processors. See The Basics Of Multithreading In Java Java has defined many core features (classes and interfaces) in its concurrency (or multithreading...

Multithreading In Java

Multithreading In Java Java provides built-in support for multithreading . Multithreading is the technique of performing multiple tasks simultaneously or concurrently, so it is also called multitasking . There are two types of multitasking: process-based multitasking and thread-based multitasking. Process-based multitasking means two or more processes execute at the same time which is supported by the current operating systems. Like a person is using notepad file and at the same time another file is being downloaded in the background, this is multitasking (at the process level). Now, multithreading is the technique in which single process can execute multiple tasks at the same time as a person is writing in notepad file and at the same time he is printing previous pages which he has written, means two tasks are being performed within a single process, so this is multithreading or multitasking within a single process (at thread-level). It is also called concurrent programming, wh...