All modern computers have multicore processors and good software engineer should utilize all these resources to make a more productive and responsive software.

The multiprocessor and multicore hardware architectures greatly influence the design and execution model of applications that run on them nowadays.

In order to utilize the full power of available computational units, the applications should be ready to support multiple execution flows which are running concurrently and competing for resources and memory.

All Operating systems support concurrency both via processes and threads. Processes are instances of programs that typically run independently to each other. If you start a java program the operating system creates a new process that runs in parallel to other programs. Inside those processes we can utilize threads to execute code concurrently, so we can make the most out of the available cores of the CPU.

What is concurrency?

Concurrency is the ability to run several programs or parts of a program in a parallel way. If a time-consuming task can be performed in parallel, this improves the throughput and responsiveness of the program.

A Java application runs by default in one process. Within a Java application, you work with several threads to achieve parallel processing or asynchronous behavior.

#java #concurrency #tutorial #multithreading #guides-and-tutorials

Java Concurrency
1.35 GEEK