Parallel processing and asynchronous processing

Machine Learning Technology Artificial Intelligence Technology Natural Language Processing Technology Semantic Web Technology Search Technology DataBase Technology Ontology Technology Algorithm Digital Transformation Technology User Interface and DataVisualization Javascript Workflow & Services Clojure Web Technologies Navigation of this blog
Parallel processing and asynchronous processing

In web-based applications, it is necessary to consider interaction with humans, and it becomes necessary to adjust the time axis that is overwhelmingly different between a machine that operates in microsecond units and a person that operates in seconds. The mechanism that realizes them becomes a function called asynchronous processing or parallel processing.

Here, asynchronous processing means that after calling some processing, it takes time until the processing is completed, and another processing is performed in the meantime. For example, considering the process of a person pressing a button on the UI, even if the program calls a function that detects the button being pressed once, it takes time before it is actually pressed, and another process is performed during that time. Become a thing.

If this process is not performed, other processes will stop until the execution of a certain function is completed, resulting in a large delay in the execution of the process. In addition, if you code unplannedly, asynchronous processing will become complicated or loops will occur, and there will be harmful effects such as calling back hell (Callback Hell), which is called Javascript, which stops operation or becomes extremely slow.

The definition of parallel processing is the case where multiple tasks are executed at the same time, and the process is divided into several small execution units (called threads), which are switched and processed, which is called multi-thread processing.

Multi-threaded processing can be classified into two categories: parallel processing and concurrent processing. Parallel processing involves disassembling multiple tasks and rearranging them so that they work efficiently, so that only one task is being performed in the computer at any given time. The difference between parallel processing and parallel processing is that parallel processing uses multiple CPUs to perform multiple tasks simultaneously in the computer.

Parallel processing is mainly used in the OS, where the aforementioned time-consuming processes such as I/O, including UI, are well separated from the computation-only processes that can be completed in a short period of time. Parallel processing is used for tasks such as deep learning, where the computation process itself is divided into smaller parts and executed simultaneously.

The technologies required for both parallel and asynchronous processing include a scheduling function to reorder threads that have been broken down into pieces, and a memory management function to determine how to share the data being processed between threads. The key technology to achieve this is how to handle the data being processed.

Each programming language implements such parallel and asynchronous processing functions, and I would like to introduce some examples in the future.

コメント

タイトルとURLをコピーしました