Concurrent Programming x Parallel x Distributed

10

What are they, what are the characteristics of each?

Problems that each one proposes to solve?

Main difference between them?

    
asked by anonymous 20.07.2015 / 20:15

1 answer

11

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

The 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 performs only one command line at a time, so the competition, and who takes care of this competition is the Process Scheduler that schedules a new process every time a process gets blocked, performs an I / O operation [1] or the term.

The biggest disadvantage of this type of programming is that any action that requires some processing time will "hang the user" and it will not be able to do any other action until the first one finishes.

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

The best example of parallelism is the browser you are using now, which probably has more than one open tab (actually I did not study browser codes) and probably each tab is running in one or more threads , because when you open a new tab, you do not have to wait for the site to finish loading everything, so you can switch to another tab.

Intheillustrationasingleprocesscontainingfourthreadswhereeachis"running parallel" [2] on different cores of the processor.

In 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 greater capacity of processing and consequently to withstand a greater number of users / requisitions / processes.

Some disadvantages that must be handled well when planning distributed systems are: Network failures or machines that can compromise the system; Because the coupling is done via the network, its communication can be slow and / or generate intense traffic in the network; Data security, such as traffic is done via network, not dealing with traffic safety is a weakness of this type of system.

On distributed programming, the biggest example of today is bitcoin miners. It is impossible for an ordinary computer to have all the processing power it needs, so distributed programming enters "piecing together" the processing of all the integrated computers.

Reading Material:

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

    
20.07.2015 / 21:00