Concurrent Programming x Parallel x Distributed

Asked

Viewed 12,287 times

14

What are, what are the characteristics of each?

Problems that each one proposes to solve?

Main difference between them?

1 answer

17


The main differences between these types of programs are their forms of execution.

To concurrent programming is the most common, where the program runs sequentially competing for the availability of the processor(s) with the other programs. Each processor runs only one command line at a time, so the competition, and who takes care of that competition is the Process Scheduler that Scales a new process every time a process gets blocked, performs an I/O operation [1] or at the end.

The biggest disadvantage of this type of programming, is that any action that requires some processing time will "lock the user" and he will not be able to perform any other action until the first one ends.

To parallel programming also known as asynchronous is also a concurrent programming, but with more lines of execution, where the program is divided into several "sub-processes" known as Threads which will be executed in parallel with the parent process. This form of development is best used when it has two or more processing cores.

The best example of parallelism is the browser you are using now, which is probably with more than one tab open (actually I haven’t studied the browser codes) and probably each tab is running on one or more threads, because when you open a new tab, you don’t have to wait for the site to finish loading, so you can switch to another tab.

Threads

In the illustration a single process containing four threads in which each one "is running in parallel" [2] in cores other than the processor.

In the distributed programming the system runs in multiple environments interconnected by a network (internet or intranet). This type of system has the advantage of having a higher processing capacity and consequently withstand a larger number of users/requests/processes.

Some disadvantages that should be very well addressed when planning distributed systems are: Network failures or machines that can compromise the system; Due to the coupling be done via network, your communication can be slow and/ or generate intense traffic in the network; Data security, as traffic is done via network, not treating traffic safety is a weak point of this type of system.

About the distributed programming, the biggest example of the present are the miners of Bitcoins. It is impossible for an ordinary computer to have all the necessary processing power, so enter distributed programming by "joining" the processing of all integrated computers.

Reading Material:

1: Input and/or Output Operation.
2: In a real environment, thousands of instructions are executed per second, then each thread can be executed in parallel with other processes, instead of the parent process or its threads sisters.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.