Рівночасні обчислення: відмінності між версіями

[перевірена версія][перевірена версія]
Вилучено вміст Додано вміст
Немає опису редагування
Рядок 3:
'''Конкурентні обчислення''' ({{lang-en|Concurrent computing}}) - це форма [[обчислення|обчислень]], в якій кілька обчислень відбуваються в часових відрізках які перетинаються - [[Паралелізм (інформатика)|паралельно]]'', а не послідовно (так що кожне обчислення мусить закінчитись перед тим як почнеться інше). <!-- This is a property of a system—this may be an individual [[computer program|program]], a [[computer]], or a [[computer network|network]]—and there is a separate execution point or "thread of control" for each computation ("process"). A ''concurrent system'' is one where a computation can advance without waiting for all other computations to complete.<ref>''Operating System Concepts'' 9th edition, Abraham Silberschatz. "Chapter 4: Threads"</ref>
 
As a [[programming paradigm]], concurrent computing is a form of [[modular programming]], namely [[decomposition (computer science)|factoring]] an overall computation into subcomputations that may be executed concurrently. Pioneers in the field of concurrent computing include [[Edsger Dijkstra]], [[Per Brinch Hansen]], and [[C.A.R. Hoare]]. -->
 
== IntroductionВизначення ==
{{See also|ParallelПаралельні computingобчислення}}
 
{{multiple issues|section=yes|
TheПоняття conceptконкуретних ofочислень concurrentчасто computingплутають isз frequentlyподібним, confusedале withдещо theвідмінним related but distinct concept ofпоняттям [[parallelПаралельні обчислення|паралельних computingобчислень]],<ref name=waza>[[Rob Pike|Pike, Rob]] (2012-01-11). "Concurrency is not Parallelism". ''Waza conference'', 11 January 2012. Retrieved from http://talks.golang.org/2012/waza.slide (slides) and http://vimeo.com/49718712 (video).</ref><ref>{{cite web
{{refimprove section|date=December 2016}}
{{original research section|date=December 2016}}
}}
The concept of concurrent computing is frequently confused with the related but distinct concept of [[parallel computing]],<ref name=waza>[[Rob Pike|Pike, Rob]] (2012-01-11). "Concurrency is not Parallelism". ''Waza conference'', 11 January 2012. Retrieved from http://talks.golang.org/2012/waza.slide (slides) and http://vimeo.com/49718712 (video).</ref><ref>{{cite web
|url=https://wiki.haskell.org/Parallelism_vs._Concurrency
|title=Parallelism vs. Concurrency
|work=Haskell Wiki
}}</ref> althoughхоча bothобидва canописуються beяк described"паралельні as "multipleпроцеси processesщо executingвиконуються ''duringпротягом theспільних sameчасових period of timeвідрізків''". InВ parallelпаралельних computing,обчисленнях executionвиконання occursвідбувається atв theту sameж physicalсаму instant:мить forфізичного exampleчасу, onнаприклад separateна різних [[central processing unitCPU|processorsпроцесорах]] ofбагатопроцесорної a [[multi-processor]] machineмашини, withі theметою goalє ofзменшення speedingчасу upвиконання computations—parallelобчислень. computingПаралельні isобчислення impossibleнеможливі onна a ([[Multi-core processor|one-core]])одному singleодноядерному processorпроцесорі, asтак onlyяк oneв computationкожен canмомент occurчасу at(такт anyпроцесора) instantможе (duringвідбуватись anyлише singleодне clock cycle)обчислення.<!--{{efn|This is discounting parallelism internal to a processor core, such as pipelining or vectorized instructions. A one-core, one-processor ''machine'' may be capable of some parallelism, such as with a [[coprocessor]], but the processor alone is not.}} By contrast, concurrent computing consists of process ''lifetimes'' overlapping, but execution need not happen at the same instant. The goal here is to model processes in the outside world that happen concurrently, such as multiple clients accessing a server at the same time. Structuring software systems as composed of multiple concurrent, communicating parts can be useful for tackling complexity, regardless of whether the parts can be executed in parallel.<ref>{{cite book |first=Fred B. |last=Schneider |title=On Concurrent Programming |publisher=Springer |isbn=9780387949420}}</ref>{{rp|1}}
 
For example, concurrent processes can be executed on one core by interleaving the execution steps of each process via [[time-sharing]] slices: only one process runs at a time, and if it does not complete during its time slice, it is ''paused'', another process begins or resumes, and then later the original process is resumed. In this way, multiple processes are part-way through execution at a single instant, but only one process is being executed at that instant.{{citation needed|date=December 2016}}