communication between threads 线程间通信 Programming Concurrent Activities 程序设计中的并发活动 Ada task 任务 Ja

Posted rsapaper

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了communication between threads 线程间通信 Programming Concurrent Activities 程序设计中的并发活动 Ada task 任务 Ja相关的知识,希望对你有一定的参考价值。

Computer Science An Overview _J. Glenn Brookshear _11th Edition

 activation 激活

parallel processing 并行处理

concurrent processing 并发处理

 

Each programming language tends to approach the parallel processing paradigm from its own point of view, resulting in different terminology. For example, what we have informally referred to as an activation is called a task in the Ada vernacular and a thread in Java. That is, in an Ada program, simultaneous actions are performed by creating multiple tasks, whereas in Java one creates multiple threads. In either case, the result is that multiple activities are generated and executed in much the same way as processes under the control of a multitasking operating system.

 

Perhaps the most basic action that must be expressed in a program involving parallel processing is that of creating new threads. If we want multiple activations of the spaceship program to be executed at the same time, we need a syntax for saying so. Such spawning of new threads is similar to that of requesting the execution of a traditional procedure. The difference is that, in the traditional setting, the program unit that requests the activation of a procedure does not progress any further until the requested procedure terminates (recall Figure 6.8), whereas in the parallel context the requesting program unit continues execution while the requested procedure performs its task (Figure 6.23). Thus to create multiple spaceships streaking across the screen, we would write a main program that simply generates multiple activations of the spaceship program, each provided with the parameters describing the distinguishing characteristics of that spaceship.

A more complex issue associated with parallel processing involves handling communication between threads. For instance, in our spaceship example, the threads representing the different spaceships might need to communicate their locations among themselves in order to coordinate their activities. In other cases one thread might need to wait until another reaches a certain point in its computation, or one thread might need to stop another one until the first has accomplished a particular task.

 

以上是关于communication between threads 线程间通信 Programming Concurrent Activities 程序设计中的并发活动 Ada task 任务 Ja的主要内容,如果未能解决你的问题,请参考以下文章

关于fragment的传值问题

使用 UDF 发布 C# Excel 插件

讲解EEEN 60184 Communications

We went through a period ______ communications we

从 subprocess.communicate() 读取流输入

网络通信中的单工(Simplex Communication)半双工(Half-duplex Communication)全双工(Full-duplex Communication)是什么意思?